You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by en...@apache.org on 2015/12/08 20:27:09 UTC
[3/3] hbase git commit: HBASE-14804 HBase shell's create table
command ignores 'NORMALIZATION_ENABLED' attribute (Jean-Marc Spaggiari)
HBASE-14804 HBase shell's create table command ignores 'NORMALIZATION_ENABLED' attribute (Jean-Marc Spaggiari)
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e8c3899d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e8c3899d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e8c3899d
Branch: refs/heads/branch-1.2
Commit: e8c3899d47737b627d250bdf6e03ace038402569
Parents: 1bcb2c6
Author: Enis Soztutar <en...@apache.org>
Authored: Tue Dec 8 11:13:39 2015 -0800
Committer: Enis Soztutar <en...@apache.org>
Committed: Tue Dec 8 11:14:57 2015 -0800
----------------------------------------------------------------------
hbase-shell/src/main/ruby/hbase/admin.rb | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/e8c3899d/hbase-shell/src/main/ruby/hbase/admin.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/hbase/admin.rb b/hbase-shell/src/main/ruby/hbase/admin.rb
index f57fcb8..527ead3 100644
--- a/hbase-shell/src/main/ruby/hbase/admin.rb
+++ b/hbase-shell/src/main/ruby/hbase/admin.rb
@@ -235,6 +235,12 @@ module Hbase
end
#----------------------------------------------------------------------------------------------
+ # Parse arguments and update HTableDescriptor accordingly
+ def parse_htd_args(htd, arg)
+ htd.setNormalizationEnabled(JBoolean.valueOf(arg.delete(NORMALIZATION_ENABLED))) if arg[NORMALIZATION_ENABLED]
+ end
+
+ #----------------------------------------------------------------------------------------------
# Creates a table
def create(table_name, *args)
# Fail if table name is not a string
@@ -327,6 +333,7 @@ module Hbase
end
end
htd.setDurability(org.apache.hadoop.hbase.client.Durability.valueOf(arg.delete(DURABILITY))) if arg[DURABILITY]
+ parse_htd_args(htd, arg)
set_user_metadata(htd, arg.delete(METADATA)) if arg[METADATA]
set_descriptor_config(htd, arg.delete(CONFIGURATION)) if arg[CONFIGURATION]
@@ -580,8 +587,7 @@ module Hbase
htd.setMaxFileSize(JLong.valueOf(arg.delete(MAX_FILESIZE))) if arg[MAX_FILESIZE]
htd.setReadOnly(JBoolean.valueOf(arg.delete(READONLY))) if arg[READONLY]
htd.setCompactionEnabled(JBoolean.valueOf(arg[COMPACTION_ENABLED])) if arg[COMPACTION_ENABLED]
- htd.setNormalizationEnabled(
- JBoolean.valueOf(arg[NORMALIZATION_ENABLED])) if arg[NORMALIZATION_ENABLED]
+ parse_htd_args(htd, arg)
htd.setMemStoreFlushSize(JLong.valueOf(arg.delete(MEMSTORE_FLUSHSIZE))) if arg[MEMSTORE_FLUSHSIZE]
# DEFERRED_LOG_FLUSH is deprecated and was replaced by DURABILITY. To keep backward compatible, it still exists.
# However, it has to be set before DURABILITY so that DURABILITY could overwrite if both args are set