You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Wei-Chiu Chuang (JIRA)" <ji...@apache.org> on 2018/07/07 03:14:00 UTC

[jira] [Commented] (HBASE-20859) Backup and incremental load could fail in secure clusters

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

Wei-Chiu Chuang commented on HBASE-20859:
-----------------------------------------

Attach a patch to address the said problem. Also included is a test for regression purposes. I thought of making a full-blown test to reproduce the exact problem, but felt that's an overkill. A short & sweet test should be enough to demonstrate the problem and avoid future regression.

> Backup and incremental load could fail in secure clusters
> ---------------------------------------------------------
>
>                 Key: HBASE-20859
>                 URL: https://issues.apache.org/jira/browse/HBASE-20859
>             Project: HBase
>          Issue Type: Bug
>          Components: backup&amp;restore
>    Affects Versions: 2.0.0
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Major
>         Attachments: HBASE-20859.master.001.patch, HBASE-20859.master.002.patch
>
>
> HBase Backup and incremental load uses HConstants.DEFAULT_TEMPORARY_HDFS_DIRECTORY for temporary path.
> HConstants.DEFAULT_TEMPORARY_HDFS_DIRECTORY uses the Java runtime user name to generate a temporary path on HDFS. This can be a wrong assumption in a secure cluster where Kerberos principal name can be different from the system user name.
> {code:java}
> public static final String DEFAULT_TEMPORARY_HDFS_DIRECTORY = "/user/"
>       + System.getProperty("user.name") + "/hbase-staging";
> {code}
> This constant variable is used in BackupUtils.java and HFileOutputFormat2.java
> In such cases, you will not be able to write files to the temporary location on HDFS due to permission error, and therefore operations such as backup will fail.
> This bug is similar in nature to HDFS-12485.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)