Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B4D021889C for ; Tue, 22 Mar 2016 23:20:26 +0000 (UTC) Received: (qmail 35555 invoked by uid 500); 22 Mar 2016 23:20:26 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 35440 invoked by uid 500); 22 Mar 2016 23:20:26 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 35228 invoked by uid 99); 22 Mar 2016 23:20:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2016 23:20:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CEB172C14F8 for ; Tue, 22 Mar 2016 23:20:25 +0000 (UTC) Date: Tue, 22 Mar 2016 23:20:25 +0000 (UTC) From: "Robert Kanter (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-12954) Add a way to change hadoop.security.token.service.use_ip 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/HADOOP-12954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15207503#comment-15207503 ] Robert Kanter commented on HADOOP-12954: ---------------------------------------- The end problems were different, but it's the same root cause: {{hadoop.security.token.service.use_ip}} is initialized from the classpath and core-site.xml isn't there. I think my proposal should work to solve both problems. The Oozie server can call {{SecurityUtil.setConfiguration(conf)}} to pass the {{Configuration}} it loaded. The MR AM could do the same. Though for MAPREDUCE-6565, why can't you have a core-site.xml added via {{mapreduce.application.classpath}}? > Add a way to change hadoop.security.token.service.use_ip > -------------------------------------------------------- > > Key: HADOOP-12954 > URL: https://issues.apache.org/jira/browse/HADOOP-12954 > Project: Hadoop Common > Issue Type: Bug > Affects Versions: 2.6.0 > Reporter: Robert Kanter > Assignee: Robert Kanter > > Currently, {{hadoop.security.token.service.use_ip}} is set on JVM startup via: > {code:java} > static { > Configuration conf = new Configuration(); > boolean useIp = conf.getBoolean( > CommonConfigurationKeys.HADOOP_SECURITY_TOKEN_SERVICE_USE_IP, > CommonConfigurationKeys.HADOOP_SECURITY_TOKEN_SERVICE_USE_IP_DEFAULT); > setTokenServiceUseIp(useIp); > } > {code} > This is a problem for clients, such as Oozie, who don't add *-site.xml files to their classpath. Oozie normally creates a {{JobClient}} and passes a {{Configuration}} to it with the proper configs we need. However, because {{hadoop.security.token.service.use_ip}} is specified in a static block like this, and there's no API to change it, Oozie has no way to set it to the non-default value. > I propose we add a {{setConfiguration}} method which takes a {{Configuration}} and rereads {{hadoop.security.token.service.use_ip}}. There's a few other properties that are also loaded statically on startup that can be reloaded here as well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)