hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lantao Jin (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MAPREDUCE-6910) MapReduceTrackingUriPlugin can not return the right URI of history server with HTTPS
Date Fri, 14 Jul 2017 11:30:00 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-6910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16087197#comment-16087197
] 

Lantao Jin edited comment on MAPREDUCE-6910 at 7/14/17 11:29 AM:
-----------------------------------------------------------------

The code I test is based on v2.7.1.
>From the stack trace, we can find it will set JobConf when reflection.
{quote}
        at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:94)
        at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:78)
        at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136)
{quote}
{code}
  public static void setConf(Object theObject, Configuration conf) {
    if (conf != null) {
      if (theObject instanceof Configurable) {
        ((Configurable) theObject).setConf(conf);
      }
      setJobConf(theObject, conf);
    }
  }
{code}
Then the mapred-site.xml will be loaded at last.
{code}
public class JobConf extends Configuration {
  static{
    ConfigUtil.loadResources();
  }
{code}
{code}
public class ConfigUtil {
  /**
   * Adds all the deprecated keys. Loads mapred-default.xml and mapred-site.xml
   */
  public static void loadResources() {
    addDeprecatedKeys();
    Configuration.addDefaultResource("mapred-default.xml");
    Configuration.addDefaultResource("mapred-site.xml");
    Configuration.addDefaultResource("yarn-default.xml");
    Configuration.addDefaultResource("yarn-site.xml");
  }
{code}


was (Author: cltlfcjin):
The code I test is based on v2.7.1

> MapReduceTrackingUriPlugin can not return the right URI of history server with HTTPS
> ------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-6910
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6910
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: jobhistoryserver
>    Affects Versions: 2.7.3, 2.8.1, 3.0.0-alpha3
>            Reporter: Lantao Jin
>             Fix For: 2.9.0, 3.0.0-beta1, 2.8.2
>
>         Attachments: MAPREDUCE-6910.001.patch, MAPREDUCE-6910.002.patch
>
>
> When the {{MapReduceTrackingUriPlugin}} enabled, the URI requests from proxy server or
RM UI which are also out of {{yarn.resourcemanager.max-completed-applications}} should be
redirect to the history server URI.
> But when I access a HTTPS history server with the properties: 
> {quote}
>     <property>
>         <name>mapreduce.jobhistory.http.policy</name>
>         <value>HTTPS_ONLY</value>
>     </property>
>     <property>
>         <name>mapreduce.jobhistory.webapp.https.address</name>
>         <value>history.example.com:12345</value>
>     </property>
> {quote}
> The {{MapReduceTrackingUriPlugin}} still returns a default HTTP URI:
> {{http://0.0.0.0:19888}}
> or
> {{http://history.example.com:67890}}
> if {{mapreduce.jobhistory.webapp.address}} is engaged at same time.
> {quote}
>     <property>
>         <name>mapreduce.jobhistory.webapp.address</name>
>         <value>history.example.com:67890</value>
>     </property>
> {quote}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org


Mime
View raw message