Package org.apache.hadoop.hbase.client
Class NoopPartialResultCoprocessorCallback<S,R>
java.lang.Object
org.apache.hadoop.hbase.client.NoopPartialResultCoprocessorCallback<S,R>
- All Implemented Interfaces:
AsyncTable.CoprocessorCallback<R>,AsyncTable.PartialResultCoprocessorCallback<S,R>
@Private
public class NoopPartialResultCoprocessorCallback<S,R>
extends Object
implements AsyncTable.PartialResultCoprocessorCallback<S,R>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptiongetNextCallable(R response, RegionInfo region) Subclasses should implement this to tell AsyncTable whether the given response is "final" or whether the AsyncTable should send another request to the coprocessor to fetch more results from the given region.getWaitInterval(R response, RegionInfo region) Subclasses should implement this such that, when the above method returns non-null, this method returns the duration that AsyncTable should wait before sending the next request to the given region.voidIndicate that all responses of the regions have been notified by callingAsyncTable.CoprocessorCallback.onRegionComplete(RegionInfo, Object)orAsyncTable.CoprocessorCallback.onRegionError(RegionInfo, Throwable).voidIndicate that we got an error which does not belong to any regions.voidonRegionComplete(RegionInfo region, R resp) Indicate that the respose of a region is availablevoidonRegionError(RegionInfo region, Throwable error) Indicate that the error for a region is available
-
Field Details
-
delegate
-
-
Constructor Details
-
NoopPartialResultCoprocessorCallback
-
-
Method Details
-
onRegionComplete
Description copied from interface:AsyncTable.CoprocessorCallbackIndicate that the respose of a region is available- Specified by:
onRegionCompletein interfaceAsyncTable.CoprocessorCallback<S>- Parameters:
region- the region that the response belongs toresp- the response of the coprocessor call
-
onRegionError
Description copied from interface:AsyncTable.CoprocessorCallbackIndicate that the error for a region is available- Specified by:
onRegionErrorin interfaceAsyncTable.CoprocessorCallback<S>- Parameters:
region- the region that the error belongs toerror- the response error of the coprocessor call
-
onComplete
Description copied from interface:AsyncTable.CoprocessorCallbackIndicate that all responses of the regions have been notified by callingAsyncTable.CoprocessorCallback.onRegionComplete(RegionInfo, Object)orAsyncTable.CoprocessorCallback.onRegionError(RegionInfo, Throwable).- Specified by:
onCompletein interfaceAsyncTable.CoprocessorCallback<S>
-
onError
Description copied from interface:AsyncTable.CoprocessorCallbackIndicate that we got an error which does not belong to any regions. Usually a locating error.- Specified by:
onErrorin interfaceAsyncTable.CoprocessorCallback<S>
-
getNextCallable
Description copied from interface:AsyncTable.PartialResultCoprocessorCallbackSubclasses should implement this to tell AsyncTable whether the given response is "final" or whether the AsyncTable should send another request to the coprocessor to fetch more results from the given region. This method of fetching more results can be used many times until there are no more results to fetch from the region.- Specified by:
getNextCallablein interfaceAsyncTable.PartialResultCoprocessorCallback<S,R> - Parameters:
response- The response received from the coprocessorregion- The region the response came from- Returns:
- A ServiceCaller object if the response was not final and therefore another request is required to continuing fetching results. null if no more requests need to be sent to the region.
-
getWaitInterval
Description copied from interface:AsyncTable.PartialResultCoprocessorCallbackSubclasses should implement this such that, when the above method returns non-null, this method returns the duration that AsyncTable should wait before sending the next request to the given region. You can use this to create a back-off behavior to reduce load on the RegionServer. If that's not desired, you can always returnDuration.ZERO.- Specified by:
getWaitIntervalin interfaceAsyncTable.PartialResultCoprocessorCallback<S,R> - Parameters:
response- The response received from the coprocessorregion- The region the response came from- Returns:
- The duration to wait.
-