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



##########
File path: 
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALRecordReader.java
##########
@@ -335,13 +342,16 @@ private void testSplitWithMovingWAL(InputSplit split, 
byte[] col1, byte[] col2)
     // Move log file to archive directory
     // While WAL record reader is open
     WALInputFormat.WALSplit split_ = (WALInputFormat.WALSplit) split;
-
     Path logFile = new Path(split_.getLogFileName());
-    Path archivedLog = AbstractFSWALProvider.getArchivedLogPath(logFile, conf);
-    boolean result = fs.rename(logFile, archivedLog);
-    assertTrue(result);
-    result = fs.exists(archivedLog);
-    assertTrue(result);
+    Path archivedLogDir = getWALArchiveDir(conf);
+    Path archivedLogLocation = new Path(archivedLogDir, logFile.getName());
+    assertNotEquals(split_.getLogFileName(), archivedLogLocation.toString());
+
+    assertTrue(fs.rename(logFile, archivedLogLocation));
+    assertTrue(fs.exists(archivedLogDir));
+    assertFalse(fs.exists(logFile));
+    // TODO: This is not behaving as expected. 
WALInputFormat#WALKeyRecordReader doesn't open

Review comment:
       >  So you mean we should file another issue to address this
   
   Yes, we need to open a new jira to modify the test.

##########
File path: 
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALRecordReader.java
##########
@@ -335,13 +342,16 @@ private void testSplitWithMovingWAL(InputSplit split, 
byte[] col1, byte[] col2)
     // Move log file to archive directory
     // While WAL record reader is open
     WALInputFormat.WALSplit split_ = (WALInputFormat.WALSplit) split;
-
     Path logFile = new Path(split_.getLogFileName());
-    Path archivedLog = AbstractFSWALProvider.getArchivedLogPath(logFile, conf);
-    boolean result = fs.rename(logFile, archivedLog);
-    assertTrue(result);
-    result = fs.exists(archivedLog);
-    assertTrue(result);
+    Path archivedLogDir = getWALArchiveDir(conf);
+    Path archivedLogLocation = new Path(archivedLogDir, logFile.getName());
+    assertNotEquals(split_.getLogFileName(), archivedLogLocation.toString());
+
+    assertTrue(fs.rename(logFile, archivedLogLocation));
+    assertTrue(fs.exists(archivedLogDir));
+    assertFalse(fs.exists(logFile));
+    // TODO: This is not behaving as expected. 
WALInputFormat#WALKeyRecordReader doesn't open

Review comment:
       >  So you mean we should file another issue to address this
   
   Yes, we need to open a new jira to modify the test. Will file it soon.




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