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
-
Constructor Summary
ConstructorDescription -
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.void
Indicate that all responses of the regions have been notified by callingAsyncTable.CoprocessorCallback.onRegionComplete(RegionInfo, Object)
orAsyncTable.CoprocessorCallback.onRegionError(RegionInfo, Throwable)
.void
Indicate that we got an error which does not belong to any regions.void
onRegionComplete
(RegionInfo region, R resp) Indicate that the respose of a region is availablevoid
onRegionError
(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.CoprocessorCallback
Indicate that the respose of a region is available- Specified by:
onRegionComplete
in interfaceAsyncTable.CoprocessorCallback<S>
- Parameters:
region
- the region that the response belongs toresp
- the response of the coprocessor call
-
onRegionError
Description copied from interface:AsyncTable.CoprocessorCallback
Indicate that the error for a region is available- Specified by:
onRegionError
in 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.CoprocessorCallback
Indicate that all responses of the regions have been notified by callingAsyncTable.CoprocessorCallback.onRegionComplete(RegionInfo, Object)
orAsyncTable.CoprocessorCallback.onRegionError(RegionInfo, Throwable)
.- Specified by:
onComplete
in interfaceAsyncTable.CoprocessorCallback<S>
-
onError
Description copied from interface:AsyncTable.CoprocessorCallback
Indicate that we got an error which does not belong to any regions. Usually a locating error.- Specified by:
onError
in interfaceAsyncTable.CoprocessorCallback<S>
-
getNextCallable
Description copied from interface:AsyncTable.PartialResultCoprocessorCallback
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. This method of fetching more results can be used many times until there are no more results to fetch from the region.- Specified by:
getNextCallable
in 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.PartialResultCoprocessorCallback
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. 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:
getWaitInterval
in interfaceAsyncTable.PartialResultCoprocessorCallback<S,
R> - Parameters:
response
- The response received from the coprocessorregion
- The region the response came from- Returns:
- The duration to wait.
-