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)
HAContext
state
public HAState getState()
HAContext
public void startActiveServices() throws IOException
HAContext
startActiveServices
in interface HAContext
IOException
public void stopActiveServices() throws IOException
HAContext
stopActiveServices
in interface HAContext
IOException
public void startStandbyServices() throws IOException
HAContext
startStandbyServices
in interface HAContext
IOException
public void prepareToStopStandbyServices() throws ServiceFailedException
HAContext
prepareToStopStandbyServices
in interface HAContext
ServiceFailedException
public void stopStandbyServices() throws IOException
HAContext
stopStandbyServices
in interface HAContext
IOException
public void writeLock()
HAContext
public void writeUnlock()
HAContext
HAContext.writeLock()
writeUnlock
in interface HAContext
public void checkOperation(NameNode.OperationCategory op) throws StandbyException
checkOperation
in interface HAContext
StandbyException
public boolean allowStaleReads()
allowStaleReads
in interface HAContext
Copyright © 2013 Apache Software Foundation. All rights reserved.