Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Apache9 committed May 6, 2020
1 parent 12f9ed0 commit f42ea5c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,12 @@ private IOException badResponse(String debug) {
return new IOException(String.format("Invalid result for request %s. Will be retried", debug));
}

// send requests concurrently to hedgedReadsFanout masters. If any of the request is succeeded, we
// will complete the future and quit. If all the requests in one round are failed, we will start
// another round to send requests concurrently tohedgedReadsFanout masters. If all masters have
// been tried and all of them are failed, we will fail the future.
/**
* send requests concurrently to hedgedReadsFanout masters. If any of the request is succeeded, we
* will complete the future and quit. If all the requests in one round are failed, we will start
* another round to send requests concurrently tohedgedReadsFanout masters. If all masters have
* been tried and all of them are failed, we will fail the future.
*/
private <T extends Message> void groupCall(CompletableFuture<T> future,
List<ClientMetaService.Interface> masterStubs, int startIndexInclusive, Callable<T> callable,
Predicate<T> isValidResp, String debug, ConcurrentLinkedQueue<Throwable> errors) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseCommonTestingUtility;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.ServerName;
Expand All @@ -44,6 +45,7 @@
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
Expand All @@ -62,6 +64,10 @@
@Category({ ClientTests.class, SmallTests.class })
public class TestMasterRegistryHedgedReads {

@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestMasterRegistryHedgedReads.class);

private static final Logger LOG = LoggerFactory.getLogger(TestMasterRegistryHedgedReads.class);

private static final HBaseCommonTestingUtility UTIL = new HBaseCommonTestingUtility();
Expand Down

0 comments on commit f42ea5c

Please sign in to comment.