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

zhihai xu commented on HADOOP-9989:
-----------------------------------

Hi [~Alejandro Abdelnur], That is a good question. It is not possible to use 
non-local FS URIs in "-tokenCacheFile" option parameter
The current code in GenericOptionsParser.java  will always suppose the 
"-tokenCacheFile" option parameter is local file, 
otherwise It will throw an exception at 
{code}
      FileSystem localFs = FileSystem.getLocal(conf);
      Path p = localFs.makeQualified(new Path(fileName));
      if (!localFs.exists(p)) {
          throw new FileNotFoundException("File "+fileName+" does not exist.");
      }
{code}.

You gave a good suggestion to change  "mapreduce.job.credentials.binary" 
configuration to support all path format absolute and relative URIs.
I will create a separate JIRAs for this and I will also test all possible path 
name.

And also if we want to support non-local FS URIs in "-tokenCacheFile" option 
parameter, we can change  
{code}
      if (!localFs.exists(p)) {
          throw new FileNotFoundException("File "+fileName+" does not exist.");
      }
{code}
to
{code}
      if (!p.getFileSystem(conf).exists(p)) {
          throw new FileNotFoundException("File "+fileName+" does not exist.");
      }
{code}


> Bug introduced in HADOOP-9374, which parses the -tokenCacheFile as binary 
> file but set it to the configuration as JSON file.
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-9989
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9989
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security, util
>    Affects Versions: 2.1.0-beta
>         Environment: Red Hat Enterprise 6 with Sun Java 1.7 and IBM Java 1.6
>            Reporter: Jinghui Wang
>            Assignee: zhihai xu
>             Fix For: 2.6.0
>
>         Attachments: HADOOP-9989.001.patch, HADOOP-9989.addendum0.patch, 
> HADOOP-9989.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> The code in JIRA HADOOP-9374's patch introduced a bug, where the value of the 
> tokenCacheFile parameter is being parsed as a binary file and set it to the
> mapreduce.job.credentials.json parameter in GenericOptionsParser, which 
> cannot be parsed by JobSubmitter when it gets the value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to