stack commented on HBASE-16826:

Tooling in hbase generally sets defaultFS.

In ruby scripts in bin we do:

config = HBaseConfiguration.create
config.set 'fs.defaultFS', config.get(HConstants::HBASE_DIR)

The daemons starting up do this first thing.

So makes sense amending tools to do this too (Expecting core-site has not been 
a requirement up to this).

Suggest you copy what the regionserver does starting up:

    // Set 'fs.defaultFS' to match the filesystem on hbase.rootdir else
    // underlying hadoop hdfs accessors will be going against wrong filesystem
    // (unless all is set to defaults).
    FSUtils.setFsDefault(this.conf, FSUtils.getRootDir(this.conf));

The patch does unnecessary converstions if I read it right. See what getRootDir 
is doing internally (including qualifying the returned Path).

> Backup command-line tool fails if defaultFS is not set in configuration
> -----------------------------------------------------------------------
>                 Key: HBASE-16826
>                 URL: https://issues.apache.org/jira/browse/HBASE-16826
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Vladimir Rodionov
>            Assignee: Vladimir Rodionov
>             Fix For: 2.0.0
>         Attachments: HBASE-16826-v1.patch

This message was sent by Atlassian JIRA

Reply via email to