HBASE-14804 HBase shell's create table command ignores 'NORMALIZATION_ENABLED' attribute (Jean-Marc Spaggiari)
This commit is contained in:
parent
1f999c1e2b
commit
63f2ebca13
|
@ -267,6 +267,12 @@ module Hbase
|
||||||
org.apache.hadoop.hbase.zookeeper.ZKUtil::dump(@zk_wrapper)
|
org.apache.hadoop.hbase.zookeeper.ZKUtil::dump(@zk_wrapper)
|
||||||
end
|
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
|
# Creates a table
|
||||||
def create(table_name, *args)
|
def create(table_name, *args)
|
||||||
|
@ -360,6 +366,7 @@ module Hbase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
htd.setDurability(org.apache.hadoop.hbase.client.Durability.valueOf(arg.delete(DURABILITY))) if arg[DURABILITY]
|
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_user_metadata(htd, arg.delete(METADATA)) if arg[METADATA]
|
||||||
set_descriptor_config(htd, arg.delete(CONFIGURATION)) if arg[CONFIGURATION]
|
set_descriptor_config(htd, arg.delete(CONFIGURATION)) if arg[CONFIGURATION]
|
||||||
|
|
||||||
|
@ -613,8 +620,7 @@ module Hbase
|
||||||
htd.setMaxFileSize(JLong.valueOf(arg.delete(MAX_FILESIZE))) if arg[MAX_FILESIZE]
|
htd.setMaxFileSize(JLong.valueOf(arg.delete(MAX_FILESIZE))) if arg[MAX_FILESIZE]
|
||||||
htd.setReadOnly(JBoolean.valueOf(arg.delete(READONLY))) if arg[READONLY]
|
htd.setReadOnly(JBoolean.valueOf(arg.delete(READONLY))) if arg[READONLY]
|
||||||
htd.setCompactionEnabled(JBoolean.valueOf(arg[COMPACTION_ENABLED])) if arg[COMPACTION_ENABLED]
|
htd.setCompactionEnabled(JBoolean.valueOf(arg[COMPACTION_ENABLED])) if arg[COMPACTION_ENABLED]
|
||||||
htd.setNormalizationEnabled(
|
parse_htd_args(htd, arg)
|
||||||
JBoolean.valueOf(arg[NORMALIZATION_ENABLED])) if arg[NORMALIZATION_ENABLED]
|
|
||||||
htd.setMemStoreFlushSize(JLong.valueOf(arg.delete(MEMSTORE_FLUSHSIZE))) if arg[MEMSTORE_FLUSHSIZE]
|
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.
|
# 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
|
# However, it has to be set before DURABILITY so that DURABILITY could overwrite if both args are set
|
||||||
|
|
Loading…
Reference in New Issue