Package org.apache.cassandra.locator

Examples of org.apache.cassandra.locator.TokenMetadata.update()


        for (int i = 1; i <= numOldNodes; i++)
        {
            // leave .1 for myEndpoint
            // TODO use this when #519 is fixed
            // tmd.update(p.getRandomToken(), InetAddress.getByName("127.0.0." + (i + 1)));
            tmd.update(p.getToken(FBUtilities.bytesToHex(FBUtilities.toByteArray(i * 13))), InetAddress.getByName("127.0.0." + (i + 1)));
        }
    }
}
View Full Code Here


        IPartitioner<?> p = StorageService.getPartitioner();

        for (int i = 1; i <= numOldNodes; i++)
        {
            // leave .1 for myEndpoint
            tmd.update(p.getRandomToken(), InetAddress.getByName("127.0.0." + (i + 1)));
        }
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.