Skip to content
Permalink
Browse files
add fetch input splits timeout (#113)
  • Loading branch information
corgiboygsj committed Oct 18, 2021
1 parent 847abed commit 89fe8669ebdc63f46e01ec79dc65a0a860961e5e
Showing 2 changed files with 11 additions and 1 deletion.
@@ -94,6 +94,14 @@ public static synchronized ComputerOptions instance() {
"hugegraph"
);

public static final ConfigOption<Integer> INPUT_SPLIT_FETCH_TIMEOUT =
new ConfigOption<>(
"input.split_fetch_timeout",
"The timeout in seconds to fetch input splits",
positiveInt(),
300
);

public static final ConfigOption<Long> INPUT_SPLITS_SIZE =
new ConfigOption<>(
"input.split_size",
@@ -40,7 +40,9 @@ public HugeInputSplitFetcher(Config config) {
this.config = config;
String url = config.get(ComputerOptions.HUGEGRAPH_URL);
String graph = config.get(ComputerOptions.HUGEGRAPH_GRAPH_NAME);
this.client = new HugeClientBuilder(url, graph).build();
int timeout = config.get(ComputerOptions.INPUT_SPLIT_FETCH_TIMEOUT);
this.client = new HugeClientBuilder(url, graph).configTimeout(timeout)
.build();
}

@Override

0 comments on commit 89fe866

Please sign in to comment.