Interface TabletStateStore
-
- All Superinterfaces:
Iterable<TabletLocationState>
public interface TabletStateStore extends Iterable<TabletLocationState>
Interface for storing information about tablet assignments. There are three implementations:
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Ample.DataLevel
getLevel()
Get the level for this state storestatic TabletStateStore
getStoreForLevel(Ample.DataLevel level, ClientContext context)
static TabletStateStore
getStoreForLevel(Ample.DataLevel level, ClientContext context, CurrentState state)
static TabletStateStore
getStoreForTablet(KeyExtent extent, ServerContext context)
ClosableIterator<TabletLocationState>
iterator()
Scan the information about the tablets covered by this storeString
name()
Identifying name for this tablet state store.void
setFutureLocations(Collection<Assignment> assignments)
Store the assigned locations in the data store.static void
setLocation(ServerContext context, Assignment assignment)
void
setLocations(Collection<Assignment> assignments)
Tablet servers will update the data store with the location when they bring the tablet onlinevoid
suspend(Collection<TabletLocationState> tablets, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers, long suspensionTimestamp)
Mark tablets as having no known or future location, but desiring to be returned to their previous tserver.static void
suspend(ServerContext context, TabletLocationState tls, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers, long suspensionTimestamp)
void
unassign(Collection<TabletLocationState> tablets, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers)
Mark the tablets as having no known or future location.static void
unassign(ServerContext context, TabletLocationState tls, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers)
void
unsuspend(Collection<TabletLocationState> tablets)
Remove a suspension marker for a collection of tablets, moving them to being simply unassigned.-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getLevel
Ample.DataLevel getLevel()
Get the level for this state store
-
name
String name()
Identifying name for this tablet state store.
-
iterator
ClosableIterator<TabletLocationState> iterator()
Scan the information about the tablets covered by this store- Specified by:
iterator
in interfaceIterable<TabletLocationState>
-
setFutureLocations
void setFutureLocations(Collection<Assignment> assignments) throws DistributedStoreException
Store the assigned locations in the data store.- Throws:
DistributedStoreException
-
setLocations
void setLocations(Collection<Assignment> assignments) throws DistributedStoreException
Tablet servers will update the data store with the location when they bring the tablet online- Throws:
DistributedStoreException
-
unassign
void unassign(Collection<TabletLocationState> tablets, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers) throws DistributedStoreException
Mark the tablets as having no known or future location.- Parameters:
tablets
- the tablets' current informationlogsForDeadServers
- a cache of logs in use by servers when they died- Throws:
DistributedStoreException
-
suspend
void suspend(Collection<TabletLocationState> tablets, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers, long suspensionTimestamp) throws DistributedStoreException
Mark tablets as having no known or future location, but desiring to be returned to their previous tserver.- Throws:
DistributedStoreException
-
unsuspend
void unsuspend(Collection<TabletLocationState> tablets) throws DistributedStoreException
Remove a suspension marker for a collection of tablets, moving them to being simply unassigned.- Throws:
DistributedStoreException
-
unassign
static void unassign(ServerContext context, TabletLocationState tls, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers) throws DistributedStoreException
- Throws:
DistributedStoreException
-
suspend
static void suspend(ServerContext context, TabletLocationState tls, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers, long suspensionTimestamp) throws DistributedStoreException
- Throws:
DistributedStoreException
-
setLocation
static void setLocation(ServerContext context, Assignment assignment) throws DistributedStoreException
- Throws:
DistributedStoreException
-
getStoreForTablet
static TabletStateStore getStoreForTablet(KeyExtent extent, ServerContext context)
-
getStoreForLevel
static TabletStateStore getStoreForLevel(Ample.DataLevel level, ClientContext context)
-
getStoreForLevel
static TabletStateStore getStoreForLevel(Ample.DataLevel level, ClientContext context, CurrentState state)
-
-