You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Agshin Kazimli (Jira)" <ji...@apache.org> on 2021/01/14 12:13:01 UTC

[jira] [Comment Edited] (YARN-7200) SLS generates a realtimetrack.json file but that file is missing the closing ']'

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

Agshin Kazimli edited comment on YARN-7200 at 1/14/21, 12:12 PM:
-----------------------------------------------------------------

[~snemeth] Thanks for your thoughts.

I've changed the error messages to LOG.error().

Regarding the second thought, I believe metricsLogBW calls org.apache.hadoop.yarn.sls.scheduler.SchedulerMetrics.MetricsLogRunnable is invoked if the
{code:java}
(SchedulerWrapper) scheduler.getTracker().getQueueSet() != null{code}
{color:#cc7832}{color:#172b4d}in org.apache.hadoop.yarn.sls.scheduler.SchedulerMetrics.MetricsLogRunnable{color},{color} {color:#172b4d}which in scheduler is an instance of ResourceScheduler. So, if there is a tracked application and the queue set is not null, then it'll be invoked. In this case, if tearDown() is called, then there is no application remaining, that means, it can't be invoked after that.{color}
 
 
  
 
 But, just in case, I see that there is a boolean field 'running' which indicates that metrics is running or not, I've added a new code line to the top of the tearDown() method to set the value of running to false. It means, the metrics has been stopped, and there is no need to write anything else.
  
  
  


was (Author: akshink):
[~snemeth] Thanks for your thoughts.

I've changed the error messages to LOG.error().

Regarding the second thought, I believe metricsLogBW calls org.apache.hadoop.yarn.sls.scheduler.SchedulerMetrics.MetricsLogRunnable is invoked if the
{code:java}
(SchedulerWrapper) scheduler.getTracker().getQueueSet() != null{code}
{color:#cc7832}{color:#172b4d}in org.apache.hadoop.yarn.sls.scheduler.SchedulerMetrics.MetricsLogRunnable,{color} {color:#172b4d}which in scheduler is an instance of ResourceScheduler. So, if there is a tracked application and the queue set is not null, then it'll be invoked. In this case, if tearDown() is called, then there is no application remaining, that means, it can't be invoked after that.{color}
{color}

 

{color:#172b4d}But, just in case, I see that there is a boolean field 'running' which indicates that metrics is running or not, I've added a new code line to the top of the tearDown() method to set the value of running to false. It means, the metrics has been stopped, and there is no need to write anything else.{color}
 
 
 

> SLS generates a realtimetrack.json file but that file is missing the closing ']'
> --------------------------------------------------------------------------------
>
>                 Key: YARN-7200
>                 URL: https://issues.apache.org/jira/browse/YARN-7200
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: scheduler-load-simulator
>            Reporter: Grant Sohn
>            Assignee: Agshin Kazimli
>            Priority: Minor
>              Labels: newbie, newbie++
>         Attachments: YARN-7200-branch-trunk.patch, YARN-7200.002.patch, YARN-7200.003.patch, YARN-7200.004.patch, YARN-7200.005.patch, snemeth-testing-20201113.zip
>
>
> File hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/SchedulerMetrics.java shows:
> {noformat}
>   void tearDown() throws Exception {
>     if (metricsLogBW != null)  {
>       metricsLogBW.write("]");
>       metricsLogBW.close();
>     }
>     ....
> {noformat}
> So the exit logic is flawed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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