Apache9 commented on a change in pull request #3504:
URL: https://github.com/apache/hbase/pull/3504#discussion_r673961819
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java
##########
@@ -500,6 +499,39 @@ public static Path getArchivedLogPath(Path path,
Configuration conf) throws IOEx
}
}
+ /**
+ * Get the archived WAL file path
+ * @param path - active WAL file path
+ * @param conf - configuration
+ * @return archived path if exists, path - otherwise
+ * @throws IOException exception
+ */
+ public static Path getArchivedLog(Path path, Configuration conf) throws
IOException {
Review comment:
Better name it findArchivedLog.
The above getArchivedLogPath is used when we want to move a file into the
archived directory, we need to check the configuration to see if we want to put
the log into the separate directory or not.
And for this method, it is used when we want to read a wal file, so we need
to try all the places to see if we can find it, as we may change the way on how
to archive the log on the fly(not sure but in general we want to support
onConfigurationChange for more and more configurations).
So name it findArchivedLog will be better, and maybe we could just return
null, or return an Optional object when we can not find the wal file.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]