hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-2050) Fix LogCLIHelpers to create the correct FileContext
Date Tue, 13 May 2014 17:48:16 GMT

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

Jason Lowe commented on YARN-2050:
----------------------------------

bq. remoteAppLogDir.toUri().getScheme() returns null and AbstractFileSystem.createFileSystem
doesn't like it if dumpAllContainersLogs calls FileContext.getFileContext(remoteAppLogDir.toUri())

Argh right, I forgot that FileContext is less-than-helpful in this regard.   It needs to be
something like this:

{code}
  Path qualifiedLogDir = FileContext.getFileContext(getConf()).makeQualified(remoteAppLogDir);
  FileContext fc = FileContext.getFileContext(qualifiedLogDir.toUri(), getConf());
  nodeFiles = fc.listStatus(qualifiedLogDir);
{code}

This allows the code to handle cases where the remote log dir has been configured to be a
different filesystem than the default filesystem.

> Fix LogCLIHelpers to create the correct FileContext
> ---------------------------------------------------
>
>                 Key: YARN-2050
>                 URL: https://issues.apache.org/jira/browse/YARN-2050
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Ming Ma
>            Assignee: Ming Ma
>         Attachments: YARN-2050.patch
>
>
> LogCLIHelpers calls FileContext.getFileContext() without any parameters. Thus the FileContext
created isn't necessarily the FileContext for remote log.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message