Question : Please map the bwlow. A. Murmur3Partitioner B. RandomPartitioner C. ByteOrderedPartitioner
1. Provides fast hashing and good performance 2. Uniformly distributes data across the cluster based on MD5 hash values 3. Partitioner for ordered partitioning
1. A-3 B-2 C-1
2. A-2 B-1 C-3 3. A-1 B-3 C-2 4. A-1 B-2 C-3
Correct Answer : 4 Explanation: The main difference between the two partitioners is how each generates the token hash values. The RandomPartitioner uses a cryptographic hash that takes longer to generate than the Murmur3Partitioner. Cassandra doesn't really need a cryptographic hash, so using the Murmur3Partitioner results in a 3-5 times improvement in performance.
Cassandra offers the following partitioner that can be set in the cassandra.yaml file. Murmur3Partitioner (default): uniformly distributes data across the cluster based on MurmurHash hash values. RandomPartitioner: uniformly distributes data across the cluster based on MD5 hash values. ByteOrderedPartitioner: keeps an ordered distribution of data lexically by key bytes
Question : Both RandomPartitioner and MurmurPartitioner uses a cryptographic hash to generates the token hash values
1. True 2. False
Correct Answer : 2 Explanation: A partitioner determines how data is distributed across the nodes in the cluster (including replicas). Basically, a partitioner is a function for deriving a token representing a row from its partition key, typically by hashing. Each row of data is then distributed across the cluster by the value of the token.
Both the Murmur3Partitioner and RandomPartitioner use tokens to help assign equal portions of data to each node and evenly distribute data from all the tables throughout the ring or other grouping, such as a keyspace. This is true even if the tables use different partition keys, such as usernames or timestamps. Moreover, the read and write requests to the cluster are also evenly distributed and load balancing is simplified because each part of the hash range receives an equal number of rows on average. For more detailed information.
The main difference between the two partitioner is how each generates the token hash values. The RandomPartitioner uses a cryptographic hash that takes longer to generate than the Murmur3Partitioner. Cassandra doesn't really need a cryptographic hash, so using the Murmur3Partitioner results in a 3-5 times improvement in performance.
Murmur3Partitioner? The Murmur3Partitioner provides fast hashing and good performance. The Murmur3Partitioner is the default partitioning strategy for new Cassandra clusters and the right choice for new clusters in almost all cases.
RandomPartitioner? The default partitioner prior to Cassandra 1.2.
ByteOrderedPartitioner? Cassandra provides this partitioner for ordered partitioning. It is included for backwards compatibility.
Question : You are designing Cassandra cluster, and you have been asked to span cluster in Geneva, Nevada and Hyderabad. Which of the following replication strategies you will use for this.
1. SimpleStrategy
2. NetworkTopologyStrategy
3. Murmur3Strategy
4. RandomStrategy
Correct Answer : 2 Explanation: SimpleStrategy : Use only for a single data center and one rack. SimpleStrategy places the first replica on a node determined by the partitioner. Additional replicas are placed on the next nodes clockwise in the ring without considering topology (rack or data center location).
Use NetworkTopologyStrategy when you have (or plan to have) your cluster deployed across multiple data centers. This strategy specify how many replicas you want in each data center. NetworkTopologyStrategy places replicas in the same data center by walking the ring clockwise until reaching the first node in another rack. NetworkTopologyStrategy attempts to place replicas on distinct racks because nodes in the same rack (or similar physical grouping) often fail at the same time due to power, cooling, or network issues.