Class TabletLocationState
- java.lang.Object
-
- org.apache.accumulo.core.metadata.TabletLocationState
-
public class TabletLocationState extends Object
When a tablet is assigned, we mark its future location. When the tablet is opened, we set its current location. A tablet should never have both a future and current location. A tablet server is always associated with a unique session id. If the current tablet server has a different session, we know the location information is out-of-date.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TabletLocationState.BadLocationStateException
-
Field Summary
Fields Modifier and Type Field Description boolean
chopped
TabletMetadata.Location
current
KeyExtent
extent
TabletMetadata.Location
future
TabletMetadata.Location
last
SuspendingTServer
suspend
Collection<Collection<String>>
walogs
-
Constructor Summary
Constructors Constructor Description TabletLocationState(KeyExtent extent, TabletMetadata.Location future, TabletMetadata.Location current, TabletMetadata.Location last, SuspendingTServer suspend, Collection<Collection<String>> walogs, boolean chopped)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TabletMetadata.Location
futureOrCurrent()
TServerInstance
futureOrCurrentServer()
TServerInstance
getCurrentServer()
TServerInstance
getFutureServer()
TServerInstance
getLastServer()
TabletMetadata.Location
getLocation()
TServerInstance
getServer()
TabletState
getState(Set<TServerInstance> liveServers)
boolean
hasCurrent()
boolean
hasFuture()
boolean
hasSuspend()
protected static TServerInstance
serverInstance(TabletMetadata.Location location)
String
toString()
-
-
-
Field Detail
-
extent
public final KeyExtent extent
-
future
public final TabletMetadata.Location future
-
current
public final TabletMetadata.Location current
-
last
public final TabletMetadata.Location last
-
suspend
public final SuspendingTServer suspend
-
walogs
public final Collection<Collection<String>> walogs
-
chopped
public final boolean chopped
-
-
Constructor Detail
-
TabletLocationState
public TabletLocationState(KeyExtent extent, TabletMetadata.Location future, TabletMetadata.Location current, TabletMetadata.Location last, SuspendingTServer suspend, Collection<Collection<String>> walogs, boolean chopped) throws TabletLocationState.BadLocationStateException
-
-
Method Detail
-
getCurrentServer
public TServerInstance getCurrentServer()
-
getFutureServer
public TServerInstance getFutureServer()
-
getLastServer
public TServerInstance getLastServer()
-
futureOrCurrentServer
public TServerInstance futureOrCurrentServer()
-
futureOrCurrent
public TabletMetadata.Location futureOrCurrent()
-
getServer
public TServerInstance getServer()
-
getLocation
public TabletMetadata.Location getLocation()
-
hasCurrent
public boolean hasCurrent()
-
hasFuture
public boolean hasFuture()
-
hasSuspend
public boolean hasSuspend()
-
getState
public TabletState getState(Set<TServerInstance> liveServers)
-
serverInstance
protected static TServerInstance serverInstance(TabletMetadata.Location location)
-
-