Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 79783200B81 for ; Tue, 30 Aug 2016 01:01:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 77D2E160AB8; Mon, 29 Aug 2016 23:01:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BD6BD160AC8 for ; Tue, 30 Aug 2016 01:01:22 +0200 (CEST) Received: (qmail 36918 invoked by uid 500); 29 Aug 2016 23:01:21 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 36906 invoked by uid 99); 29 Aug 2016 23:01:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2016 23:01:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9E9D32C0156 for ; Mon, 29 Aug 2016 23:01:21 +0000 (UTC) Date: Mon, 29 Aug 2016 23:01:21 +0000 (UTC) From: "Vladimir Rodionov (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16521) Restore operation would fail if the hbase.tmp.dir directory is absent or doesn't give proper permission MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 29 Aug 2016 23:01:23 -0000 [ https://issues.apache.org/jira/browse/HBASE-16521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15447333#comment-15447333 ] Vladimir Rodionov commented on HBASE-16521: ------------------------------------------- Please use the following code to init tmp dir: {code} String hbaseTmpFsDir = conf.get(HConstants.TEMPORARY_FS_DIRECTORY_KEY, HConstants.DEFAULT_TEMPORARY_HDFS_DIRECTORY); {code} This looks more safe. > Restore operation would fail if the hbase.tmp.dir directory is absent or doesn't give proper permission > ------------------------------------------------------------------------------------------------------- > > Key: HBASE-16521 > URL: https://issues.apache.org/jira/browse/HBASE-16521 > Project: HBase > Issue Type: Bug > Reporter: Ted Yu > Assignee: Ted Yu > Labels: backup > Attachments: 16521.v1.txt > > > I ran backup IT test and bumped into the following: > {code} > 2016-08-29 20:38:31,390 INFO [main] mapreduce.Job: Job job_1472498400634_0004 failed with state FAILED due to: Job setup failed : org.apache.hadoop.security.AccessControlException: Permission denied: user=hbase, access=WRITE, inode="/tmp/hbase-hbase/bulk_output-default-IntegrationTestBackupRestore.table1-1472503079471/_temporary/1":hdfs:hdfs:drwxr-xr-x > at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:319) > at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:292) > at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:213) > at org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer$RangerAccessControlEnforcer.checkPermission(RangerHdfsAuthorizer.java:307) > at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:190) > at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1827) > at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1811) > at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkAncestorAccess(FSDirectory.java:1794) > at org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.mkdirs(FSDirMkdirOp.java:71) > at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:4011) > at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs(NameNodeRpcServer.java:1102) > at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs(ClientNamenodeProtocolServerSideTranslatorPB.java:630) > {code} > Here is related code in MapReduceRestoreService : > {code} > private Path getBulkOutputDir(String tableName) throws IOException > { > Configuration conf = getConf(); > FileSystem fs = FileSystem.get(conf); > String tmp = conf.get("hbase.tmp.dir"); > Path path = new Path(tmp + Path.SEPARATOR + "bulk_output-"+tableName + "-" > + EnvironmentEdgeManager.currentTime()); > {code} > conf.get("hbase.tmp.dir") returned /tmp/hbase-hbase which was not created on hdfs. > We should use hbase.fs.tmp.dir as the base dir to avoid the above permission error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)