Search in sources :

Example 6 with CoreWorkload

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();
}
Also used : CoreWorkload(site.ycsb.workloads.CoreWorkload) Configuration(org.apache.hadoop.conf.Configuration) Properties(java.util.Properties) Before(org.junit.Before)

Example 7 with CoreWorkload

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();
}
Also used : CoreWorkload(site.ycsb.workloads.CoreWorkload) Properties(java.util.Properties) Before(org.junit.Before)

Example 8 with CoreWorkload

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();
}
Also used : CoreWorkload(site.ycsb.workloads.CoreWorkload) Configuration(org.apache.hadoop.conf.Configuration)

Aggregations

CoreWorkload (site.ycsb.workloads.CoreWorkload)8 Properties (java.util.Properties)7 Before (org.junit.Before)7 Configuration (org.apache.hadoop.conf.Configuration)2 ColumnInfo (com.toshiba.mwcloud.gs.ColumnInfo)1 ContainerInfo (com.toshiba.mwcloud.gs.ContainerInfo)1 GSException (com.toshiba.mwcloud.gs.GSException)1 ArrayList (java.util.ArrayList)1 DBException (site.ycsb.DBException)1