@@ -415,6 +415,7 @@ protected static TableDescriptor getTableDescriptor(TestOptions opts) {
415
415
ColumnFamilyDescriptorBuilder .newBuilder (familyName );
416
416
cfBuilder .setDataBlockEncoding (opts .blockEncoding );
417
417
cfBuilder .setCompressionType (opts .compression );
418
+ cfBuilder .setEncryptionType (opts .encryption );
418
419
cfBuilder .setBloomFilterType (opts .bloomType );
419
420
cfBuilder .setBlocksize (opts .blockSize );
420
421
if (opts .inMemoryCF ) {
@@ -707,6 +708,7 @@ static class TestOptions {
707
708
int replicas = TableDescriptorBuilder .DEFAULT_REGION_REPLICATION ;
708
709
String splitPolicy = null ;
709
710
Compression .Algorithm compression = Compression .Algorithm .NONE ;
711
+ String encryption = null ;
710
712
BloomType bloomType = BloomType .ROW ;
711
713
int blockSize = HConstants .DEFAULT_BLOCKSIZE ;
712
714
DataBlockEncoding blockEncoding = DataBlockEncoding .NONE ;
@@ -762,6 +764,7 @@ public TestOptions(TestOptions that) {
762
764
this .replicas = that .replicas ;
763
765
this .splitPolicy = that .splitPolicy ;
764
766
this .compression = that .compression ;
767
+ this .encryption = that .encryption ;
765
768
this .blockEncoding = that .blockEncoding ;
766
769
this .filterAll = that .filterAll ;
767
770
this .bloomType = that .bloomType ;
@@ -951,6 +954,10 @@ public void setCompression(Compression.Algorithm compression) {
951
954
this .compression = compression ;
952
955
}
953
956
957
+ public void setEncryption (String encryption ) {
958
+ this .encryption = encryption ;
959
+ }
960
+
954
961
public void setBloomType (BloomType bloomType ) {
955
962
this .bloomType = bloomType ;
956
963
}
@@ -1063,6 +1070,10 @@ public Compression.Algorithm getCompression() {
1063
1070
return compression ;
1064
1071
}
1065
1072
1073
+ public String getEncryption () {
1074
+ return encryption ;
1075
+ }
1076
+
1066
1077
public DataBlockEncoding getBlockEncoding () {
1067
1078
return blockEncoding ;
1068
1079
}
@@ -2617,6 +2628,7 @@ protected static void printUsage(final String shortName, final String message) {
2617
2628
+ " use size to specify the end range and --rows"
2618
2629
+ " specifies the number of rows within that range. " + "Default: 1.0." );
2619
2630
System .err .println (" compress Compression type to use (GZ, LZO, ...). Default: 'NONE'" );
2631
+ System .err .println (" encryption Encryption type to use (AES, ...). Default: 'NONE'" );
2620
2632
System .err .println (
2621
2633
" flushCommits Used to determine if the test should flush the table. " + "Default: false" );
2622
2634
System .err .println (" valueZipf Set if we should vary value size between 0 and "
@@ -2742,6 +2754,12 @@ static TestOptions parseOpts(Queue<String> args) {
2742
2754
continue ;
2743
2755
}
2744
2756
2757
+ final String encryption = "--encryption=" ;
2758
+ if (cmd .startsWith (encryption )) {
2759
+ opts .encryption = cmd .substring (encryption .length ());
2760
+ continue ;
2761
+ }
2762
+
2745
2763
final String traceRate = "--traceRate=" ;
2746
2764
if (cmd .startsWith (traceRate )) {
2747
2765
opts .traceRate = Double .parseDouble (cmd .substring (traceRate .length ()));
0 commit comments