From 13209bce060e777ae1f5fd655142372a6f918eef Mon Sep 17 00:00:00 2001 From: Sergey Soldatov Date: Tue, 21 Nov 2017 20:39:37 +0800 Subject: [PATCH] HBASE-19304 KEEP_DELETED_CELLS should ignore case Signed-off-by: Chia-Ping Tsai --- .../main/java/org/apache/hadoop/hbase/KeepDeletedCells.java | 3 +++ .../hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/KeepDeletedCells.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/KeepDeletedCells.java index 32b6aa7514c..dd19fa1c227 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/KeepDeletedCells.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/KeepDeletedCells.java @@ -45,4 +45,7 @@ public enum KeepDeletedCells { * time remove deleted cells after the TTL. */ TTL; + public static KeepDeletedCells getValue(String val) { + return valueOf(val.toUpperCase()); + } } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java index 14f7381f7dc..c18e4deb316 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java @@ -898,7 +898,8 @@ public class ColumnFamilyDescriptorBuilder { @Override public KeepDeletedCells getKeepDeletedCells() { - return getStringOrDefault(KEEP_DELETED_CELLS_BYTES, KeepDeletedCells::valueOf, DEFAULT_KEEP_DELETED); + return getStringOrDefault(KEEP_DELETED_CELLS_BYTES, + KeepDeletedCells::getValue, DEFAULT_KEEP_DELETED); } /**