[ 
https://issues.apache.org/jira/browse/HBASE-25609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17291363#comment-17291363
 ] 

shenshengli commented on HBASE-25609:
-------------------------------------

Before hbase-20819, this caused the Hbase shell to fail to create a table with 
SPLITS_FILE.because the setValue method in HTableDescriptor is:
{code:java}
public HTableDescriptor setValue(String key, String value) {
 getDelegateeForModification().setValue(key, value);
 return this;
}{code}
After hbase-20819,The problem doesn't seem so serious because the setValue 
method in TableDescriptorBuilder is:

 
{code:java}
public TableDescriptorBuilder setValue(final String key, final String value) {
 desc.setValue(key, value);
 return this;
}
public ModifyableTableDescriptor setValue(String key, String value) {
 return setValue(toBytesOrNull(key, Bytes::toBytes),
 toBytesOrNull(value, Bytes::toBytes));
}
{code}
 

> There is a problem with the SPLITS_FILE in the HBase shell statement
> --------------------------------------------------------------------
>
>                 Key: HBASE-25609
>                 URL: https://issues.apache.org/jira/browse/HBASE-25609
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: shenshengli
>            Assignee: shenshengli
>            Priority: Minor
>
> The Ruby script here has a problem passing in a null value:
>  hbase-shell/src/main/ruby/hbase/admin.rb
> {code:java}
> if arg.key?(SPLITS_FILE)
>  splits_file = arg.delete(SPLITS_FILE)
>  unless File.exist?(splits_file)
>  raise(ArgumentError, "Splits file #{splits_file} doesn't exist")
>  end
>  arg[SPLITS] = []
>  File.foreach(splits_file) do |line|
>  arg[SPLITS].push(line.chomp)
>  end
>  tdb.setValue(SPLITS_FILE, arg[SPLITS_FILE]){code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to