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 D4E0019466 for ; Mon, 11 Apr 2016 15:47:25 +0000 (UTC) Received: (qmail 5875 invoked by uid 500); 11 Apr 2016 15:47:25 -0000 Delivered-To: apmail-crunch-dev-archive@crunch.apache.org Received: (qmail 5791 invoked by uid 500); 11 Apr 2016 15:47: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 5751 invoked by uid 500); 11 Apr 2016 15:47:25 -0000 Delivered-To: apmail-incubator-crunch-dev@incubator.apache.org Received: (qmail 5741 invoked by uid 99); 11 Apr 2016 15:47:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Apr 2016 15:47:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7F66B2C1F5C for ; Mon, 11 Apr 2016 15:47:25 +0000 (UTC) Date: Mon, 11 Apr 2016 15:47:25 +0000 (UTC) From: "Micah Whitacre (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 ] Micah Whitacre updated CRUNCH-600: ---------------------------------- Fix Version/s: 0.14.0 > 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 > Assignee: Micah Whitacre > Priority: Minor > Fix For: 0.14.0 > > 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)