Package com.yahoo.vespa.http.client
Class SimpleLoggerResultCallback
java.lang.Object
com.yahoo.vespa.http.client.SimpleLoggerResultCallback
- All Implemented Interfaces:
FeedClient.ResultCallback
@Deprecated
public class SimpleLoggerResultCallback
extends Object
implements FeedClient.ResultCallback
Deprecated.
Vespa-http-client will be removed in Vespa 8. It's replaced by vespa-feed-client
Simple implementation of the ResultCallback that logs to std err for every X documents:
"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
-
Constructor Summary
ConstructorDescriptionSimpleLoggerResultCallback
(AtomicInteger sentDocumentCounter, int printStatsForEveryXDocument, boolean ignoreConditionNotMet) Deprecated.Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected com.yahoo.vespa.http.client.SimpleLoggerResultCallback.DocumentRate
newSamplingPeriod
(Instant now) Deprecated.void
onCompletion
(String docId, Result documentResult) Deprecated.This callback is always called exactly once for each feed operation passed to the client instance, whether or not it was successful.protected void
Deprecated.void
Deprecated.Prints how many documents that are received, failed and sent.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.yahoo.vespa.http.client.FeedClient.ResultCallback
onEndpointException
-
Constructor Details
-
SimpleLoggerResultCallback
public SimpleLoggerResultCallback(AtomicInteger sentDocumentCounter, int printStatsForEveryXDocument, boolean ignoreConditionNotMet) Deprecated.Constructor- Parameters:
sentDocumentCounter
- a counter that is increased outside this class, but can be nice to print here.printStatsForEveryXDocument
- how often to print stats.
-
-
Method Details
-
println
Deprecated. -
printProgress
public void printProgress()Deprecated.Prints how many documents that are received, failed and sent. -
newSamplingPeriod
protected com.yahoo.vespa.http.client.SimpleLoggerResultCallback.DocumentRate newSamplingPeriod(Instant now) Deprecated. -
onCompletion
Deprecated.Description copied from interface:FeedClient.ResultCallback
This callback is always called exactly once for each feed operation passed to the client instance, whether or not it was successful.- Specified by:
onCompletion
in interfaceFeedClient.ResultCallback
-