use of site.ycsb.workloads.CoreWorkload in project YCSB by brianfrankcooper.
the class HBaseClient1Test method setUp.
/**
* Sets up the mini-cluster for testing.
*
* We re-create the table for each test.
*/
@Before
public void setUp() throws Exception {
client = new HBaseClient1();
client.setConfiguration(new Configuration(testingUtil.getConfiguration()));
Properties p = new Properties();
p.setProperty("columnfamily", COLUMN_FAMILY);
Measurements.setProperties(p);
final CoreWorkload workload = new CoreWorkload();
workload.init(p);
tableName = p.getProperty(TABLENAME_PROPERTY, TABLENAME_PROPERTY_DEFAULT);
table = testingUtil.createTable(TableName.valueOf(tableName), Bytes.toBytes(COLUMN_FAMILY));
client.setProperties(p);
client.init();
}
use of site.ycsb.workloads.CoreWorkload in project YCSB by brianfrankcooper.
the class ZKClientTest method setUp.
@Before
public void setUp() throws Exception {
client = new ZKClient();
Properties p = new Properties();
p.setProperty("zookeeper.connectString", "127.0.0.1:" + String.valueOf(PORT));
Measurements.setProperties(p);
final CoreWorkload workload = new CoreWorkload();
workload.init(p);
tableName = p.getProperty(TABLENAME_PROPERTY, TABLENAME_PROPERTY_DEFAULT);
client.setProperties(p);
client.init();
}
use of site.ycsb.workloads.CoreWorkload in project YCSB by brianfrankcooper.
the class HBaseClient2Test method setUp.
/**
* Re-create the table for each test. Using custom properties.
*/
public void setUp(Properties p) throws Exception {
client = new HBaseClient2();
client.setConfiguration(new Configuration(testingUtil.getConfiguration()));
p.setProperty("columnfamily", COLUMN_FAMILY);
Measurements.setProperties(p);
final CoreWorkload workload = new CoreWorkload();
workload.init(p);
tableName = p.getProperty(TABLENAME_PROPERTY, TABLENAME_PROPERTY_DEFAULT);
table = testingUtil.createTable(TableName.valueOf(tableName), Bytes.toBytes(COLUMN_FAMILY));
client.setProperties(p);
client.init();
}
Aggregations