You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "liuxiaocs7 (via GitHub)" <gi...@apache.org> on 2026/06/10 08:54:30 UTC

[PR] HBASE-30217 Remove dead code getRegionId and isTemporaryDirectoryName… [hbase]

liuxiaocs7 opened a new pull request, #8331:
URL: https://github.com/apache/hbase/pull/8331

   … in HRegionFileSystem
   
   - see: HBASE-30217


-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-30217 Remove dead code getRegionId and isTemporaryDirectoryName… [hbase]

Posted by "Apache9 (via GitHub)" <gi...@apache.org>.
Apache9 commented on code in PR #8331:
URL: https://github.com/apache/hbase/pull/8331#discussion_r3410705508


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHdfsSnapshotHRegion.java:
##########
@@ -92,10 +92,9 @@ public void testSnapshottingWithTmpSplitsAndMergeDirectoriesPresent() throws Exc
     Path regionDirectoryPath = new Path(tableDir, encodedName);
     TEST_UTIL.getTestFileSystem()
       .create(new Path(regionDirectoryPath, HRegionFileSystem.REGION_TEMP_DIR));
-    TEST_UTIL.getTestFileSystem()
-      .create(new Path(regionDirectoryPath, HRegionFileSystem.REGION_SPLITS_DIR));
-    TEST_UTIL.getTestFileSystem()
-      .create(new Path(regionDirectoryPath, HRegionFileSystem.REGION_MERGES_DIR));
+    // Legacy directories created by split/merge before HBASE-26187
+    TEST_UTIL.getTestFileSystem().create(new Path(regionDirectoryPath, ".splits"));

Review Comment:
   Do we still need these two directories in this test?



-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-30217 Remove dead code getRegionId and isTemporaryDirectoryName… [hbase]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 commented on code in PR #8331:
URL: https://github.com/apache/hbase/pull/8331#discussion_r3392882463


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java:
##########
@@ -78,10 +78,20 @@ public class HRegionFileSystem {
   /** Name of the region info file that resides just under the region directory. */
   public final static String REGION_INFO_FILE = ".regioninfo";
 
-  /** Temporary subdirectory of the region directory used for merges. */
+  /**
+   * Temporary subdirectory of the region directory used for merges.
+   * @deprecated Since 3.0.0, will be removed in 4.0.0. Merges now write directly to the merged
+   *             region directory under the table dir since HBASE-26187.
+   */
+  @Deprecated
   public static final String REGION_MERGES_DIR = ".merges";
 
-  /** Temporary subdirectory of the region directory used for splits. */
+  /**
+   * Temporary subdirectory of the region directory used for splits.
+   * @deprecated Since 3.0.0, will be removed in 4.0.0. Splits now write directly to the daughter
+   *             region directory under the table dir since HBASE-26187.
+   */
+  @Deprecated
   public static final String REGION_SPLITS_DIR = ".splits";

Review Comment:
   Thanks for the comments, agree with your points, I've removed the two constants directly. The only usage was in `TestHdfsSnapshotHRegion`, which I've updated to use string literals with a comment explaining they represent legacy directories from before HBASE-26187.



-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-30217 Remove dead code getRegionId and isTemporaryDirectoryName… [hbase]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 merged PR #8331:
URL: https://github.com/apache/hbase/pull/8331


-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-30217 Remove dead code getRegionId and isTemporaryDirectoryName… [hbase]

Posted by "wchevreuil (via GitHub)" <gi...@apache.org>.
wchevreuil commented on code in PR #8331:
URL: https://github.com/apache/hbase/pull/8331#discussion_r3388820412


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java:
##########
@@ -78,10 +78,20 @@ public class HRegionFileSystem {
   /** Name of the region info file that resides just under the region directory. */
   public final static String REGION_INFO_FILE = ".regioninfo";
 
-  /** Temporary subdirectory of the region directory used for merges. */
+  /**
+   * Temporary subdirectory of the region directory used for merges.
+   * @deprecated Since 3.0.0, will be removed in 4.0.0. Merges now write directly to the merged
+   *             region directory under the table dir since HBASE-26187.
+   */
+  @Deprecated
   public static final String REGION_MERGES_DIR = ".merges";
 
-  /** Temporary subdirectory of the region directory used for splits. */
+  /**
+   * Temporary subdirectory of the region directory used for splits.
+   * @deprecated Since 3.0.0, will be removed in 4.0.0. Splits now write directly to the daughter
+   *             region directory under the table dir since HBASE-26187.
+   */
+  @Deprecated
   public static final String REGION_SPLITS_DIR = ".splits";

Review Comment:
   Do we really need to deprecate those rather than simply remove it? HRegionFileSystem is marked as InterfaceAudience.Private, so isn't intended for public use.



-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-30217 Remove dead code getRegionId and isTemporaryDirectoryName… [hbase]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 commented on code in PR #8331:
URL: https://github.com/apache/hbase/pull/8331#discussion_r3392882463


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java:
##########
@@ -78,10 +78,20 @@ public class HRegionFileSystem {
   /** Name of the region info file that resides just under the region directory. */
   public final static String REGION_INFO_FILE = ".regioninfo";
 
-  /** Temporary subdirectory of the region directory used for merges. */
+  /**
+   * Temporary subdirectory of the region directory used for merges.
+   * @deprecated Since 3.0.0, will be removed in 4.0.0. Merges now write directly to the merged
+   *             region directory under the table dir since HBASE-26187.
+   */
+  @Deprecated
   public static final String REGION_MERGES_DIR = ".merges";
 
-  /** Temporary subdirectory of the region directory used for splits. */
+  /**
+   * Temporary subdirectory of the region directory used for splits.
+   * @deprecated Since 3.0.0, will be removed in 4.0.0. Splits now write directly to the daughter
+   *             region directory under the table dir since HBASE-26187.
+   */
+  @Deprecated
   public static final String REGION_SPLITS_DIR = ".splits";

Review Comment:
   Thanks for your comments, agree with your points, I've removed the two constants directly. The only usage was in `TestHdfsSnapshotHRegion`, which I've updated to use string literals with a comment explaining they represent legacy directories from before HBASE-26187.



-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-30217 Remove dead code getRegionId and isTemporaryDirectoryName… [hbase]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 commented on code in PR #8331:
URL: https://github.com/apache/hbase/pull/8331#discussion_r3410981376


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHdfsSnapshotHRegion.java:
##########
@@ -92,10 +92,9 @@ public void testSnapshottingWithTmpSplitsAndMergeDirectoriesPresent() throws Exc
     Path regionDirectoryPath = new Path(tableDir, encodedName);
     TEST_UTIL.getTestFileSystem()
       .create(new Path(regionDirectoryPath, HRegionFileSystem.REGION_TEMP_DIR));
-    TEST_UTIL.getTestFileSystem()
-      .create(new Path(regionDirectoryPath, HRegionFileSystem.REGION_SPLITS_DIR));
-    TEST_UTIL.getTestFileSystem()
-      .create(new Path(regionDirectoryPath, HRegionFileSystem.REGION_MERGES_DIR));
+    // Legacy directories created by split/merge before HBASE-26187
+    TEST_UTIL.getTestFileSystem().create(new Path(regionDirectoryPath, ".splits"));

Review Comment:
   Thanks for your comments, agree with your points, removed them.



-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org