| Modifier | Constructor and Description |
|---|---|
protected |
NameNode.NameNodeHAContext() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowStaleReads() |
void |
checkOperation(NameNode.OperationCategory op)
Check if an operation of given category is allowed
|
HAState |
getState()
Get the state from the context
|
void |
prepareToStopStandbyServices()
Prepare to exit the standby state
|
void |
setState(HAState s)
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
HAContext.writeLock() |
public void setState(HAState s)
HAContextstatepublic HAState getState()
HAContextpublic void startActiveServices()
throws IOException
HAContextstartActiveServices in interface HAContextIOExceptionpublic void stopActiveServices()
throws IOException
HAContextstopActiveServices in interface HAContextIOExceptionpublic void startStandbyServices()
throws IOException
HAContextstartStandbyServices in interface HAContextIOExceptionpublic void prepareToStopStandbyServices()
throws ServiceFailedException
HAContextprepareToStopStandbyServices in interface HAContextServiceFailedExceptionpublic void stopStandbyServices()
throws IOException
HAContextstopStandbyServices in interface HAContextIOExceptionpublic void writeLock()
HAContextpublic void writeUnlock()
HAContextHAContext.writeLock()writeUnlock in interface HAContextpublic void checkOperation(NameNode.OperationCategory op) throws StandbyException
checkOperation in interface HAContextStandbyExceptionpublic boolean allowStaleReads()
allowStaleReads in interface HAContextCopyright © 2013 Apache Software Foundation. All rights reserved.