Return-Path: X-Original-To: apmail-crunch-dev-archive@www.apache.org Delivered-To: apmail-crunch-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0A0B718563 for ; Sun, 10 Apr 2016 23:25:25 +0000 (UTC) Received: (qmail 6790 invoked by uid 500); 10 Apr 2016 23:25:25 -0000 Delivered-To: apmail-crunch-dev-archive@crunch.apache.org Received: (qmail 6712 invoked by uid 500); 10 Apr 2016 23:25:25 -0000 Mailing-List: contact dev-help@crunch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@crunch.apache.org Delivered-To: mailing list dev@crunch.apache.org Received: (qmail 6689 invoked by uid 500); 10 Apr 2016 23:25:25 -0000 Delivered-To: apmail-incubator-crunch-dev@incubator.apache.org Received: (qmail 6683 invoked by uid 99); 10 Apr 2016 23:25:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Apr 2016 23:25:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7BD6C2C1F5D for ; Sun, 10 Apr 2016 23:25:25 +0000 (UTC) Date: Sun, 10 Apr 2016 23:25:25 +0000 (UTC) From: "Igor Bernstein (JIRA)" To: crunch-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CRUNCH-600) Credentials are lost in local runner mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CRUNCH-600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Bernstein updated CRUNCH-600: ---------------------------------- Attachment: (was: CRUNCH-600-b.patch) > Credentials are lost in local runner mode > ----------------------------------------- > > Key: CRUNCH-600 > URL: https://issues.apache.org/jira/browse/CRUNCH-600 > Project: Crunch > Issue Type: Bug > Reporter: Igor Bernstein > Priority: Minor > Attachments: CRUNCH-600-c.patch > > > The credentials attached to a job are lost when CrunchOutputs builds a new Job in getJob. > For example, the following scenario fails: > {code:title=MyTarget.java} > class MyTarget implements MapReduceTarget { > void configureForMapReduce(Job job, PType ptype, Path outputPath, String name) { > job.getCredentials().addSecretKey("myPassword", "secret".getBytes()); > CrunchOutputs.addNamedOutput(job, name, FormatBundle.forOutput(MyOutputFormat.class), Object.class); > } > //.. > } > {code} > {code:title=MyOutputFormat.java} > class MyOutputFormat extends OutputFormat { > public RecordWriter getRecordWriter(TaskAttemptContext context) throws IOException, InterruptedException { > Assert.equals("secret".getBytes(), context.getCredentials().getSecretKey("myPassword")); > } > } > {code} > This happens because CrunchOutputs.getJob copies the baseConf using the base Configuration class and the base Configuration class doesn't have a notion of Credentials, so the credentials get dropped. > This issue only manifests itself when using the local runner. In an actual hadoop cluster the credentials will be inherited from UserGroupInformation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)