org.apache.accumulo.server.master.state
Class TabletStateStore

java.lang.Object
  extended by 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
TabletStateStore()
           
 
Method Summary
abstract  Iterator<TabletLocationState> iterator()
          Scan the information about the tablets covered by this store
abstract  String name()
          Identifying name for this tablet state store.
abstract  void setFutureLocations(Collection<Assignment> assignments)
          Store the assigned locations in the data store.
static void setLocation(Assignment assignment)
           
abstract  void setLocations(Collection<Assignment> assignments)
          Tablet servers will update the data store with the location when they bring the tablet online
abstract  void unassign(Collection<TabletLocationState> tablets)
          Mark the tablets as having no known or future location.
static void unassign(TabletLocationState tls)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabletStateStore

public TabletStateStore()
Method Detail

name

public abstract String name()
Identifying name for this tablet state store.


iterator

public abstract Iterator<TabletLocationState> iterator()
Scan the information about the tablets covered by this store

Specified by:
iterator in interface Iterable<TabletLocationState>

setFutureLocations

public abstract void setFutureLocations(Collection<Assignment> assignments)
                                 throws DistributedStoreException
Store the assigned locations in the data store.

Parameters:
assignments -
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

Parameters:
assignments -
Throws:
DistributedStoreException

unassign

public abstract void unassign(Collection<TabletLocationState> tablets)
                       throws DistributedStoreException
Mark the tablets as having no known or future location.

Parameters:
tablets - the tablets' current information
Throws:
DistributedStoreException

unassign

public static void unassign(TabletLocationState tls)
                     throws DistributedStoreException
Throws:
DistributedStoreException

setLocation

public static void setLocation(Assignment assignment)
                        throws DistributedStoreException
Throws:
DistributedStoreException


Copyright © 2013 Apache Accumulo Project. All Rights Reserved.