@InterfaceAudience.Private public interface HAContext
HAState
for getting/setting the
current state and performing required operations.Modifier and Type | Method and Description |
---|---|
boolean |
allowStaleReads() |
void |
checkOperation(NameNode.OperationCategory op)
Verify that the given operation category is allowed in the current state.
|
HAState |
getState()
Get the state from the context
|
void |
prepareToStopStandbyServices()
Prepare to exit the standby state
|
void |
setState(HAState state)
Set the state of the context to given
state |
void |
startActiveServices()
Start the services required in active state
|
void |
startStandbyServices()
Start the services required in standby state
|
void |
stopActiveServices()
Stop the services when exiting active state
|
void |
stopStandbyServices()
Stop the services when exiting standby state
|
void |
writeLock()
Take a write-lock on the underlying namesystem
so that no concurrent state transitions or edits
can be made.
|
void |
writeUnlock()
Unlock the lock taken by
writeLock() |
void setState(HAState state)
state
HAState getState()
void startActiveServices() throws IOException
IOException
void stopActiveServices() throws IOException
IOException
void startStandbyServices() throws IOException
IOException
void prepareToStopStandbyServices() throws ServiceFailedException
ServiceFailedException
void stopStandbyServices() throws IOException
IOException
void writeLock()
void writeUnlock()
writeLock()
void checkOperation(NameNode.OperationCategory op) throws StandbyException
StandbyException
boolean allowStaleReads()
Copyright © 2013 Apache Software Foundation. All rights reserved.