[
https://issues.apache.org/jira/browse/YARN-9519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16833769#comment-16833769
]
Adam Antal commented on YARN-9519:
----------------------------------
Thanks for the review [~snemeth]. I answer to your points below:
1. Agreed with your points, but I need the exact usage of {{LinkedList}}, since
I'm calling the {{getFirst()}} method which is a method of the {{LinkedList}}
class. I didn't intend to modify it, so I left it as it is, but on a second
thought it may look better that way. I changed all of the occurrences to the
{{get(i)}} method of the {{List}} interface. Also added a more descriptive name
to the {{list}} variables.
2. Regarding the two types of instanceof:
These usages:
{code:java}
assertTrue(list.getFirst() instanceof LogAggregationTFileController);
{code}
Could be refactored to
{code:java}
assertTrue(LogAggregationTFileController.class.isInstance(list.getFirst()));
{code}
but then IntelliJ complains that it could be reduced to the more concise
original (instanceof) form.
The {{Class}} object is a parameter of {{verifyFileControllerInstance}}, hence
the other type of occurrences couldn't be modified as well to a simple
instanceof (since the class itself is parameterized, and you can only
parameterize {{ExampleClass.class}}, not the {{ExampleClass}}).
I'm stuck with this, but it looks like it can not be modified in either way.
What do you think?
3.,4. and 5. are done. Nice suggestions!
> TFile log aggregation file format is insensitive to the
> yarn.log-aggregation.TFile.remote-app-log-dir config
> ------------------------------------------------------------------------------------------------------------
>
> Key: YARN-9519
> URL: https://issues.apache.org/jira/browse/YARN-9519
> Project: Hadoop YARN
> Issue Type: Bug
> Components: log-aggregation
> Affects Versions: 3.2.0
> Reporter: Adam Antal
> Assignee: Adam Antal
> Priority: Major
> Attachments: YARN-9519.001.patch, YARN-9519.002.patch,
> YARN-9519.003.patch
>
>
> The TFile log aggregation file format is not sensitive to the
> yarn.log-aggregation.TFile.remote-app-log-dir config.
> In {{LogAggregationTFileController$initInternal}}:
> {code:java}
> this.remoteRootLogDir = new Path(
> conf.get(YarnConfiguration.NM_REMOTE_APP_LOG_DIR,
> YarnConfiguration.DEFAULT_NM_REMOTE_APP_LOG_DIR));
> {code}
> So the remoteRootLogDir is only aware of the
> yarn.nodemanager.remote-app-log-dir config, while other file format, like
> IFile defaults to the file format config, so its priority is higher.
> From {{LogAggregationIndexedFileController$initInternal}}:
> {code:java}
> String remoteDirStr = String.format(
> YarnConfiguration.LOG_AGGREGATION_REMOTE_APP_LOG_DIR_FMT,
> this.fileControllerName);
> String remoteDir = conf.get(remoteDirStr);
> if (remoteDir == null || remoteDir.isEmpty()) {
> remoteDir = conf.get(YarnConfiguration.NM_REMOTE_APP_LOG_DIR,
> YarnConfiguration.DEFAULT_NM_REMOTE_APP_LOG_DIR);
> }
> {code}
> (Where these configs are: )
> {code:java}
> public static final String LOG_AGGREGATION_REMOTE_APP_LOG_DIR_FMT
> = YARN_PREFIX + "log-aggregation.%s.remote-app-log-dir";
> public static final String NM_REMOTE_APP_LOG_DIR =
> NM_PREFIX + "remote-app-log-dir";
> {code}
> I suggest TFile should try to obtain the remote dir config from
> yarn.log-aggregation.TFile.remote-app-log-dir first, and only if that is not
> specified falls back to the yarn.nodemanager.remote-app-log-dir config.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]