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 and loggers 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(String[] args)
throws IOException
- Throws:
IOException
stillMaster
public boolean stillMaster()
mustBeOnline
public void mustBeOnline(String tableId)
throws ThriftTableOperationException
- Throws:
ThriftTableOperationException
createInstanceFromPropertyName
public static <T> T createInstanceFromPropertyName(Property property,
Class<T> base,
T defaultInstance)
getConnection
public LiveTServerSet.TServerConnection getConnection(TServerInstance server)
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
newLogger
public void newLogger(String address)
deadLogger
public void deadLogger(String address)
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
getLoggers
public Map<String,String> getLoggers()
merges
public Collection<MergeInfo> merges()
- Specified by:
merges
in interface CurrentState
finished
public void finished(org.apache.accumulo.server.master.CoordinateRecoveryTask.LogFile entry)
killTServer
public void killTServer(TServerInstance server)
shutdownTServer
public void shutdownTServer(TServerInstance server)
getEventCoordinator
public EventCoordinator getEventCoordinator()
getInstance
public Instance getInstance()
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.