public abstract class HaltBytable extends Object implements Bytable
Bytable implementation to read and store halt status.
Halt status is used for master or worker result to determine whether the application should be terminated.
By default master is the only one who has the right to stop the application if halt status in master result, no matter halt status in each worker is true.
One switch in GuaguaConstants#GUAGUA_WORKER_HALT_ENABLE, if enabled, application will be terminated if all workers are halted no matter what is the master halt status.
| Constructor and Description |
|---|
HaltBytable() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
doReadFields(DataInput in)
Read fields from in stream.
|
abstract void |
doWrite(DataOutput out)
Write fields to out stream.
|
boolean |
isHalt()
Return halt status.
|
void |
readFields(DataInput in)
De-serialize the fields of this object from
in. |
void |
setHalt(boolean isHalt)
Set status to halt if
isHalt is true. |
void |
write(DataOutput out)
Serialize the fields of this object to
out. |
public void setHalt(boolean isHalt)
isHalt is true.public boolean isHalt()
public void write(DataOutput out) throws IOException
Bytableout.write in interface Bytableout - DataOuput to serialize this object into.IOException - In case of any io exception.public abstract void doWrite(DataOutput out) throws IOException
IOExceptionpublic void readFields(DataInput in) throws IOException
Bytablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface Bytablein - DataInput to de-seriablize this object from.IOException - In case of any io exception.public abstract void doReadFields(DataInput in) throws IOException
IOExceptionCopyright © 2018. All Rights Reserved.