use of com.basho.riak.client.core.query.Namespace in project YCSB by brianfrankcooper.
the class RiakKVClient method setTestEnvironment.
/**
* Auxiliary function needed for testing. It configures the default bucket-type to take care of the consistency
* problem by disallowing the siblings creation. Moreover, it disables strong consistency, because we don't have
* the possibility to create a proper bucket-type to use to fake 2i indexes usage.
*
* @param bucket The bucket name.
* @throws Exception Thrown if something bad happens.
*/
void setTestEnvironment(String bucket) throws Exception {
bucketType = "default";
bucketType2i = bucketType;
strongConsistency = false;
Namespace ns = new Namespace(bucketType, bucket);
StoreBucketProperties newBucketProperties = new StoreBucketProperties.Builder(ns).withAllowMulti(false).build();
riakClient.execute(newBucketProperties);
}
Aggregations