Search in sources :

Example 1 with CoreWorkload

use of com.yahoo.ycsb.workloads.CoreWorkload in project YCSB by brianfrankcooper.

the class AccumuloTest method client.

@Before
public void client() throws Exception {
    LOG.debug("Loading workload properties for {}", test.getMethodName());
    workloadProps = new Properties();
    workloadProps.load(getClass().getResourceAsStream("/workloads/" + test.getMethodName()));
    for (String prop : properties.stringPropertyNames()) {
        workloadProps.setProperty(prop, properties.getProperty(prop));
    }
    // TODO we need a better test rig for 'run this ycsb workload'
    LOG.debug("initializing measurements and workload");
    Measurements.setProperties(workloadProps);
    workload = new CoreWorkload();
    workload.init(workloadProps);
    LOG.debug("initializing client");
    client = new AccumuloClient();
    client.setProperties(workloadProps);
    client.init();
}
Also used : CoreWorkload(com.yahoo.ycsb.workloads.CoreWorkload) Properties(java.util.Properties) Before(org.junit.Before)

Example 2 with CoreWorkload

use of com.yahoo.ycsb.workloads.CoreWorkload in project YCSB by brianfrankcooper.

the class AsyncHBaseTest method setUp.

/**
   * Sets up the mini-cluster for testing.
   *
   * We re-create the table for each test.
   */
@Before
public void setUp() throws Exception {
    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));
    final String zkQuorum = "127.0.0.1:" + testingUtil.getZkCluster().getClientPort();
    p.setProperty("hbase.zookeeper.quorum", zkQuorum);
    client = new AsyncHBaseClient();
    client.setProperties(p);
    client.init();
}
Also used : CoreWorkload(com.yahoo.ycsb.workloads.CoreWorkload) Properties(java.util.Properties) Before(org.junit.Before)

Example 3 with CoreWorkload

use of com.yahoo.ycsb.workloads.CoreWorkload in project YCSB by brianfrankcooper.

the class CassandraCQLClientTest method setUp.

@Before
public void setUp() throws Exception {
    session = cassandraUnit.getSession();
    Properties p = new Properties();
    p.setProperty("hosts", HOST);
    p.setProperty("port", Integer.toString(PORT));
    p.setProperty("table", TABLE);
    Measurements.setProperties(p);
    final CoreWorkload workload = new CoreWorkload();
    workload.init(p);
    client = new CassandraCQLClient();
    client.setProperties(p);
    client.init();
}
Also used : CoreWorkload(com.yahoo.ycsb.workloads.CoreWorkload) Properties(java.util.Properties) Before(org.junit.Before)

Example 4 with CoreWorkload

use of com.yahoo.ycsb.workloads.CoreWorkload in project YCSB by brianfrankcooper.

the class HBaseClient10Test 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 HBaseClient10();
    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(com.yahoo.ycsb.workloads.CoreWorkload) Configuration(org.apache.hadoop.conf.Configuration) Properties(java.util.Properties) Before(org.junit.Before)

Aggregations

CoreWorkload (com.yahoo.ycsb.workloads.CoreWorkload)4 Properties (java.util.Properties)4 Before (org.junit.Before)4 Configuration (org.apache.hadoop.conf.Configuration)1