[
https://issues.apache.org/jira/browse/YARN-7537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16820138#comment-16820138
]
Adam Antal commented on YARN-7537:
----------------------------------
[~Prabhu Joseph]: though I'm not very familiar with this piece of code, but I'd
recommend using try-with resources statement when dealing Closeable objects.
So instead of:
{noformat}
FileSystem fs = null;
FSDataInputStream in = null;
try {
...
fs = FileSystem.newInstance(hbaseConfigPath.toUri(), conf);
in = fs.open(hbaseConfigPath);
...
} finally {
if (in != null) {
in.close();
}
if (fs != null) {
fs.close();
}
}
{noformat}
You can make it concise and safer (and java8) way:
{noformat}
try (FileSystem fs = ...; FSDataInputStream in = ...) {
...
}
{noformat}
> [Atsv2] load hbase configuration from filesystem rather than URL
> ----------------------------------------------------------------
>
> Key: YARN-7537
> URL: https://issues.apache.org/jira/browse/YARN-7537
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Rohith Sharma K S
> Assignee: Prabhu Joseph
> Priority: Major
> Attachments: YARN-7537-03.patch, YARN-7537.01.patch,
> YARN-7537.02.patch
>
>
> Currently HBaseTimelineStorageUtils#getTimelineServiceHBaseConf loads hbase
> configurations using URL if *yarn.timeline-service.hbase.configuration.file*
> is configured. But it is restricted to URLs only. This need to be changed to
> load from file system. In deployment, hbase configuration can be kept under
> filesystem so that it be utilized by all the NodeManager and ResourceManager.
> cc :/ [~vrushalic] [~varun_saxena]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]