diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java index e46d64f9268..1393e74c667 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java @@ -595,14 +595,7 @@ public class HColumnDescriptor implements WritableComparable * @return this (for chained invocation) */ public HColumnDescriptor setCompressionType(Compression.Algorithm type) { - String compressionType; - switch (type) { - case LZO: compressionType = "LZO"; break; - case GZ: compressionType = "GZ"; break; - case SNAPPY: compressionType = "SNAPPY"; break; - default: compressionType = "NONE"; break; - } - return setValue(COMPRESSION, compressionType); + return setValue(COMPRESSION, type.getName().toUpperCase()); } /** @return data block encoding algorithm used on disk */