hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yeliang Cang (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (YARN-7047) Moving logging APIs over to slf4j in hadoop-yarn-server-nodemanager
Date Sun, 20 Aug 2017 11:07:02 GMT

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

Yeliang Cang edited comment on YARN-7047 at 8/20/17 11:06 AM:
--------------------------------------------------------------

In WindowsSecureContainerExecutor.java, 
{code:java}
@Override
      protected OutputStream createOutputStreamWithMode(Path f, boolean append,
          FsPermission permission) throws IOException {
        if (LOG.isDebugEnabled()) {
          LOG.debug(String.format("EFS:createOutputStreamWithMode: %s %b %s", f,
              append, permission));
        }
        boolean success = false;
        OutputStream os = Native.Elevated.create(f, append);
        try {
          setPermission(f, permission);
          success = true;
          return os;
        } finally {
          if (!success) {
            IOUtils.cleanup(LOG, os);
          }
        }
      }
{code}
LOG in "IOUtils.cleanup(LOG, os);" is defined in org.apache.hadoop.fs.FileSystem in hadoop-common
module, which can be called by other modules. So I leave it unchanged.[~ajisakaa], [~vincent
he], what is your opinion? Would you help me reviewing the patch?



was (Author: cyl):
In WindowsSecureContainerExecutor.java, 
{code:java}
@Override
      protected OutputStream createOutputStreamWithMode(Path f, boolean append,
          FsPermission permission) throws IOException {
        if (LOG.isDebugEnabled()) {
          LOG.debug(String.format("EFS:createOutputStreamWithMode: %s %b %s", f,
              append, permission));
        }
        boolean success = false;
        OutputStream os = Native.Elevated.create(f, append);
        try {
          setPermission(f, permission);
          success = true;
          return os;
        } finally {
          if (!success) {
            IOUtils.cleanup(LOG, os);
          }
        }
      }
{code}
LOG in "IOUtils.cleanup(LOG, os);" is defined in org.apache.hadoop.fs.FileSystem in hadoop-common
module, which can be called by other modules. So I leave it unchanged. [~vincent he], what
is your opinion? Would you help me reviewing the patch?


> Moving logging APIs over to slf4j in hadoop-yarn-server-nodemanager
> -------------------------------------------------------------------
>
>                 Key: YARN-7047
>                 URL: https://issues.apache.org/jira/browse/YARN-7047
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>    Affects Versions: 3.0.0-alpha4
>            Reporter: Yeliang Cang
>            Assignee: Yeliang Cang
>         Attachments: YARN-7047.001.patch, YARN-7047.002.patch, YARN-7047.003.patch
>
>




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

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


Mime
View raw message