diff --git a/asynchbase/src/main/java/com/yahoo/ycsb/db/AsyncHBaseClient.java b/asynchbase/src/main/java/com/yahoo/ycsb/db/AsyncHBaseClient.java index fddd1a7aef..eecbee36f9 100644 --- a/asynchbase/src/main/java/com/yahoo/ycsb/db/AsyncHBaseClient.java +++ b/asynchbase/src/main/java/com/yahoo/ycsb/db/AsyncHBaseClient.java @@ -39,6 +39,9 @@ import com.yahoo.ycsb.DBException; import com.yahoo.ycsb.Status; +import static com.yahoo.ycsb.workloads.CoreWorkload.TABLENAME_PROPERTY; +import static com.yahoo.ycsb.workloads.CoreWorkload.TABLENAME_PROPERTY_DEFAULT; + /** * Alternative Java client for Apache HBase. * @@ -140,7 +143,7 @@ public void init() throws DBException { // Terminate right now if table does not exist, since the client // will not propagate this error upstream once the workload // starts. - String table = com.yahoo.ycsb.workloads.CoreWorkload.table; + String table = getProperties().getProperty(TABLENAME_PROPERTY, TABLENAME_PROPERTY_DEFAULT); try { client.ensureTableExists(table).join(joinTimeout); } catch (InterruptedException e1) { diff --git a/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java b/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java index 422dc05475..f84ddb30de 100644 --- a/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java +++ b/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java @@ -1,12 +1,12 @@ /** * Copyright (c) 2010 Yahoo! Inc., Copyright (c) 2016 YCSB contributors. All rights reserved. - * + *

* Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at - * + *

* http://www.apache.org/licenses/LICENSE-2.0 - * + *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or @@ -17,39 +17,18 @@ package com.yahoo.ycsb.workloads; -import java.util.Properties; - import com.yahoo.ycsb.*; -import com.yahoo.ycsb.generator.AcknowledgedCounterGenerator; -import com.yahoo.ycsb.generator.ConstantIntegerGenerator; -import com.yahoo.ycsb.generator.CounterGenerator; -import com.yahoo.ycsb.generator.DiscreteGenerator; -import com.yahoo.ycsb.generator.ExponentialGenerator; -import com.yahoo.ycsb.generator.HistogramGenerator; -import com.yahoo.ycsb.generator.HotspotIntegerGenerator; -import com.yahoo.ycsb.generator.NumberGenerator; -import com.yahoo.ycsb.generator.ScrambledZipfianGenerator; -import com.yahoo.ycsb.generator.SequentialGenerator; -import com.yahoo.ycsb.generator.SkewedLatestGenerator; -import com.yahoo.ycsb.generator.UniformIntegerGenerator; -import com.yahoo.ycsb.generator.ZipfianGenerator; +import com.yahoo.ycsb.generator.*; import com.yahoo.ycsb.measurements.Measurements; import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Vector; - +import java.util.*; /** * The core benchmark scenario. Represents a set of clients doing simple CRUD operations. The * relative proportion of different kinds of operations, and other properties of the workload, * are controlled by parameters specified at runtime. - * + *

* Properties to control the client: *