MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / setPartitioner

Method setPartitioner

lib/metadata/index.js:129–137  ·  view source on GitHub ↗

* @ignore * @param {String} partitionerName

(partitionerName)

Source from the content-addressed store, hash-verified

127 * @param {String} partitionerName
128 */
129 setPartitioner(partitionerName) {
130 if (/RandomPartitioner$/.test(partitionerName)) {
131 return this.tokenizer = new t.RandomTokenizer();
132 }
133 if (/ByteOrderedPartitioner$/.test(partitionerName)) {
134 return this.tokenizer = new t.ByteOrderedTokenizer();
135 }
136 return this.tokenizer = new t.Murmur3Tokenizer();
137 }
138
139 /**
140 * Populates the information regarding primary replica per token, datacenters (+ racks) and sorted token ring.

Callers 1

_setLocalInfoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected