Class TabletStateStore
- java.lang.Object
-
- org.apache.accumulo.server.master.state.TabletStateStore
-
- All Implemented Interfaces:
Iterable<TabletLocationState>
- Direct Known Subclasses:
MetaDataStateStore,ZooTabletStateStore
public abstract class TabletStateStore extends Object implements Iterable<TabletLocationState>
Interface for storing information about tablet assignments. There are three implementations: ZooTabletStateStore: information about the root tablet is stored in ZooKeeper MetaDataStateStore: information about the other tablets are stored in the metadata table
-
-
Constructor Summary
Constructors Constructor Description TabletStateStore()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static TabletStateStoregetStoreForTablet(KeyExtent extent, ServerContext context)abstract ClosableIterator<TabletLocationState>iterator()Scan the information about the tablets covered by this storeabstract Stringname()Identifying name for this tablet state store.abstract voidsetFutureLocations(Collection<Assignment> assignments)Store the assigned locations in the data store.static voidsetLocation(ServerContext context, Assignment assignment)abstract voidsetLocations(Collection<Assignment> assignments)Tablet servers will update the data store with the location when they bring the tablet onlineabstract voidsuspend(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 voidsuspend(ServerContext context, TabletLocationState tls, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers, long suspensionTimestamp)abstract voidunassign(Collection<TabletLocationState> tablets, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers)Mark the tablets as having no known or future location.static voidunassign(ServerContext context, TabletLocationState tls, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers)abstract voidunsuspend(Collection<TabletLocationState> tablets)Remove a suspension marker for a collection of tablets, moving them to being simply unassigned.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
name
public abstract String name()
Identifying name for this tablet state store.
-
iterator
public abstract ClosableIterator<TabletLocationState> iterator()
Scan the information about the tablets covered by this store- Specified by:
iteratorin interfaceIterable<TabletLocationState>
-
setFutureLocations
public abstract void setFutureLocations(Collection<Assignment> assignments) throws DistributedStoreException
Store the assigned locations in the data store.- Throws:
DistributedStoreException
-
setLocations
public abstract 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
public abstract 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
public abstract 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
public abstract 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
public static void unassign(ServerContext context, TabletLocationState tls, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers) throws DistributedStoreException
- Throws:
DistributedStoreException
-
suspend
public static void suspend(ServerContext context, TabletLocationState tls, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers, long suspensionTimestamp) throws DistributedStoreException
- Throws:
DistributedStoreException
-
setLocation
public static void setLocation(ServerContext context, Assignment assignment) throws DistributedStoreException
- Throws:
DistributedStoreException
-
getStoreForTablet
protected static TabletStateStore getStoreForTablet(KeyExtent extent, ServerContext context)
-
-