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 7711A200BAD for ; Tue, 25 Oct 2016 20:41:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 75CB7160AFA; Tue, 25 Oct 2016 18:41:00 +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 C3F56160AD8 for ; Tue, 25 Oct 2016 20:40:59 +0200 (CEST) Received: (qmail 85544 invoked by uid 500); 25 Oct 2016 18:40:58 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 85522 invoked by uid 99); 25 Oct 2016 18:40:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2016 18:40:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6079D2C1F56 for ; Tue, 25 Oct 2016 18:40:58 +0000 (UTC) Date: Tue, 25 Oct 2016 18:40:58 +0000 (UTC) From: "Hudson (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MAPREDUCE-6792) Allow user's full principal name as owner of MapReduce staging directory in JobSubmissionFiles#JobStagingDir() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 25 Oct 2016 18:41:00 -0000 [ https://issues.apache.org/jira/browse/MAPREDUCE-6792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15606116#comment-15606116 ] Hudson commented on MAPREDUCE-6792: ----------------------------------- SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10675 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/10675/]) MAPREDUCE-6792. Allow user's full principal name as owner of MapReduce (junping_du: rev 9b7ce948a52f4ef433dc958ec891b669a669d7c2) * (edit) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobSubmissionFiles.java * (add) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapreduce/TestJobSubmissionFiles.java > Allow user's full principal name as owner of MapReduce staging directory in JobSubmissionFiles#JobStagingDir() > -------------------------------------------------------------------------------------------------------------- > > Key: MAPREDUCE-6792 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-6792 > Project: Hadoop Map/Reduce > Issue Type: Improvement > Components: client > Reporter: Santhosh G Nayak > Assignee: Santhosh G Nayak > Fix For: 2.9.0, 3.0.0-alpha2 > > Attachments: MAPREDUCE-6792.1.patch, MAPREDUCE-6792.2.patch, MAPREDUCE-6792.3.patch > > > Background - > Currently, {{JobSubmissionFiles#JobStagingDir()}} assumes that file owner returned as part of {{FileSystem#getFileStatus()}} is always user's short principal name, which is true for HDFS. But, some file systems which are HDFS compatible like [Azure Data Lake Store (ADLS) |https://azure.microsoft.com/en-in/services/data-lake-store/] and work in multi tenant environment can have users with same names belonging to different domains. For example, {{user1@company1.com}} and {{user1@company2.com}}. It will be ambiguous, if {{FileSystem#getFileStatus()}} returns only the user's short principal name (without domain name) as the owner of the file/directory. > The following code block allows only short user principal name as owner. It simply fails saying that ownership on the staging directory is not as expected, if owner returned by the {{FileStatus#getOwner()}} is not equal to short principal name of the current user. > {code} > String realUser; > String currentUser; > UserGroupInformation ugi = UserGroupInformation.getLoginUser(); > realUser = ugi.getShortUserName(); > currentUser = UserGroupInformation.getCurrentUser().getShortUserName(); > if (fs.exists(stagingArea)) { > FileStatus fsStatus = fs.getFileStatus(stagingArea); > String owner = fsStatus.getOwner(); > if (!(owner.equals(currentUser) || owner.equals(realUser))) { > throw new IOException("The ownership on the staging directory " + > stagingArea + " is not as expected. " + > "It is owned by " + owner + ". The directory must " + > "be owned by the submitter " + currentUser + " or " + > "by " + realUser); > } > {code} > The proposal is to remove the strict restriction on short principal name by allowing the user's full principal name as owner of staging area directory in {{JobSubmissionFiles#JobStagingDir()}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org