summaryrefslogtreecommitdiffstats
path: root/vespa-hadoop
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2020-10-01 11:59:02 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2020-10-01 11:59:04 +0200
commitf67163108bed4fd7beff5347153563a7437025d8 (patch)
treebecc35fbc58a1029fd1ecb91ad394f1c96cf5b0f /vespa-hadoop
parent9ce74f38c1e5f45e9907539fb4131a7356b457b0 (diff)
Reduce local queue timeout to 10 minutes
Ensure the client retries lost operations more often than every 1 hour and does not keep connections alive for that time.
Diffstat (limited to 'vespa-hadoop')
-rw-r--r--vespa-hadoop/src/main/java/com/yahoo/vespa/hadoop/mapreduce/VespaRecordWriter.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/vespa-hadoop/src/main/java/com/yahoo/vespa/hadoop/mapreduce/VespaRecordWriter.java b/vespa-hadoop/src/main/java/com/yahoo/vespa/hadoop/mapreduce/VespaRecordWriter.java
index 7ad51a55bff..4cc93bfd538 100644
--- a/vespa-hadoop/src/main/java/com/yahoo/vespa/hadoop/mapreduce/VespaRecordWriter.java
+++ b/vespa-hadoop/src/main/java/com/yahoo/vespa/hadoop/mapreduce/VespaRecordWriter.java
@@ -29,6 +29,7 @@ import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;
import java.io.IOException;
import java.io.StringReader;
+import java.time.Duration;
import java.util.List;
import java.util.StringTokenizer;
import java.util.concurrent.ThreadLocalRandom;
@@ -116,7 +117,7 @@ public class VespaRecordWriter extends RecordWriter {
feedParamsBuilder.setRoute(configuration.route());
feedParamsBuilder.setMaxSleepTimeMs(configuration.maxSleepTimeMs());
feedParamsBuilder.setMaxInFlightRequests(configuration.maxInFlightRequests());
- feedParamsBuilder.setLocalQueueTimeOut(3600*1000); //1 hour queue timeout
+ feedParamsBuilder.setLocalQueueTimeOut(Duration.ofMinutes(10).toMillis());
return feedParamsBuilder;
}