Class SyncingTabletLocator
- java.lang.Object
-
- org.apache.accumulo.core.clientImpl.TabletLocator
-
- org.apache.accumulo.core.clientImpl.SyncingTabletLocator
-
- Direct Known Subclasses:
TimeoutTabletLocator
public class SyncingTabletLocator extends TabletLocator
Syncs itself with the static collection of TabletLocators, so that when the server clears it, it will automatically get the most up-to-date version. Caching TabletLocators locally is safe when using SyncingTabletLocator.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.accumulo.core.clientImpl.TabletLocator
TabletLocator.TabletLocation, TabletLocator.TabletLocations, TabletLocator.TabletServerMutations<T extends Mutation>
-
-
Constructor Summary
Constructors Constructor Description SyncingTabletLocator(Callable<TabletLocator> getLocatorFunction)SyncingTabletLocator(ClientContext context, TableId tableId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Mutation>
voidbinMutations(ClientContext context, List<T> mutations, Map<String,TabletLocator.TabletServerMutations<T>> binnedMutations, List<T> failures)List<Range>binRanges(ClientContext context, List<Range> ranges, Map<String,Map<KeyExtent,List<Range>>> binnedRanges)voidinvalidateCache()Invalidate entire cachevoidinvalidateCache(Collection<KeyExtent> keySet)voidinvalidateCache(ClientContext context, String server)Invalidate all metadata entries that point to servervoidinvalidateCache(KeyExtent failedExtent)TabletLocator.TabletLocationlocateTablet(ClientContext context, org.apache.hadoop.io.Text row, boolean skipRow, boolean retry)-
Methods inherited from class org.apache.accumulo.core.clientImpl.TabletLocator
clearLocators, getLocator
-
-
-
-
Constructor Detail
-
SyncingTabletLocator
public SyncingTabletLocator(Callable<TabletLocator> getLocatorFunction)
-
SyncingTabletLocator
public SyncingTabletLocator(ClientContext context, TableId tableId)
-
-
Method Detail
-
locateTablet
public TabletLocator.TabletLocation locateTablet(ClientContext context, org.apache.hadoop.io.Text row, boolean skipRow, boolean retry) throws AccumuloException, AccumuloSecurityException, TableNotFoundException
- Specified by:
locateTabletin classTabletLocator- Throws:
AccumuloExceptionAccumuloSecurityExceptionTableNotFoundException
-
binMutations
public <T extends Mutation> void binMutations(ClientContext context, List<T> mutations, Map<String,TabletLocator.TabletServerMutations<T>> binnedMutations, List<T> failures) throws AccumuloException, AccumuloSecurityException, TableNotFoundException
- Specified by:
binMutationsin classTabletLocator- Throws:
AccumuloExceptionAccumuloSecurityExceptionTableNotFoundException
-
binRanges
public List<Range> binRanges(ClientContext context, List<Range> ranges, Map<String,Map<KeyExtent,List<Range>>> binnedRanges) throws AccumuloException, AccumuloSecurityException, TableNotFoundException
- Specified by:
binRangesin classTabletLocator- Throws:
AccumuloExceptionAccumuloSecurityExceptionTableNotFoundException
-
invalidateCache
public void invalidateCache(KeyExtent failedExtent)
- Specified by:
invalidateCachein classTabletLocator
-
invalidateCache
public void invalidateCache(Collection<KeyExtent> keySet)
- Specified by:
invalidateCachein classTabletLocator
-
invalidateCache
public void invalidateCache()
Description copied from class:TabletLocatorInvalidate entire cache- Specified by:
invalidateCachein classTabletLocator
-
invalidateCache
public void invalidateCache(ClientContext context, String server)
Description copied from class:TabletLocatorInvalidate all metadata entries that point to server- Specified by:
invalidateCachein classTabletLocator
-
-