Skip to content

Commit

Permalink
Make KeyVersionFetcherCLI have generous timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjwylie committed Jun 20, 2013
1 parent 3122693 commit 0ef8faf
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/java/voldemort/utils/KeyVersionFetcherCLI.java
Expand Up @@ -26,6 +26,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Queue;
import java.util.Set;
import java.util.TreeSet;
Expand Down Expand Up @@ -92,7 +93,17 @@ public KeyVersionFetcherCLI(String url,
if(logger.isInfoEnabled()) {
logger.info("Connecting to bootstrap server: " + url);
}
this.adminClient = new AdminClient(url, new AdminClientConfig(), new ClientConfig());

Properties clientProps = new Properties();
clientProps.put("connection_timeout_ms", 2500);
clientProps.put("max_connections", keyParallelism);
clientProps.put("routing_timeout_ms", 10000);
clientProps.put("socket_timeout_ms", 10000);
clientProps.put("failuredetector_threshold", 10);

this.adminClient = new AdminClient(url,
new AdminClientConfig(),
new ClientConfig(clientProps));
this.cluster = adminClient.getAdminClientCluster();
this.storeDefinitions = adminClient.metadataMgmtOps.getRemoteStoreDefList(0).getValue();
this.storeNamesSet = new HashSet<String>();
Expand Down

0 comments on commit 0ef8faf

Please sign in to comment.