You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2022/06/11 13:39:29 UTC
[hbase] branch branch-2.5 updated: HBASE-26923 PerformanceEvaluation support encryption option (#4489)
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.5 by this push:
new c645e216867 HBASE-26923 PerformanceEvaluation support encryption option (#4489)
c645e216867 is described below
commit c645e2168678eb664d32c375e5637a5c3450047a
Author: wenwj0 <36...@users.noreply.github.com>
AuthorDate: Sat Jun 11 20:10:25 2022 +0800
HBASE-26923 PerformanceEvaluation support encryption option (#4489)
Signed-off-by: Duo Zhang <zh...@apache.org>
(cherry picked from commit b7065c1cf5297074e79e5c58b3ee1ba5fd1a7f55)
Conflicts:
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
---
.../org/apache/hadoop/hbase/PerformanceEvaluation.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
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 fe1a89ad0f0..beef9308ca6 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
@@ -406,6 +406,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
HColumnDescriptor familyDesc = new HColumnDescriptor(familyName);
familyDesc.setDataBlockEncoding(opts.blockEncoding);
familyDesc.setCompressionType(opts.compression);
+ familyDesc.setEncryptionType(opts.encryption);
familyDesc.setBloomFilterType(opts.bloomType);
familyDesc.setBlocksize(opts.blockSize);
if (opts.inMemoryCF) {
@@ -698,6 +699,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
int replicas = HTableDescriptor.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;
@@ -753,6 +755,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
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;
@@ -942,6 +945,10 @@ public class PerformanceEvaluation extends Configured implements Tool {
this.compression = compression;
}
+ public void setEncryption(String encryption) {
+ this.encryption = encryption;
+ }
+
public void setBloomType(BloomType bloomType) {
this.bloomType = bloomType;
}
@@ -1054,6 +1061,10 @@ public class PerformanceEvaluation extends Configured implements Tool {
return compression;
}
+ public String getEncryption() {
+ return encryption;
+ }
+
public DataBlockEncoding getBlockEncoding() {
return blockEncoding;
}
@@ -2609,6 +2620,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
+ " 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 "
@@ -2734,6 +2746,12 @@ public class PerformanceEvaluation extends Configured implements Tool {
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()));