org.apache.accumulo.server.master
Class Master
java.lang.Object
org.apache.accumulo.server.master.Master
- All Implemented Interfaces:
- LiveTServerSet.Listener, CurrentState, TableObserver
public class Master
- extends Object
- implements LiveTServerSet.Listener, TableObserver, CurrentState
The Master is responsible for assigning and balancing tablets to tablet servers.
The master will also coordinate log recoveries and reports general status.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Master
public Master(ServerConfiguration config,
org.apache.hadoop.fs.FileSystem fs,
String hostname)
throws IOException
- Throws:
IOException
stillMaster
public boolean stillMaster()
mustBeOnline
public void mustBeOnline(String tableId)
throws ThriftTableOperationException
- Throws:
ThriftTableOperationException
getConnector
public Connector getConnector()
throws AccumuloException,
AccumuloSecurityException
- Throws:
AccumuloException
AccumuloSecurityException
createInstanceFromPropertyName
public static <T> T createInstanceFromPropertyName(AccumuloConfiguration conf,
Property property,
Class<T> base,
T defaultInstance)
getConnection
public LiveTServerSet.TServerConnection getConnection(TServerInstance server)
getMergeInfo
public MergeInfo getMergeInfo(KeyExtent tablet)
getMergeInfo
public MergeInfo getMergeInfo(org.apache.hadoop.io.Text tableId)
setMergeState
public void setMergeState(MergeInfo info,
MergeState state)
throws IOException,
org.apache.zookeeper.KeeperException,
InterruptedException
- Throws:
IOException
org.apache.zookeeper.KeeperException
InterruptedException
clearMergeState
public void clearMergeState(org.apache.hadoop.io.Text tableId)
throws IOException,
org.apache.zookeeper.KeeperException,
InterruptedException
- Throws:
IOException
org.apache.zookeeper.KeeperException
InterruptedException
hasCycled
public boolean hasCycled(long time)
clearMigrations
public void clearMigrations(String tableId)
run
public void run()
throws IOException,
InterruptedException,
org.apache.zookeeper.KeeperException
- Throws:
IOException
InterruptedException
org.apache.zookeeper.KeeperException
getMasterLock
public ZooLock getMasterLock()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
update
public void update(LiveTServerSet current,
Set<TServerInstance> deleted,
Set<TServerInstance> added)
- Specified by:
update
in interface LiveTServerSet.Listener
stateChanged
public void stateChanged(String tableId,
TableState state)
- Specified by:
stateChanged
in interface TableObserver
initialize
public void initialize(Map<String,TableState> tableIdToStateMap)
- Specified by:
initialize
in interface TableObserver
sessionExpired
public void sessionExpired()
- Specified by:
sessionExpired
in interface TableObserver
onlineTables
public Set<String> onlineTables()
- Specified by:
onlineTables
in interface CurrentState
onlineTabletServers
public Set<TServerInstance> onlineTabletServers()
- Specified by:
onlineTabletServers
in interface CurrentState
merges
public Collection<MergeInfo> merges()
- Specified by:
merges
in interface CurrentState
killTServer
public void killTServer(TServerInstance server)
shutdownTServer
public void shutdownTServer(TServerInstance server)
getEventCoordinator
public EventCoordinator getEventCoordinator()
getInstance
public Instance getInstance()
getSystemConfiguration
public AccumuloConfiguration getSystemConfiguration()
getConfiguration
public ServerConfiguration getConfiguration()
getFileSystem
public org.apache.hadoop.fs.FileSystem getFileSystem()
updateRecoveryInProgress
public void updateRecoveryInProgress(String file)
Copyright © 2013 Apache Accumulo Project. All Rights Reserved.