[
https://issues.apache.org/jira/browse/YARN-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15382811#comment-15382811
]
Junping Du commented on YARN-5213:
----------------------------------
Thanks [~xgong] for put a quick patch and [~rohithsharma] for quick comments!
I think this patch fix an issue for log rolling correctly and I verified the
patch locally and previous test failure is gone.
A couple of comments:
bq. reader creation is duplicated, may be this can be avoided.
This is also my thought when I first look. However, after taking a look again
especially sync with Xuan offline, I agree this should be by intentional as
reader's stream index could be updated after calling
{{getContainerLogsStream()}}. However, we should add a comments there to
explicitly mention that why we need a "duplicated" creation here or later comer
could be confused also and did mistakenly change.
In TestLogsCLI.java,
{noformat}
int tailContentSize = "\nEnd of LogType:syslog\n\n".getBytes().length;
{noformat}
This is not right. Here LogType should be stdout but not syslog although not
affect result yet.
One optional comments to see if you would like to address here or later: there
are many hard coded messages, like: "Hello container_0_0001_01_000003 in
stdout!" - better to have static method with specifying container id and
logtype.
> TestLogsCLI#testFetchApplictionLogs fails intermittently
> --------------------------------------------------------
>
> Key: YARN-5213
> URL: https://issues.apache.org/jira/browse/YARN-5213
> Project: Hadoop YARN
> Issue Type: Bug
> Components: test
> Reporter: Rohith Sharma K S
> Assignee: Xuan Gong
> Attachments: YARN-5213.1.patch, YARN-5213.patch
>
>
> TestLogsCLI fails intermittently on build
> [link|https://builds.apache.org/job/PreCommit-YARN-Build/11910/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-client.txt]
> {noformat}
> Running org.apache.hadoop.yarn.client.cli.TestLogsCLI
> Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.708 sec
> <<< FAILURE! - in org.apache.hadoop.yarn.client.cli.TestLogsCLI
> testFetchApplictionLogs(org.apache.hadoop.yarn.client.cli.TestLogsCLI) Time
> elapsed: 0.176 sec <<< FAILURE!
> org.junit.ComparisonFailure: expected:<[Hello]> but was:<[=====]>
> at org.junit.Assert.assertEquals(Assert.java:115)
> at org.junit.Assert.assertEquals(Assert.java:144)
> at
> org.apache.hadoop.yarn.client.cli.TestLogsCLI.testFetchApplictionLogs(TestLogsCLI.java:389)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]