vvysotskyi commented on a change in pull request #1895: DRILL-6540: Upgrade to
HADOOP-3.x libraries
URL: https://github.com/apache/drill/pull/1895#discussion_r344263499
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/store/LocalSyncableFileSystem.java
##########
@@ -65,7 +65,7 @@ public FSDataInputStream open(Path path, int i) throws
IOException {
@Override
public FSDataOutputStream create(Path path, FsPermission fsPermission,
boolean b, int i, short i2, long l, Progressable progressable) throws
IOException {
- return new FSDataOutputStream(new LocalSyncableOutputStream(path));
+ return new FSDataOutputStream(new LocalSyncableOutputStream(path), new
Statistics(path.toUri().getScheme()));
Review comment:
Wouldn't it be better to obtain the `Statistics` instance using its static
method `Statistics.getStatistics(String scheme, Class<? extends FileSystem>
cls)` to use cached instance instead of creating the new one?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services