Package com.yahoo.documentapi
Class VisitorParameters
java.lang.Object
com.yahoo.documentapi.Parameters
com.yahoo.documentapi.VisitorParameters
Parameters for creating or opening a visitor session
- Author:
- Håkon Humberset
-
Constructor Summary
ConstructorsConstructorDescriptionVisitorParameters(VisitorParameters params) Copy constructor.VisitorParameters(String documentSelection) Creates visitor parameters from a document selection expression, using defaults for other parameters. -
Method Summary
Modifier and TypeMethodDescriptionfieldSet()Returns the field set to use.voidSets field set to use.Returns the bucket space to visitSet<com.yahoo.document.BucketId>Returns the control handler.Returns the selection string used for visiting.longReturns the minimum timestamp (in microsecs) of documents the visitor will visit.Returns a map of string → string of arguments that are passed to the visitor library.Returns the local data handler.intintReturns the maximum number of messages each storage visitor will have pending before waiting for acks from client.longReturns the maximum number of documents to visit (max documents returned by the visitor)Returns address to the remote data handler.Returns the filename for reading/storing progress token.Returns the progress token, which can be used to resume visitor.com.yahoo.messagebus.routing.RoutegetRoute()Returns the name of the storage cluster to visit.longReturns session timeout in milliseconds, or -1 if not timeout has been set. -1 implies that session will run to completion without automatically timing out.intintlongReturns the timeout for each sent visitor operation in milliseconds.longReturns the maximum timestamp (in microsecs) of documents the visitor will visit.intbooleanReturns what visitor library to use for the visiting.booleanvoidsetBucketSpace(String bucketSpace) Sets which (single) bucket space this visiting will be against.voidsetBucketsToVisit(Set<com.yahoo.document.BucketId> buckets) voidsetControlHandler(VisitorControlHandler controlHandler) Sets control handler.voidsetDocumentSelection(String selection) Sets the document selection expressionvoidsetFieldSet(String fieldSet) voidsetFromTimestamp(long timestamp) Sets from timestamp in microseconds.voidsetLibraryParameter(String param, byte[] value) Sets a visitor library specific parameter.voidsetLibraryParameter(String param, String value) Sets a visitor library specific parameter.voidsetLibraryParameters(Map<String, byte[]> params) Sets all visitor library specific parameters.voidsetLocalDataHandler(VisitorDataHandler localDataHandler) Sets local data handler.voidsetMaxBucketsPerVisitor(int max) voidsetMaxPending(int maxPending) Sets maximum pending messages one storage visitor will have pending to this client before stalling, waiting for acks.voidsetMaxTotalHits(long max) Sets the maximum number of documents to visit (max documents returned by the visitor)voidsetPriority(DocumentProtocol.Priority priority) voidsetRemoteDataHandler(String remoteDataHandler) Sets address for the remote data handler.voidsetResumeFileName(String fileName) Sets filename for reading/storing progress token.voidsetResumeToken(ProgressToken token) Sets progress token, which can be used to resume visitor.voidsetRoute(com.yahoo.messagebus.routing.Route route) Sets the route to visit.voidSets the name of the storage cluster route to visit.voidsetSessionTimeoutMs(long timeoutMs) Setss timeout for the entire visiting session, in milliseconds. -1 implies infinity.voidsetTimeoutMs(long timeoutMs) Sets the timeout for each visitor command in milliseconds.voidsetToTimestamp(long timestamp) Sets to timestamp in microseconds.voidsetTraceLevel(int traceLevel) voidsetVisitInconsistentBuckets(boolean visitInconsistentBuckets) voidsetVisitorLibrary(String library) Sets which visitor library is used for visiting in storage.voidsetVisitRemoves(boolean visitRemoves) booleanvoidskipBucketsOnFatalErrors(boolean skipBucketsOnFatalErrors) voidslice(int slices, int sliceId) toString()booleanReturns if this method returns true, the visitor will visit inconsistent buckets.voidvisitInconsistentBuckets(boolean visitInconsistentBuckets) Sets whether to visit inconsistent buckets.booleanReturns if this method returns true, the visitor will visit remove entries as well as documents (you can see what documents have been deleted).voidvisitRemoves(boolean visitRemoves) Sets whether to visit remove entries.Methods inherited from class com.yahoo.documentapi.Parameters
getThrottlePolicy, setThrottlePolicy
-
Constructor Details
-
VisitorParameters
Creates visitor parameters from a document selection expression, using defaults for other parameters.- Parameters:
documentSelection- document selection expression
-
VisitorParameters
Copy constructor.- Parameters:
params- object to copy
-
-
Method Details
-
getDocumentSelection
Returns the selection string used for visiting. -
getBucketSpace
Returns the bucket space to visit -
getVisitorLibrary
Returns what visitor library to use for the visiting. The library in question must be installed on each storage node in the target cluster. -
getMaxPending
public int getMaxPending()Returns the maximum number of messages each storage visitor will have pending before waiting for acks from client. -
getTimeoutMs
public long getTimeoutMs()Returns the timeout for each sent visitor operation in milliseconds. -
getSessionTimeoutMs
public long getSessionTimeoutMs()Returns session timeout in milliseconds, or -1 if not timeout has been set. -1 implies that session will run to completion without automatically timing out. -
getFromTimestamp
public long getFromTimestamp()Returns the minimum timestamp (in microsecs) of documents the visitor will visit. -
getToTimestamp
public long getToTimestamp()Returns the maximum timestamp (in microsecs) of documents the visitor will visit. -
visitRemoves
public boolean visitRemoves()Returns if this method returns true, the visitor will visit remove entries as well as documents (you can see what documents have been deleted). -
getVisitRemoves
public boolean getVisitRemoves() -
fieldSet
Returns the field set to use. -
getFieldSet
-
visitInconsistentBuckets
public boolean visitInconsistentBuckets()Returns if this method returns true, the visitor will visit inconsistent buckets. -
getVisitInconsistentBuckets
public boolean getVisitInconsistentBuckets() -
getLibraryParameters
Returns a map of string → string of arguments that are passed to the visitor library. -
getResumeToken
Returns the progress token, which can be used to resume visitor. -
getResumeFileName
Returns the filename for reading/storing progress token. -
getRemoteDataHandler
Returns address to the remote data handler. -
getLocalDataHandler
Returns the local data handler. -
getControlHandler
Returns the control handler. -
getPriority
-
setDocumentSelection
Sets the document selection expression -
setBucketSpace
Sets which (single) bucket space this visiting will be against. -
setVisitorLibrary
Sets which visitor library is used for visiting in storage. DumpVisitor is most common implementation. -
setMaxPending
public void setMaxPending(int maxPending) Sets maximum pending messages one storage visitor will have pending to this client before stalling, waiting for acks. -
setTimeoutMs
public void setTimeoutMs(long timeoutMs) Sets the timeout for each visitor command in milliseconds. -
setSessionTimeoutMs
public void setSessionTimeoutMs(long timeoutMs) Setss timeout for the entire visiting session, in milliseconds. -1 implies infinity. If the session takes more time than this to complete, it will automatically be failed with CompletionCode.TIMEOUT. If no session timeout has been explicitly set (or it has been set to -1), visiting will continue until it completes or abort()/destroy() is called on the session instance. -
setFromTimestamp
public void setFromTimestamp(long timestamp) Sets from timestamp in microseconds. Documents put/updated before this timestamp will not be visited. -
setToTimestamp
public void setToTimestamp(long timestamp) Sets to timestamp in microseconds. Documents put/updated after this timestamp will not be visited. -
visitRemoves
public void visitRemoves(boolean visitRemoves) Sets whether to visit remove entries. That is, entries saying that some document has been removed. -
setVisitRemoves
public void setVisitRemoves(boolean visitRemoves) -
fieldSet
Sets field set to use. -
setFieldSet
-
visitInconsistentBuckets
public void visitInconsistentBuckets(boolean visitInconsistentBuckets) Sets whether to visit inconsistent buckets. -
setVisitInconsistentBuckets
public void setVisitInconsistentBuckets(boolean visitInconsistentBuckets) -
setLibraryParameter
Sets a visitor library specific parameter. -
setLibraryParameter
Sets a visitor library specific parameter. -
setLibraryParameters
Sets all visitor library specific parameters. -
setResumeToken
Sets progress token, which can be used to resume visitor. -
setResumeFileName
Sets filename for reading/storing progress token. If the file exists and contains progress data, visitor should resume visiting from this point. -
setRemoteDataHandler
Sets address for the remote data handler. -
setLocalDataHandler
Sets local data handler. -
setControlHandler
Sets control handler. -
setRoute
Sets the name of the storage cluster route to visit. Default is "storage/cluster.storage". -
setRoute
public void setRoute(com.yahoo.messagebus.routing.Route route) Sets the route to visit. -
getRoute
public com.yahoo.messagebus.routing.Route getRoute()Returns the name of the storage cluster to visit. -
setMaxTotalHits
public void setMaxTotalHits(long max) Sets the maximum number of documents to visit (max documents returned by the visitor) -
getMaxTotalHits
public long getMaxTotalHits()Returns the maximum number of documents to visit (max documents returned by the visitor) -
getBucketsToVisit
-
setBucketsToVisit
-
getMaxBucketsPerVisitor
public int getMaxBucketsPerVisitor() -
setMaxBucketsPerVisitor
public void setMaxBucketsPerVisitor(int max) -
setTraceLevel
public void setTraceLevel(int traceLevel) -
getTraceLevel
public int getTraceLevel() -
setPriority
-
skipBucketsOnFatalErrors
public boolean skipBucketsOnFatalErrors() -
skipBucketsOnFatalErrors
public void skipBucketsOnFatalErrors(boolean skipBucketsOnFatalErrors) -
slice
public void slice(int slices, int sliceId) -
getSlices
public int getSlices() -
getSliceId
public int getSliceId() -
toString
-