@@ -73,8 +73,8 @@ class ScannerCallableWithReplicas implements RetryingCallable<Result[]> {
73
73
74
74
public ScannerCallableWithReplicas (TableName tableName , ClusterConnection cConnection ,
75
75
ScannerCallable baseCallable , ExecutorService pool , int timeBeforeReplicas , Scan scan ,
76
- int retries , int readRpcTimeout , int scannerTimeout , boolean useScannerTimeoutForNextCalls , int caching , Configuration conf ,
77
- RpcRetryingCaller <Result []> caller ) {
76
+ int retries , int readRpcTimeout , int scannerTimeout , boolean useScannerTimeoutForNextCalls ,
77
+ int caching , Configuration conf , RpcRetryingCaller <Result []> caller ) {
78
78
this .currentScannerCallable = baseCallable ;
79
79
this .cConnection = cConnection ;
80
80
this .pool = pool ;
@@ -331,24 +331,22 @@ public Cursor getCursor() {
331
331
return currentScannerCallable != null ? currentScannerCallable .getCursor () : null ;
332
332
}
333
333
334
- private void
335
- addCallsForCurrentReplica ( ResultBoundedCompletionService <Pair <Result [], ScannerCallable >> cs , int rpcTimeout ) {
334
+ private void addCallsForCurrentReplica (
335
+ ResultBoundedCompletionService <Pair <Result [], ScannerCallable >> cs , int rpcTimeout ) {
336
336
RetryingRPC retryingOnReplica = new RetryingRPC (currentScannerCallable );
337
337
outstandingCallables .add (currentScannerCallable );
338
338
cs .submit (retryingOnReplica , rpcTimeout , scannerTimeout , currentScannerCallable .id );
339
339
}
340
340
341
341
/**
342
342
* As we have a call sequence for scan, it is useless to have a different rpc timeout which is
343
- * less than the scan timeout. If the server does not respond in time(usually this will not
344
- * happen as we have heartbeat now), we will get an OutOfOrderScannerNextException when
345
- * resending the next request and the only way to fix this is to close the scanner and open a
346
- * new one.
347
- *
348
- * The legacy behavior of ScannerCallable has been to use readRpcTimeout despite the above. If
349
- * using legacy behavior, we always use that. If new behavior is enabled, we determine the rpc
350
- * timeout to use based on whether the scanner is open. If scanner is open, use scannerTimeout
351
- * otherwise use readRpcTimeout.
343
+ * less than the scan timeout. If the server does not respond in time(usually this will not happen
344
+ * as we have heartbeat now), we will get an OutOfOrderScannerNextException when resending the
345
+ * next request and the only way to fix this is to close the scanner and open a new one. The
346
+ * legacy behavior of ScannerCallable has been to use readRpcTimeout despite the above. If using
347
+ * legacy behavior, we always use that. If new behavior is enabled, we determine the rpc timeout
348
+ * to use based on whether the scanner is open. If scanner is open, use scannerTimeout otherwise
349
+ * use readRpcTimeout.
352
350
*/
353
351
private int getRpcTimeout () {
354
352
if (useScannerTimeoutForNextCalls ) {
@@ -359,7 +357,8 @@ private int getRpcTimeout() {
359
357
}
360
358
361
359
private void addCallsForOtherReplicas (
362
- ResultBoundedCompletionService <Pair <Result [], ScannerCallable >> cs , int min , int max , int rpcTimeout ) {
360
+ ResultBoundedCompletionService <Pair <Result [], ScannerCallable >> cs , int min , int max ,
361
+ int rpcTimeout ) {
363
362
364
363
for (int id = min ; id <= max ; id ++) {
365
364
if (currentScannerCallable .id == id ) {
0 commit comments