diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java index 5f43b073480d..1c5553b3d07e 100644 --- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java +++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java @@ -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) { @@ -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; @@ -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; @@ -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; } @@ -1063,6 +1070,10 @@ public Compression.Algorithm getCompression() { return compression; } + public String getEncryption() { + return encryption; + } + public DataBlockEncoding getBlockEncoding() { return blockEncoding; } @@ -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 " @@ -2742,6 +2754,12 @@ static TestOptions parseOpts(Queue 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()));