saintstack commented on a change in pull request #1825: URL: https://github.com/apache/hbase/pull/1825#discussion_r433525389
########## File path: hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java ########## @@ -423,6 +423,19 @@ public static Path getTableDir(Path rootdir, final TableName tableName) { tableName.getQualifierAsString()); } + /** + * Returns the {@link org.apache.hadoop.fs.Path} object representing the region directory under + * path rootdir + * + * @param rootdir qualified path of HBase root directory + * @param tableName name of table + * @param regionName The encoded region name + * @return {@link org.apache.hadoop.fs.Path} for region + */ + public static Path getRegionDir(Path rootdir, TableName tableName, String regionName) { Review comment: Should hbase-common know about region dirs? Seems like it knows about table dirs so I suppose this ok. ########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java ########## @@ -285,23 +286,35 @@ boolean splitLogFile(FileStatus logfile, CancelableProgressable reporter) throws String encodedRegionNameAsStr = Bytes.toString(region); lastFlushedSequenceId = lastFlushedSequenceIds.get(encodedRegionNameAsStr); if (lastFlushedSequenceId == null) { - if (sequenceIdChecker != null) { - RegionStoreSequenceIds ids = sequenceIdChecker.getLastSequenceId(region); - Map<byte[], Long> maxSeqIdInStores = new TreeMap<>(Bytes.BYTES_COMPARATOR); - for (StoreSequenceId storeSeqId : ids.getStoreSequenceIdList()) { - maxSeqIdInStores.put(storeSeqId.getFamilyName().toByteArray(), - storeSeqId.getSequenceId()); + if (!(isRegionDirPresentUnderRoot(entry.getKey().getTableName(), encodedRegionNameAsStr))) { + // The region directory itself is not present in the WAL FS. This indicates that Review comment: Is it WAL FS dir or the data/hfile FS? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org