src/java/org/apache/cassandra/db/SystemTable.java
/**
     * Record token being used by another node
     */
Record token being used by another node
Record token being used by another node
public static synchronized void updateToken(InetAddress ep, Token token)
    {
        if (ep == FBUtilities.getLocalAddress())
            return;
        IPartitioner p = StorageService.getPartitioner();
        ColumnFamily cf = ColumnFamily.create(Table.SYSTEM_TABLE, STATUS_CF);
        cf.addColumn(new Column(p.getTokenFactory().toByteArray(token), ByteBuffer.wrap(ep.getAddress()), LamportClock.getVersion()));
        RowMutation rm = new RowMutation(Table.SYSTEM_TABLE, RING_KEY);
        rm.add(cf);
        try
        {
            rm.apply();
        }
        catch (IOException e)
        {
            throw new IOError(e);
        }
        forceBlockingFlush(STATUS_CF);
    }
public static synchronized void updateToken ( InetAddress ep , Token token ) { if ( ep == FBUtilities . getLocalAddress ( ) ) return ; IPartitioner p = StorageService . getPartitioner ( ) ; ColumnFamily cf = ColumnFamily . create ( Table . SYSTEM_TABLE , STATUS_CF ) ; cf . addColumn ( new Column ( p . getTokenFactory ( ) . toByteArray ( token ) , ByteBuffer . wrap ( ep . getAddress ( ) ) , LamportClock . getVersion ( ) ) ) ; RowMutation rm = new RowMutation ( Table . SYSTEM_TABLE , RING_KEY ) ; rm . add ( cf ) ; try { rm . apply ( ) ; } catch ( IOException e ) { throw new IOError ( e ) ; } forceBlockingFlush ( STATUS_CF ) ; }
Record token being used by another node
Record token being used by another node