VladRodionov commented on a change in pull request #921: HBASE-22749:
Distributed MOB compactions
URL: https://github.com/apache/hbase/pull/921#discussion_r369938761
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileInfo.java
##########
@@ -442,6 +438,31 @@ public static boolean isHFile(final String fileName) {
return m.matches() && m.groupCount() > 0;
}
+ public static boolean isMobFile(final Path path) {
+ String fileName = path.getName();
+ String[] parts = fileName.split(MobUtils.SEP);
+ if (parts.length != 2) {
+ return false;
+ }
+ Matcher m = HFILE_NAME_PATTERN.matcher(parts[0]);
+ Matcher mm = HFILE_NAME_PATTERN.matcher(parts[1]);
+ return m.matches() && mm.matches();
+ }
+
+ public static boolean isMobRefFile(final Path path) {
+ String fileName = path.getName();
+ int lastIndex = fileName.lastIndexOf(MobUtils.SEP);
+ if (lastIndex < 0) {
+ return false;
+ }
+ String[] parts = new String[2];
+ parts[0] = fileName.substring(0, lastIndex);
+ parts[1] = fileName.substring(lastIndex + 1);
+ String name = parts[0] + "." + parts[1];
+ Matcher m = REF_NAME_PATTERN.matcher(name);
Review comment:
Created: https://issues.apache.org/jira/browse/HBASE-23724
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services