@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)
stateHAState getState()
void startActiveServices()
throws IOException
IOExceptionvoid stopActiveServices()
throws IOException
IOExceptionvoid startStandbyServices()
throws IOException
IOExceptionvoid prepareToStopStandbyServices()
throws ServiceFailedException
ServiceFailedExceptionvoid stopStandbyServices()
throws IOException
IOExceptionvoid writeLock()
void writeUnlock()
writeLock()void checkOperation(NameNode.OperationCategory op) throws StandbyException
StandbyExceptionboolean allowStaleReads()
Copyright © 2013 Apache Software Foundation. All rights reserved.