shahrs87 commented on a change in pull request #3636:
URL: https://github.com/apache/hbase/pull/3636#discussion_r700165941



##########
File path: 
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/WALInputFormat.java
##########
@@ -217,8 +217,9 @@ public boolean nextKeyValue() throws IOException, 
InterruptedException {
         }
         return res;
       } catch (IOException e) {
-        Path archivedLog = AbstractFSWALProvider.getArchivedLogPath(logFile, 
conf);
-        if (logFile != archivedLog) {
+        Path archivedLog = AbstractFSWALProvider.findArchivedLog(logFile, 
conf);
+        // archivedLog can be null if unable to locate in archiveDir.
+        if (archivedLog != null && logFile != archivedLog) {

Review comment:
       > Looking at the name 'findArchivedLog', and also the implementation, I 
do not think we still need to test != here, aas we will never return the 
logFile itself now. WDYT @shahrs87 ?
   
   Yes, it makes sense that we will never return the logFile again. Removed all 
the places where  we were comparing logFile with the returned path. 




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


Reply via email to