HBASE-7642. HBase shell cannot set Compression

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1437099 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Enis Soztutar 2013-01-22 18:59:07 +00:00
parent b25c40ac1a
commit 14a20fceee
1 changed files with 4 additions and 4 deletions

View File

@ -605,10 +605,10 @@ module Hbase
end end
if arg.include?(org.apache.hadoop.hbase.HColumnDescriptor::COMPRESSION) if arg.include?(org.apache.hadoop.hbase.HColumnDescriptor::COMPRESSION)
compression = arg.delete(org.apache.hadoop.hbase.HColumnDescriptor::COMPRESSION).upcase compression = arg.delete(org.apache.hadoop.hbase.HColumnDescriptor::COMPRESSION).upcase
unless org.apache.hadoop.hbase.io.hfile.Compression::Algorithm.constants.include?(compression) unless org.apache.hadoop.hbase.io.compress.Compression::Algorithm.constants.include?(compression)
raise(ArgumentError, "Compression #{compression} is not supported. Use one of " + org.apache.hadoop.hbase.io.hfile.Compression::Algorithm.constants.join(" ")) raise(ArgumentError, "Compression #{compression} is not supported. Use one of " + org.apache.hadoop.hbase.io.compress.Compression::Algorithm.constants.join(" "))
else else
family.setCompressionType(org.apache.hadoop.hbase.io.hfile.Compression::Algorithm.valueOf(compression)) family.setCompressionType(org.apache.hadoop.hbase.io.compress.Compression::Algorithm.valueOf(compression))
end end
end end