Geroba Data Technologies: Make the better decisions

Cassandra Token Calculator

Cassandra Token Calculator
Token Calculator (Screenshot)

A handy Apache Cassandra token calculator for online initial token calculation with RandomPartitioner and Murmur3Partitioner

When creating a Cassandra cluster and not using virtual nodes that were introduced in version 1.2 (and are not fully supported by OpsCenter yet), you need to define the token range each individual cluster node is responsible for. If you set up Cassandra Clusters from time to time (like I do), this online calculator can be quite handy for you.

Just enter the amount of nodes you want to have initially and the partitioner (either RandomPartitioner or Murmur3Partitioner which is default in Cassandra 1.2+):

Cassandra Token Calculator

Partitioner
Number of nodes
Result
Calculate Tokens

Note: This implementation uses the BigInteger JavaScript Library by Silent Matt.

Explanation of token calculation

The token calculation is basically a function that divides the whole token range into equally sized subparts. For the RandomPartitioner, Cassandra offers a tool to calculate the partitions, for Murmur3, a Python script is provided:

The following two tabs change content below.
Gernot R. Bauer is the founder of Geroba Data Technologies. With a strong technological background in informatics, mathematics, machine learning and algorithm design, Gernot knows that the base for good business and risk management decisions resides in the quality of the underlying data.
 
Comments

Admiring the time and energy you put into your website and in depth information you present.

It’s awesome to come across a blog every once in a while
that isn’t the same out of date rehashed material.
Great read! I’ve bookmarked your site and I’m including your RSS feeds to my Google account.

Yes you are right..To start with Apache Cassandra vs Datastax Cassandra, let’s have a look at them first! Apache Cassandra can be defined as a distributed DBMS(Database Management System) that is designed to handle vast volumes of data across many data centers and the cloud

The Best Odoo development companyin India providing Odoo services such as Odoo implementation, Odoo development, Odoo customization. One of the best eCommerce service providers in India and an expert in Web Development and Mobile App Development.

Thanx for sharing this guide

yes you are right..Apache Cassandra is an open-source distributed NoSQL database management system built to handle large chunks of data over various data centers. Cassandra was developed at Facebook to overcome its “inbox search” issue and make it easier to find the conversations. Facebook later open-sourced Cassandra, and it became an Apache Foundation project. Cassandra is a highly scalable database and is freely available under the Apache License 2.0.

Good post thank you…

Odoo the top Insurance Management System is a complete, secure, and performance-based insurance management system designed to capture workflows for daily operations in an insurance company. All elements of insurance management are integrated into a single application. A unique solution to improve operational effectiveness and efficiency by utterly and immediately automating all insurance calculations and processes.

Trackbacks for this post

Leave a Reply