saintstack commented on a change in pull request #2095:
URL: https://github.com/apache/hbase/pull/2095#discussion_r458229447
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionRegistry.java
##########
@@ -18,21 +18,36 @@
package org.apache.hadoop.hbase.client;
import java.io.Closeable;
+import java.util.List;
import java.util.concurrent.CompletableFuture;
+import org.apache.hadoop.hbase.HRegionLocation;
+import org.apache.hadoop.hbase.RegionLocations;
import org.apache.hadoop.hbase.ServerName;
import org.apache.yetus.audience.InterfaceAudience;
/**
* Registry for meta information needed for connection setup to a HBase
cluster. Implementations
- * hold cluster information such as this cluster's id, location of hbase:meta,
etc..
- * Internal use only.
+ * hold cluster information such as this cluster's id, location of hbase:meta,
etc.. Internal use
+ * only.
*/
@InterfaceAudience.Private
interface ConnectionRegistry extends Closeable {
+ /**
+ * Get location of meta region for the given {@code row}.
+ */
+ CompletableFuture<RegionLocations> locateMeta(byte[] row, RegionLocateType
locateType);
Review comment:
Seems arbitrary that we do ROOT location in here but location for
hbase:meta is elsewhere and if they want to do 'caching'/'replicas', they'd use
a different system.
Or is idea that this cache of location be generalized? Or for ROOT only?
Implementations could get RS stubs I suppose so don't have to go to Master
to get meta Locations?
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionRegistry.java
##########
@@ -18,21 +18,36 @@
package org.apache.hadoop.hbase.client;
import java.io.Closeable;
+import java.util.List;
import java.util.concurrent.CompletableFuture;
+import org.apache.hadoop.hbase.HRegionLocation;
+import org.apache.hadoop.hbase.RegionLocations;
import org.apache.hadoop.hbase.ServerName;
import org.apache.yetus.audience.InterfaceAudience;
/**
* Registry for meta information needed for connection setup to a HBase
cluster. Implementations
- * hold cluster information such as this cluster's id, location of hbase:meta,
etc..
- * Internal use only.
+ * hold cluster information such as this cluster's id, location of hbase:meta,
etc.. Internal use
+ * only.
*/
@InterfaceAudience.Private
interface ConnectionRegistry extends Closeable {
+ /**
+ * Get location of meta region for the given {@code row}.
+ */
+ CompletableFuture<RegionLocations> locateMeta(byte[] row, RegionLocateType
locateType);
+
+ /**
+ * Get all meta region locations, including the location of secondary
regions.
+ * @param excludeOfflinedSplitParents whether to include split parent.
+ */
+ CompletableFuture<List<HRegionLocation>>
Review comment:
Yeah, noted previously that there is overlap with RegionLocator API. One
bother is that RL is public. CR is not (though I think changing it after
release will be troublesome..)
----------------------------------------------------------------
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]