milleruntime commented on a change in pull request #2181:
URL: https://github.com/apache/accumulo/pull/2181#discussion_r660776436



##########
File path: 
server/tserver/src/main/java/org/apache/accumulo/tserver/logger/LogReader.java
##########
@@ -123,33 +130,44 @@ public void execute(String[] args) throws Exception {
       Set<Integer> tabletIds = new HashSet<>();
 
       for (String file : opts.files) {
-
         Path path = new Path(file);
         LogFileKey key = new LogFileKey();
         LogFileValue value = new LogFileValue();
 
-        if (fs.getFileStatus(path).isFile()) {
-          // read log entries from a simple hdfs file
-          try (final FSDataInputStream fsinput = fs.open(path);
-              DataInputStream input = DfsLogger.getDecryptingStream(fsinput, 
siteConfig)) {
-            while (true) {
-              try {
-                key.readFields(input);
-                value.readFields(input);
-              } catch (EOFException ex) {
-                break;
+        // read old style WALs
+        if (containsMapFile(fs, path)) {

Review comment:
       I think this check should happen in the else below for the temporary 
sorted WALs. The first `isFile()` check takes care of reading from the main 
WALs (the files in /accumulo/wal), which hasn't changed. I think the else below 
should read the files in /accumulo/recovery. 




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