ostore.archive
Class GenerateFragsStage
java.lang.Object
|
+--ostore.archive.GenerateFragsStage
- All Implemented Interfaces:
- EventHandlerIF, ProfilableIF
- public class GenerateFragsStage
- extends Object
- implements EventHandlerIF, ProfilableIF
The GenerateChkptStage generates a checkpoint for a
particular version. The result is a V-GUID or version GUID.
The GenerateChkptStage creates a checkpoint by sending a
GenerateFragsBlkReq for each
uniquely modified VerifiableBlock.
When the checkpointing process is done, all
uniquely modified
VerifiableBlocks have been
Erasure encoded into n Fragments and
a BucketsToDisseminateEvent containing
the resulting GUID's of all the uniquely modified
VerifiableBlocks has been
dispatched.
Fragments are the main mechanism that provides durability in
OceanStore. Each Fragment is self-verifying and the
cornerstone of the archival layer's fault tolerance and automatic repair.
A Fragment is produced from an Erasure coding process,
where the Erasure code treats input data as a series of
m Fragments, which it transforms into n
Fragment, where n > m. The resulting code's
essential perperty is that any m of the coded
Fragments are sufficient to reconstruct the original data.
The rate of encoding is r = m/n<1. The
storage overhead is 1/r. The system can adjust the
durability of information by selecting the rate (and hence
storage overhead).
USAGE
To create a checkpoint dispatch a
GenerateFragsChkptReq containing the
CacheableIdentity (i.e. VHASH) of the top
VerifiableBlock, the number of
Fragments to Erasure encode, the inverse
rate of encoding, and the Erasure code type.
The local GenerateChkptStage will receive the
checkpoint request message and return a
GenerateFragsChkptResp that
either includes the resulting V-GUID.
INITIALIZATION PARAMETERS
- node_id
NodeId of the local server where this stage
is running.
- Version:
- $Id: GenerateFragsStage.java,v 1.64 2004/05/13 20:13:06 hweather Exp $
- Author:
- Hakim Weatherspoon
- See Also:
GenerateFragsBlkReq,
GenerateFragsBlkResp,
GenerateFragsChkptReq,
GenerateFragsChkptResp,
BucketsToDisseminateEvent,
Erasure,
Disseminatable,
Fragment,
VerifiableBlock,
DataObject,
Btree.InteriorNode,
DataObject.DataBlock
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenerateFragsStage
public GenerateFragsStage()
getInstance
public static SinkIF getInstance(NodeId node_id)
getInstance returns the SinkIF associated
with the given node_id.
- Parameters:
node_id - = NodeId to test.
- Returns:
SinkIF instance assiociated with given
node_id.
handleEvent
public void handleEvent(QueueElementIF item)
throws EventHandlerException
- Specified by:
handleEvent in interface EventHandlerIF
EventHandlerException
handleEvents
public void handleEvents(QueueElementIF[] items)
throws EventHandlerException
- Specified by:
handleEvents in interface EventHandlerIF
EventHandlerException
init
public void init(ConfigDataIF config)
throws Exception
- Specified by:
init in interface EventHandlerIF
Exception
destroy
public void destroy()
throws Exception
- Specified by:
destroy in interface EventHandlerIF
Exception
profileSize
public int profileSize()
- Specified by:
profileSize in interface ProfilableIF