Apache9 commented on a change in pull request #2640:
URL: https://github.com/apache/hbase/pull/2640#discussion_r520255266
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
##########
@@ -161,7 +165,11 @@
private final boolean hostnamesCanChange;
private final long pause;
private final long pauseForCQTBE;// pause for CallQueueTooBigException, if
specified
- private boolean useMetaReplicas;
Review comment:
I can not recall whether I have mentioned this on the patch for master.
The scope of 'useMetaReplicas' is wider than the newly introduced
metaReplicaMode, as it could also effect the methods in Admin implementation,
so I do not think we could remove it directly. If we want to do so, we'd better
follow the typical rule to deprecated it first and then remove it in the next
major release.
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ReversedClientScanner.java
##########
@@ -64,7 +64,9 @@ protected boolean setNewStartKey() {
@Override
protected ReversedScannerCallable createScannerCallable() {
+ // In case of meta, we want to support scan over a replica region.
+ int replicaId = (scan.getConsistency() == Consistency.TIMELINE) ?
scan.getReplicaId() : 0;
Review comment:
This is a bit strange, TIMELINE means we should send request to primary
first and if it does not come back in time, we switch to secondary replicas.
IIRC the design here is that, if targetReplicaId is -1, we follow the rule of
STRONG or TIMELINE, if targetReplicaId is not -1, we will go to the specific
replica directly?
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallableWithReplicas.java
##########
@@ -42,13 +42,15 @@
import org.slf4j.LoggerFactory;
import org.apache.hadoop.hbase.client.ScannerCallable.MoreResults;
import org.apache.hadoop.hbase.util.Pair;
+import static
org.apache.hadoop.hbase.client.RegionReplicaUtil.DEFAULT_REPLICA_ID;
Review comment:
Put static import on top?
----------------------------------------------------------------
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]