hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1356569 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java
Date Tue, 03 Jul 2012 04:36:23 GMT
Author: apurtell
Date: Tue Jul  3 04:36:22 2012
New Revision: 1356569

URL: http://svn.apache.org/viewvc?rev=1356569&view=rev
Log:
Amend HBASE-6303. Likewise for HCD.setCompactionCompressionType

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java?rev=1356569&r1=1356568&r2=1356569&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java Tue Jul
 3 04:36:22 2012
@@ -640,14 +640,7 @@ public class HColumnDescriptor implement
    */
   public HColumnDescriptor setCompactionCompressionType(
       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_COMPACT, compressionType);
+    return setValue(COMPRESSION_COMPACT, type.getName().toUpperCase());
   }
 
   /**



Mime
View raw message