summaryrefslogtreecommitdiffstats
path: root/vespa-http-client
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2017-09-26 16:33:12 -0700
committerJon Bratseth <bratseth@yahoo-inc.com>2017-09-26 16:33:12 -0700
commitf8fd0fed643bf928804af1b25e6551ab6d2594e1 (patch)
treed1c0c1e1dddae0176c6423122e5d6ecdd8a79814 /vespa-http-client
parent6796195b37f351f843eea4992d2d45b7ba4eb771 (diff)
Nonfunctional changes only
Diffstat (limited to 'vespa-http-client')
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/FeedClient.java15
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/FeedClientFactory.java1
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/Result.java3
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/Session.java13
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/SessionFactory.java4
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/SimpleLoggerResultCallback.java2
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/Cluster.java5
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/ConnectionParams.java5
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/Endpoint.java3
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java4
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/SessionParams.java5
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/FeedClientImpl.java1
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/MultiClusterSessionOutputStream.java3
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java3
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ByteBufferInputStream.java3
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ClusterConnection.java3
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/DocumentQueue.java6
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/DryRunGatewayConnection.java1
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/EndpointIOException.java3
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/EndpointResultQueue.java8
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/GatewayConnection.java2
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/GatewayThrottler.java2
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java6
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/ConcurrentDocumentOperationBlocker.java2
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/DocumentSendInfo.java2
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/EndPointResultFactory.java4
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/IncompleteResultsThrottler.java2
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationProcessor.java14
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationStats.java2
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/CommandLineArguments.java3
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/FormatInputStream.java2
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/Runner.java4
32 files changed, 87 insertions, 49 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/FeedClient.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/FeedClient.java
index ed62c507a4b..299541a5a2d 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/FeedClient.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/FeedClient.java
@@ -17,7 +17,6 @@ import java.util.concurrent.atomic.AtomicInteger;
*
* @author dybis
* @see FeedClientFactory
- * @since 5.29.0
*/
public interface FeedClient extends AutoCloseable {
@@ -25,6 +24,7 @@ public interface FeedClient extends AutoCloseable {
* Streams a document to cluster(s). If the pipeline and buffers are full, this call will be blocking.
* Documents might time out before they are sent. Failed documents are not retried.
* Don't call stream() after close is called.
+ *
* @param documentId Document id of the document.
* @param documentData The document data as JSON or XML (as specified when using the factory to create the API)
*/
@@ -34,6 +34,7 @@ public interface FeedClient extends AutoCloseable {
* Streams a document to cluster(s). If the pipeline and buffers are full, this call will be blocking.
* Documents might time out before they are sent. Failed documents are not retried.
* Don't call stream() after close is called.
+ *
* @param documentId Document id of the document.
* @param documentData The document data as JSON or XML (as specified when using the factory to create the API)
* @param context Any context, will be accessible in the result of the callback.
@@ -47,7 +48,7 @@ public interface FeedClient extends AutoCloseable {
* AtomicInteger for counters and follow general guides for thread-safe programming.
* There is an example implementation in class SimpleLoggerResultCallback.
*/
- static interface ResultCallback {
+ interface ResultCallback {
void onCompletion(String docId, Result documentResult);
}
@@ -60,17 +61,19 @@ public interface FeedClient extends AutoCloseable {
/**
* Returns stats about the cluster.
+ *
* @return JSON string with information about cluster.
*/
- public String getStatsAsJson();
+ String getStatsAsJson();
/**
* Utility function that takes an array of JSON documents and calls the FeedClient for each element.
+ *
* @param inputStream This can be a very large stream. The outer element is an array (of document operations).
* @param feedClient The feedClient that will receive the document operations.
* @param numSent increased per document sent to API (but no waiting for results).
*/
- public static void feedJson(InputStream inputStream, FeedClient feedClient, AtomicInteger numSent) {
+ static void feedJson(InputStream inputStream, FeedClient feedClient, AtomicInteger numSent) {
JsonReader.read(inputStream, feedClient, numSent);
}
@@ -78,15 +81,17 @@ public interface FeedClient extends AutoCloseable {
* Utility function that takes an array of XML documents and calls the FeedClient for each element.
* The XML document has to be formatted with line space on each line (like "regular" XML, but stricter
* than the specifications of XML).
+ *
* @param inputStream This can be a very large stream.
* @param feedClient The feedClient that will receive the document operations.
* @param numSent increased per document sent to API (but no waiting for results).
*/
- public static void feedXml(InputStream inputStream, FeedClient feedClient, AtomicInteger numSent) {
+ static void feedXml(InputStream inputStream, FeedClient feedClient, AtomicInteger numSent) {
try {
XmlFeedReader.read(inputStream, feedClient, numSent);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/FeedClientFactory.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/FeedClientFactory.java
index aba16e9c9a4..cfa9ce670f6 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/FeedClientFactory.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/FeedClientFactory.java
@@ -9,6 +9,7 @@ import static com.yahoo.vespa.http.client.SessionFactory.createTimeoutExecutor;
/**
* Factory for creating FeedClient.
+ *
* @author dybis
*/
public class FeedClientFactory {
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/Result.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/Result.java
index ed2ed08e4ac..138be61de80 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/Result.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/Result.java
@@ -16,8 +16,7 @@ import java.util.List;
* but may contain more than one Result.Detail instances, as these pertains to a
* single endpoint, and a Result may wrap data for multiple endpoints.
*
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.20
+ * @author Einar M R Rosenvinge
*/
// This should be an interface, but in order to be binary compatible during refactoring we made it abstract.
public class Result {
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/Session.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/Session.java
index 0c85c025793..de39eabd3ee 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/Session.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/Session.java
@@ -13,11 +13,11 @@ import java.util.concurrent.BlockingQueue;
*
* A {@link SessionFactory} is provided to instantiate Sessions.
*
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.20
+ * @author Einar M R Rosenvinge
* @see SessionFactory
*/
public interface Session extends AutoCloseable {
+
/**
* Returns an OutputStream that can be used to write ONE operation, identified by the
* given document ID. The data format must match the
@@ -33,7 +33,7 @@ public interface Session extends AutoCloseable {
* @param documentId the unique ID identifying this operation in the system
* @return an OutputStream to write the operation payload into
*/
- public OutputStream stream(CharSequence documentId);
+ OutputStream stream(CharSequence documentId);
/**
* Returns {@link Result}s for all operations enqueued by {@link #stream(CharSequence)}.
@@ -44,7 +44,7 @@ public interface Session extends AutoCloseable {
* @return a blocking queue for retrieving results
* @see Result
*/
- public BlockingQueue<Result> results();
+ BlockingQueue<Result> results();
/**
* Closes this Session. All resources are freed, persistent connections are closed and
@@ -52,11 +52,12 @@ public interface Session extends AutoCloseable {
*
* @throws RuntimeException in cases where underlying resources throw on shutdown/close
*/
- public void close();
+ void close();
/**
* Returns stats about the cluster.
* @return JSON string with information about cluster.
*/
- public String getStatsAsJson();
+ String getStatsAsJson();
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/SessionFactory.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/SessionFactory.java
index 25241d249ff..2e47e45dff0 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/SessionFactory.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/SessionFactory.java
@@ -13,8 +13,7 @@ import java.util.concurrent.ThreadFactory;
/**
* Factory for creating {@link Session} instances.
*
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.20
+ * @author Einar M R Rosenvinge
*/
public final class SessionFactory {
@@ -77,4 +76,5 @@ public final class SessionFactory {
return t;
}
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/SimpleLoggerResultCallback.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/SimpleLoggerResultCallback.java
index 8729644e5ea..85e6baec9f7 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/SimpleLoggerResultCallback.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/SimpleLoggerResultCallback.java
@@ -13,6 +13,7 @@ import java.util.concurrent.atomic.AtomicInteger;
* "Result received: 34 (1 failed so far, 2003 sent, success rate 1999.23 docs/sec)."
* On each failure it will print the Result object content. If tracing is enabled, it will print trace messages to
* std err as well.
+ *
* @author dybis
*/
public class SimpleLoggerResultCallback implements FeedClient.ResultCallback {
@@ -99,4 +100,5 @@ public class SimpleLoggerResultCallback implements FeedClient.ResultCallback {
}
}
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/Cluster.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/Cluster.java
index fb928e2dacd..557aeedb4c1 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/Cluster.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/Cluster.java
@@ -11,11 +11,11 @@ import java.util.List;
/**
* A set of {@link Endpoint} instances. Construct using {@link Cluster.Builder}.
*
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.20
+ * @author Einar M R Rosenvinge
*/
@Immutable
public final class Cluster {
+
/**
* Builder for {@link Cluster}.
*/
@@ -74,5 +74,4 @@ public final class Cluster {
return "Cluster " + endpoints + ", route " + route;
}
-
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/ConnectionParams.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/ConnectionParams.java
index 6d6c1ddaa49..3fe42b21e93 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/ConnectionParams.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/ConnectionParams.java
@@ -21,9 +21,8 @@ import java.util.concurrent.TimeUnit;
* the Session to the Vespa clusters.
* This class is immutable
* and has no public constructor - to instantiate one, use a {@link Builder}.
-
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.20
+ *
+ * @author Einar M R Rosenvinge
*/
@Immutable
public final class ConnectionParams {
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/Endpoint.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/Endpoint.java
index b044c359712..de7bfb5bb19 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/Endpoint.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/Endpoint.java
@@ -9,8 +9,7 @@ import java.io.Serializable;
* Represents an endpoint, in most cases a JDisc container
* in a Vespa cluster configured with <code>document-api</code>.
*
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.20
+ * @author Einar M R Rosenvinge
*/
@Immutable
public final class Endpoint implements Serializable {
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java
index 46487f8431a..4f5b30444a9 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java
@@ -11,8 +11,7 @@ import java.util.concurrent.TimeUnit;
* when creating {@link com.yahoo.vespa.http.client.Session}s. This class is immutable
* and has no public constructor - to instantiate one, use a {@link Builder}.
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.20
+ * @author Einar M R Rosenvinge
*/
@Immutable
public final class FeedParams {
@@ -327,4 +326,5 @@ public final class FeedParams {
public long getLocalQueueTimeOut() {
return localQueueTimeOut;
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/SessionParams.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/SessionParams.java
index 4f1f76766d7..9a8640d09e2 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/SessionParams.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/SessionParams.java
@@ -14,13 +14,13 @@ import java.util.List;
* when creating {@link com.yahoo.vespa.http.client.Session}s. This class is immutable
* and has no public constructor - to instantiate one, use a {@link Builder}.
*
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.20
+ * @author Einar M R Rosenvinge
* @see com.yahoo.vespa.http.client.SessionFactory
* @see Builder
*/
@Immutable
public final class SessionParams {
+
/**
* Interface for handling serious errors with connection.
*/
@@ -180,4 +180,5 @@ public final class SessionParams {
public ErrorReporter getErrorReport() {
return errorReport;
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/FeedClientImpl.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/FeedClientImpl.java
index 11cea32dd37..a16d992324d 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/FeedClientImpl.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/FeedClientImpl.java
@@ -17,6 +17,7 @@ import java.util.concurrent.TimeUnit;
/**
* Implementation of FeedClient. It is a thin layer on top of multiClusterHandler and multiClusterResultAggregator.
+ *
* @author dybis
*/
public class FeedClientImpl implements FeedClient {
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/MultiClusterSessionOutputStream.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/MultiClusterSessionOutputStream.java
index 129b67b13b8..bf55a46277d 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/MultiClusterSessionOutputStream.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/MultiClusterSessionOutputStream.java
@@ -9,9 +9,11 @@ import java.io.IOException;
/**
* Class for wiring up the Session API. It is the return value of stream() in the Session API.
+ *
* @author dybis
*/
class MultiClusterSessionOutputStream extends ByteArrayOutputStream {
+
private final CharSequence documentId;
private final OperationProcessor operationProcessor;
private final Object context;
@@ -31,4 +33,5 @@ class MultiClusterSessionOutputStream extends ByteArrayOutputStream {
operationProcessor.sendDocument(document);
super.close();
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
index 01c36c7df28..420f64d4bf3 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
@@ -43,7 +43,8 @@ import java.util.logging.Logger;
import java.util.zip.GZIPOutputStream;
/**
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
+ * @author Einar M R Rosenvinge
+ *
* @since 5.1.20
*/
@Beta
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ByteBufferInputStream.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ByteBufferInputStream.java
index 044055937d0..56a525502a5 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ByteBufferInputStream.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ByteBufferInputStream.java
@@ -10,7 +10,8 @@ import java.util.ArrayDeque;
import java.util.Deque;
/**
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
+ * @author Einar M R Rosenvinge
+ *
* @since 5.1.20
*/
@Beta
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ClusterConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ClusterConnection.java
index fa9c1a0a65d..fb57c63dbf2 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ClusterConnection.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ClusterConnection.java
@@ -22,8 +22,7 @@ import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.20
+ * @author Einar M R Rosenvinge
*/
@Beta
public class ClusterConnection implements AutoCloseable {
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/DocumentQueue.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/DocumentQueue.java
index b9be94e03f1..671e6f07dbe 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/DocumentQueue.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/DocumentQueue.java
@@ -13,10 +13,13 @@ import java.util.Optional;
import java.util.concurrent.TimeUnit;
/**
- * Document queue that only gives you document operations on documents for which there are no already in flight operations for.
+ * Document queue that only gives you document operations on documents for which there are no
+ * already in flight operations for.
+ *
* @author dybis
*/
class DocumentQueue {
+
private final Deque<Document> queue;
private final int maxSize;
private boolean closed = false;
@@ -119,4 +122,5 @@ class DocumentQueue {
return Optional.empty();
}
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/DryRunGatewayConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/DryRunGatewayConnection.java
index 058cc8411c0..23ab5e36e14 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/DryRunGatewayConnection.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/DryRunGatewayConnection.java
@@ -57,4 +57,5 @@ public class DryRunGatewayConnection implements GatewayConnection {
@Override
public void close() { }
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/EndpointIOException.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/EndpointIOException.java
index f75a5b122d7..ae15f6ec22b 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/EndpointIOException.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/EndpointIOException.java
@@ -7,9 +7,11 @@ import java.io.IOException;
/**
* Class for throwing exception from endpoint.
+ *
* @author dybis
*/
public class EndpointIOException extends IOException {
+
private final Endpoint endpoint;
private static final long serialVersionUID = 29335813211L;
@@ -21,4 +23,5 @@ public class EndpointIOException extends IOException {
public Endpoint getEndpoint() {
return endpoint;
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/EndpointResultQueue.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/EndpointResultQueue.java
index 405ecf8ade2..98dd067b7c5 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/EndpointResultQueue.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/EndpointResultQueue.java
@@ -18,11 +18,11 @@ import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;
/**
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.22
+ * @author Einar M R Rosenvinge
*/
@Beta
class EndpointResultQueue {
+
private static Logger log = Logger.getLogger(EndpointResultQueue.class.getName());
private final OperationProcessor operationProcessor;
private final Map<String, TimerFuture> futureByOperation = new HashMap<>();
@@ -58,8 +58,7 @@ class EndpointResultQueue {
resultReceived(result, clusterId, true);
}
- private synchronized void resultReceived(
- EndpointResult result, int clusterId, boolean duplicateGivesWarning) {
+ private synchronized void resultReceived(EndpointResult result, int clusterId, boolean duplicateGivesWarning) {
operationProcessor.resultReceived(result, clusterId);
TimerFuture timerFuture = futureByOperation.remove(result.getOperationId());
@@ -133,4 +132,5 @@ class EndpointResultQueue {
return future;
}
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/GatewayConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/GatewayConnection.java
index 8fe17d30a5d..3e5bdfe3056 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/GatewayConnection.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/GatewayConnection.java
@@ -9,6 +9,7 @@ import java.io.InputStream;
import java.util.List;
public interface GatewayConnection {
+
InputStream writeOperations(List<Document> docs) throws ServerResponseException, IOException;
InputStream drain() throws ServerResponseException, IOException;
@@ -20,4 +21,5 @@ public interface GatewayConnection {
void handshake() throws ServerResponseException, IOException;
void close();
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/GatewayThrottler.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/GatewayThrottler.java
index fc495249c30..cc637904553 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/GatewayThrottler.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/GatewayThrottler.java
@@ -10,6 +10,7 @@ import java.util.Random;
* @author dybis
*/
public class GatewayThrottler {
+
private long backOffTimeMs = 0;
private final long maxSleepTimeMs;
private static Random random = new Random();
@@ -42,4 +43,5 @@ public class GatewayThrottler {
Double result = expected * factor;
return result.intValue();
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java
index 2d4dc26395a..7874dcb24ab 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java
@@ -23,11 +23,12 @@ import java.util.logging.Logger;
/**
* Class for handling asynchronous feeding of new documents and processing of results.
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.20
+ *
+ * @author Einar M R Rosenvinge
*/
@Beta
class IOThread implements Runnable, AutoCloseable {
+
private static Logger log = Logger.getLogger(IOThread.class.getName());
private final Endpoint endpoint;
private final GatewayConnection client;
@@ -403,4 +404,5 @@ class IOThread implements Runnable, AutoCloseable {
resultQueue.failOperation(endpointResult, clusterId);
}
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/ConcurrentDocumentOperationBlocker.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/ConcurrentDocumentOperationBlocker.java
index 5709032f2d7..366675d083c 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/ConcurrentDocumentOperationBlocker.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/ConcurrentDocumentOperationBlocker.java
@@ -5,6 +5,7 @@ import java.util.concurrent.Semaphore;
/**
* A semaphore that can be re-sized.
+ *
* @author dybis
*/
final public class ConcurrentDocumentOperationBlocker {
@@ -64,4 +65,5 @@ final public class ConcurrentDocumentOperationBlocker {
super.reducePermits(reduction);
}
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/DocumentSendInfo.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/DocumentSendInfo.java
index 13399486714..54eac939b9f 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/DocumentSendInfo.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/DocumentSendInfo.java
@@ -12,6 +12,7 @@ import java.util.Map;
* This class is NOT thread-safe by design.
*/
class DocumentSendInfo {
+
private final Document document;
private final Map<Integer, Result.Detail> detailByClusterId = new HashMap<>();
// This is lazily populated as normal cases does not require retries.
@@ -68,4 +69,5 @@ class DocumentSendInfo {
Document getDocument() {
return document;
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/EndPointResultFactory.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/EndPointResultFactory.java
index eb6572d4dbb..129e3ca245b 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/EndPointResultFactory.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/EndPointResultFactory.java
@@ -18,11 +18,11 @@ import java.util.List;
import java.util.logging.Logger;
/**
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.20
+ * @author Einar M R Rosenvinge
*/
@Beta
public final class EndPointResultFactory {
+
private static Logger log = Logger.getLogger(EndPointResultFactory.class.getName());
private static final String EMPTY_MESSAGE = "-";
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/IncompleteResultsThrottler.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/IncompleteResultsThrottler.java
index 8721bfb53fa..6ecbb56888e 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/IncompleteResultsThrottler.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/IncompleteResultsThrottler.java
@@ -30,6 +30,7 @@ import java.util.Random;
* @author dybis
*/
public class IncompleteResultsThrottler {
+
private final ConcurrentDocumentOperationBlocker blocker = new ConcurrentDocumentOperationBlocker();
private final int maxInFlightValue;
private final int minInFlightValue;
@@ -180,4 +181,5 @@ public class IncompleteResultsThrottler {
tryBoostingSizeIfMinValueOverSeveralCycles(size), maxInFlightValue));
blocker.setMaxConcurrency(maxInFlightNow);
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationProcessor.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationProcessor.java
index 605830a3205..37def9b9a54 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationProcessor.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationProcessor.java
@@ -29,11 +29,12 @@ import java.util.logging.Logger;
/**
* Merges several endpointResult into one Result and does the callback.
+ *
* @author dybis
- * @since 5.1.20
*/
@Beta
public class OperationProcessor {
+
private static final Logger log = Logger.getLogger(OperationProcessor.class.getName());
private final Map<String, DocumentSendInfo> docSendInfoByOperationId = new HashMap<>();
private final ArrayListMultimap<String, Document> blockedDocumentsByDocumentId = ArrayListMultimap.create();
@@ -244,12 +245,10 @@ public class OperationProcessor {
try {
clusterConnection.post(document);
} catch (EndpointIOException eio) {
- resultReceived(
- EndPointResultFactory.createError(
- eio.getEndpoint(),
- document.getOperationId(),
- eio),
- clusterConnection.getClusterId());
+ resultReceived(EndPointResultFactory.createError(eio.getEndpoint(),
+ document.getOperationId(),
+ eio),
+ clusterConnection.getClusterId());
}
}
@@ -298,4 +297,5 @@ public class OperationProcessor {
throw new RuntimeException("Did not manage to shut down retry threads. Please report problem.");
}
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationStats.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationStats.java
index b407cc67e9e..a28c2f9805f 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationStats.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationStats.java
@@ -14,6 +14,7 @@ import java.io.Writer;
import java.util.List;
public class OperationStats {
+
private static JsonFactory jsonFactory = new JsonFactory();
private final String sessionParamsAsXmlString;
private List<ClusterConnection> clusters;
@@ -65,4 +66,5 @@ public class OperationStats {
return "{ \"Error\" : \""+ e.getMessage() + "\"}";
}
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/CommandLineArguments.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/CommandLineArguments.java
index 598c64a20a6..23fb788f116 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/CommandLineArguments.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/CommandLineArguments.java
@@ -19,6 +19,7 @@ import java.util.concurrent.TimeUnit;
/**
* Commandline interface for the binary.
+ *
* @author dybis
*/
@Beta
@@ -28,6 +29,7 @@ public class CommandLineArguments {
/**
* Creates a CommandLineArguments instance and populates it with data.
+ *
* @param args array of arguments.
* @return null on failure or if help option is set to true.
*/
@@ -223,4 +225,5 @@ public class CommandLineArguments {
}
return builder.build();
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/FormatInputStream.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/FormatInputStream.java
index 302a4ce03f5..36cdf18e102 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/FormatInputStream.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/FormatInputStream.java
@@ -21,6 +21,7 @@ import java.util.Optional;
* @author valerijf
*/
public class FormatInputStream {
+
private InputStream inputStream;
private Format format;
@@ -100,4 +101,5 @@ public class FormatInputStream {
public enum Format {
JSON, XML
}
+
}
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/Runner.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/Runner.java
index 164c2524483..0983d893ecc 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/Runner.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/Runner.java
@@ -14,11 +14,11 @@ import java.util.Optional;
import java.util.concurrent.atomic.AtomicInteger;
/**
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
+ * @author Einar M R Rosenvinge
* @author dybis
- * @since 5.1.20
*/
public class Runner {
+
/**
* Feed data from inputFile to session.
* @param feedClient where to send data to