Merge pull request #117 from gelin/fieldnameprefix

Conflicts:
	core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java
	doc/coreproperties.html
	hbase/src/main/java/com/yahoo/ycsb/db/HBaseClient.java
This commit is contained in:
Sean Busbey 2018-09-04 22:55:50 -05:00
Родитель b31a5681b9 fddf3e65ae
Коммит c99a7e4a59
2 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -61,6 +61,8 @@ import java.util.*;
* digits in the record number.
* <LI><b>insertorder</b>: should records be inserted in order by key ("ordered"), or in hashed
* order ("hashed") (default: hashed)
* <LI><b>fieldnameprefix</b>: what should be a prefix for field names, the shorter may decrease the
* required storage size (default: "field")
* </ul>
*/
public class CoreWorkload extends Workload {
@ -329,6 +331,16 @@ public class CoreWorkload extends Workload {
public static final String INSERTION_RETRY_INTERVAL = "core_workload_insertion_retry_interval";
public static final String INSERTION_RETRY_INTERVAL_DEFAULT = "3";
/**
* Field name prefix.
*/
public static final String FIELD_NAME_PREFIX = "fieldnameprefix";
/**
* Default value of the field name prefix.
*/
public static final String FIELD_NAME_PREFIX_DEFAULT = "field";
protected NumberGenerator keysequence;
protected DiscreteGenerator operationchooser;
protected NumberGenerator keychooser;
@ -384,9 +396,10 @@ public class CoreWorkload extends Workload {
fieldcount =
Long.parseLong(p.getProperty(FIELD_COUNT_PROPERTY, FIELD_COUNT_PROPERTY_DEFAULT));
final String fieldnameprefix = p.getProperty(FIELD_NAME_PREFIX, FIELD_NAME_PREFIX_DEFAULT);
fieldnames = new ArrayList<>();
for (int i = 0; i < fieldcount; i++) {
fieldnames.add("field" + i);
fieldnames.add(fieldnameprefix + i);
}
fieldlengthgenerator = CoreWorkload.getFieldLengthGenerator(p);

Просмотреть файл

@ -39,7 +39,8 @@ The property files used with the core workload generator can specify values for
<LI><b>requestdistribution</b>: what distribution should be used to select the records to operate on - uniform, zipfian or latest (default: uniform)
<LI><b>maxscanlength</b>: for scans, what is the maximum number of records to scan (default: 1000)
<LI><b>scanlengthdistribution</b>: for scans, what distribution should be used to choose the number of records to scan, for each scan, between 1 and maxscanlength (default: uniform)
<LI><b>insertorder</b>: should records be inserted in order by key ("ordered"), or in hashed order ("hashed") (default: hashed)
<LI><b>insertorder</b>: should records be inserted in order by key ("ordered"), or in hashed order ("hashed") (default: hashed)
<LI><b>fieldnameprefix</b>: string prefix for the field name (default: “field”)
</UL>
<HR>
YCSB - Yahoo! Research - Contact cooperb@yahoo-inc.com.