Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ protected static TableDescriptor getTableDescriptor(TestOptions opts) {
ColumnFamilyDescriptorBuilder.newBuilder(familyName);
cfBuilder.setDataBlockEncoding(opts.blockEncoding);
cfBuilder.setCompressionType(opts.compression);
cfBuilder.setEncryptionType(opts.encryption);
cfBuilder.setBloomFilterType(opts.bloomType);
cfBuilder.setBlocksize(opts.blockSize);
if (opts.inMemoryCF) {
Expand Down Expand Up @@ -707,6 +708,7 @@ static class TestOptions {
int replicas = TableDescriptorBuilder.DEFAULT_REGION_REPLICATION;
String splitPolicy = null;
Compression.Algorithm compression = Compression.Algorithm.NONE;
String encryption = null;
BloomType bloomType = BloomType.ROW;
int blockSize = HConstants.DEFAULT_BLOCKSIZE;
DataBlockEncoding blockEncoding = DataBlockEncoding.NONE;
Expand Down Expand Up @@ -762,6 +764,7 @@ public TestOptions(TestOptions that) {
this.replicas = that.replicas;
this.splitPolicy = that.splitPolicy;
this.compression = that.compression;
this.encryption = that.encryption;
this.blockEncoding = that.blockEncoding;
this.filterAll = that.filterAll;
this.bloomType = that.bloomType;
Expand Down Expand Up @@ -951,6 +954,10 @@ public void setCompression(Compression.Algorithm compression) {
this.compression = compression;
}

public void setEncryption(String encryption) {
this.encryption = encryption;
}

public void setBloomType(BloomType bloomType) {
this.bloomType = bloomType;
}
Expand Down Expand Up @@ -1063,6 +1070,10 @@ public Compression.Algorithm getCompression() {
return compression;
}

public String getEncryption() {
return encryption;
}

public DataBlockEncoding getBlockEncoding() {
return blockEncoding;
}
Expand Down Expand Up @@ -2617,6 +2628,7 @@ protected static void printUsage(final String shortName, final String message) {
+ " use size to specify the end range and --rows"
+ " specifies the number of rows within that range. " + "Default: 1.0.");
System.err.println(" compress Compression type to use (GZ, LZO, ...). Default: 'NONE'");
System.err.println(" encryption Encryption type to use (AES, ...). Default: 'NONE'");
System.err.println(
" flushCommits Used to determine if the test should flush the table. " + "Default: false");
System.err.println(" valueZipf Set if we should vary value size between 0 and "
Expand Down Expand Up @@ -2742,6 +2754,12 @@ static TestOptions parseOpts(Queue<String> args) {
continue;
}

final String encryption = "--encryption=";
if (cmd.startsWith(encryption)) {
opts.encryption = cmd.substring(encryption.length());
continue;
}

final String traceRate = "--traceRate=";
if (cmd.startsWith(traceRate)) {
opts.traceRate = Double.parseDouble(cmd.substring(traceRate.length()));
Expand Down