本文整理汇总了Java中org.apache.cassandra.config.DatabaseDescriptor.setPartitioner方法的典型用法代码示例。如果您正苦于以下问题:Java DatabaseDescriptor.setPartitioner方法的具体用法?Java DatabaseDescriptor.setPartitioner怎么用?Java DatabaseDescriptor.setPartitioner使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.config.DatabaseDescriptor
的用法示例。
在下文中一共展示了DatabaseDescriptor.setPartitioner方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setPartitionerUnsafe
import org.apache.cassandra.config.DatabaseDescriptor; //导入方法依赖的package包/类
IPartitioner setPartitionerUnsafe(IPartitioner newPartitioner)
{
IPartitioner oldPartitioner = DatabaseDescriptor.getPartitioner();
DatabaseDescriptor.setPartitioner(newPartitioner);
valueFactory = new VersionedValue.VersionedValueFactory(getPartitioner());
return oldPartitioner;
}
示例2: clear
import org.apache.cassandra.config.DatabaseDescriptor; //导入方法依赖的package包/类
@Before
public void clear()
{
TOKEN_SCALE = new BigInteger("8");
partitioner = new RandomPartitioner();
// TODO need to trickle TokenSerializer
DatabaseDescriptor.setPartitioner(partitioner);
mt = new MerkleTree(partitioner, fullRange(), RECOMMENDED_DEPTH, Integer.MAX_VALUE);
}
示例3: AbstractSSTableSimpleWriter
import org.apache.cassandra.config.DatabaseDescriptor; //导入方法依赖的package包/类
public AbstractSSTableSimpleWriter(File directory, CFMetaData metadata, IPartitioner partitioner)
{
this.metadata = metadata;
this.directory = directory;
DatabaseDescriptor.setPartitioner(partitioner);
}
示例4: setPartitioner
import org.apache.cassandra.config.DatabaseDescriptor; //导入方法依赖的package包/类
protected void setPartitioner(IPartitioner partitioner)
{
this.partitioner = partitioner;
// the following is still necessary since Range/Token reference partitioner through StorageService.getPartitioner
DatabaseDescriptor.setPartitioner(partitioner);
}
示例5: setPartitioner
import org.apache.cassandra.config.DatabaseDescriptor; //导入方法依赖的package包/类
protected void setPartitioner(IPartitioner partitioner)
{
this.partitioner = partitioner;
DatabaseDescriptor.setPartitioner(partitioner);
}