You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jeffrey Zhong (JIRA)" <ji...@apache.org> on 2014/09/05 20:58:29 UTC

[jira] [Commented] (HBASE-8495) Change ownership of the directory to bulk load

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

Jeffrey Zhong commented on HBASE-8495:
--------------------------------------

[~mbertozzi] We also see the same issue. It seems that the fix can only work for cases when bulk loaded files needs split as shown the code below. Thanks.
{code}
    if (!lastKeyInRange) {
      List<LoadQueueItem> lqis = splitStoreFile(item, table,
          startEndKeys.getFirst()[indexForCallable],
          startEndKeys.getSecond()[indexForCallable]);
      return lqis;
    }
{code} 

> Change ownership of the directory to bulk load
> ----------------------------------------------
>
>                 Key: HBASE-8495
>                 URL: https://issues.apache.org/jira/browse/HBASE-8495
>             Project: HBase
>          Issue Type: Improvement
>          Components: mapreduce
>    Affects Versions: 0.94.7, 0.95.0
>            Reporter: Matteo Bertozzi
>            Assignee: Matteo Bertozzi
>            Priority: Trivial
>             Fix For: 0.99.0, 0.94.21, 0.98.4
>
>         Attachments: HBASE-8495-0.94-v0.patch
>
>
> To bulk load something you need to change the ownership of the data directory to allow the hbase user to read and move the files, also in the split case you must use the hbase user to run the LoadIncrementalHFiles tool, since internally some directories "_tmp" are created to add the split reference files.
> In a secure cluster, the SecureBulkLoadEndPoint will take care of this problem by doing a chmod 777 on the directory to bulk load.
> NOTE that a chown is not possible since you must be a super user to change the ownership, a change group may be possible but the user must be in the hbase group... and anyway it will require a chmod to allow the group to perform the move.
> {code}
> Caused by: org.apache.hadoop.security.AccessControlException: Permission denied: user=hbase, access=WRITE, inode="/test/cf":th30z:supergroup:drwxr-xr-x
> 	at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:205)
> Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(java.io.IOException): java.io.IOException: Exception in rename
> 	at org.apache.hadoop.hbase.regionserver.HRegionFileSystem.rename(HRegionFileSystem.java:928)
> 	at org.apache.hadoop.hbase.regionserver.HRegionFileSystem.commitStoreFile(HRegionFileSystem.java:340)
> 	at org.apache.hadoop.hbase.regionserver.HRegionFileSystem.bulkLoadStoreFile(HRegionFileSystem.java:414)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)