You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/07/12 19:51:40 UTC

[GitHub] [hbase] Apache9 commented on a change in pull request #3444: HBASE-26049 Remove DfsBuilderUtility

Apache9 commented on a change in pull request #3444:
URL: https://github.com/apache/hbase/pull/3444#discussion_r667967586



##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
##########
@@ -54,7 +51,8 @@
  * <a href="https://issues.apache.org/jira/browse/HBASE-20838">HBASE-20838</a> for more details.
  */
 @InterfaceAudience.Private
-public final class CommonFSUtils {
+public final class
+CommonFSUtils {

Review comment:
       Typo? We do not need a new line here...

##########
File path: hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
##########
@@ -1070,7 +1072,13 @@ boolean rollWriter(long logId) throws IOException {
     long startPos = -1;
     newLogFile = getLogFilePath(logId);
     try {
-      newStream = CommonFSUtils.createForWal(fs, newLogFile, false);
+      FSDataOutputStreamBuilder<?, ?> builder = fs.createFile(newLogFile).overwrite(false);
+      if (builder instanceof DistributedFileSystem.HdfsDataOutputStreamBuilder) {

Review comment:
       We could add a replicate(FSDataOutputStreamBuilder) method in CommonFSUtils to abstract the instance of logic? Otherwise we need to write instanceof at difference place multiple times.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org