public class ZooTabletStateStore extends TabletStateStore
Constructor and Description |
---|
ZooTabletStateStore(DistributedStore store) |
ZooTabletStateStore(ServerContext context) |
Modifier and Type | Method and Description |
---|---|
ClosableIterator<TabletLocationState> |
iterator()
Scan the information about the tablets covered by this store
|
String |
name()
Identifying name for this tablet state store.
|
protected TServerInstance |
parse(byte[] current) |
void |
setFutureLocations(Collection<Assignment> assignments)
Store the assigned locations in the data store.
|
void |
setLocations(Collection<Assignment> assignments)
Tablet servers will update the data store with the location when they bring the tablet online
|
void |
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.
|
void |
unassign(Collection<TabletLocationState> tablets,
Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers)
Mark the tablets as having no known or future location.
|
void |
unsuspend(Collection<TabletLocationState> tablets)
Remove a suspension marker for a collection of tablets, moving them to being simply unassigned.
|
getStoreForTablet, setLocation, suspend, unassign
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ZooTabletStateStore(DistributedStore store)
public ZooTabletStateStore(ServerContext context)
public ClosableIterator<TabletLocationState> iterator()
TabletStateStore
iterator
in interface Iterable<TabletLocationState>
iterator
in class TabletStateStore
protected TServerInstance parse(byte[] current)
public void setFutureLocations(Collection<Assignment> assignments) throws DistributedStoreException
TabletStateStore
setFutureLocations
in class TabletStateStore
DistributedStoreException
public void setLocations(Collection<Assignment> assignments) throws DistributedStoreException
TabletStateStore
setLocations
in class TabletStateStore
DistributedStoreException
public void unassign(Collection<TabletLocationState> tablets, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers) throws DistributedStoreException
TabletStateStore
unassign
in class TabletStateStore
tablets
- the tablets' current informationlogsForDeadServers
- a cache of logs in use by servers when they diedDistributedStoreException
public void suspend(Collection<TabletLocationState> tablets, Map<TServerInstance,List<org.apache.hadoop.fs.Path>> logsForDeadServers, long suspensionTimestamp) throws DistributedStoreException
TabletStateStore
suspend
in class TabletStateStore
DistributedStoreException
public void unsuspend(Collection<TabletLocationState> tablets)
TabletStateStore
unsuspend
in class TabletStateStore
public String name()
TabletStateStore
name
in class TabletStateStore
Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.