demo.repair
Class RepairDirectoryTest2
java.lang.Object
|
+--ostore.util.StandardStage
|
+--demo.repair.RepairDirectoryTest2
- All Implemented Interfaces:
- EventHandlerIF, SingleThreadedEventHandlerIF
- public class RepairDirectoryTest2
- extends StandardStage
- implements SingleThreadedEventHandlerIF
RepairDirectoryTest2
refreshes disseminatables
that have lost some of their redundancy. That is,
RepairDirectoryTest2
receives the threshold trigger
from tapestry, retrieves the disseminatables from remaining storage
servers, reconstructs the original object, recreates disseminatables,
and redisseminates disseminatables. Note: the disseminatables are replicas
for now.
- Receive DDRepairObjReq
- Send RepairReq to all remaining nodes
- All remaining nodes respond back with lifetime.
- Should also send request to dead nodes???
- After enough respond or timeout, we can elect the leader,
the oldest remaining node.
- Subordinate dissemination correctness conditions
- The leader will do steps 2 - 5.
- The leader should be the oldest remaining member
- If the leader does not get to step 5 in enough time
then next oldest node in the sorted set becomes the leader.
- Leader dissemination
- Obtain a new dissemination set that includes remaining nodes
- send disseminatables to remaining and new storage servers.
- wait for enough responses.
- if not enough responses, than send to extra nodes.
- If the two basic dissemination attempts fail, than repair
has failed.
- Version:
- $Id: RepairDirectoryTest2.java,v 1.21 2004/06/07 03:14:48 hweather Exp $
- Author:
- Hakim Weatherspoon
- See Also:
TriggerStage
Nested Class Summary |
static class |
RepairDirectoryTest2.DisseminateReq
DisseminateReq is a request sent by the leader;
that is, node responsible for coordinating the repair of an object
replicated on a set of nodes. |
static class |
RepairDirectoryTest2.DisseminateResp
DisseminateResp is either an ack or
nack response sent to the leader acknowedging
the receipt of the disseminatable and the willingness to be a
storage server. |
static class |
RepairDirectoryTest2.RepairReq
RepairReq is request sent to all remaining nodes
to send back their lifetime. |
static class |
RepairDirectoryTest2.RepairResp
RepairResp is contains the nodes lifetime and is the
response to the RepairReq . |
Fields inherited from class ostore.util.StandardStage |
classifier, DEBUG, event_types, inb_msg_types, logger, my_node_id, my_sink, outb_msg_types, resender, resender_tokens, serializable_types, sim_running, tag |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STATE_STRING
public static final String[] STATE_STRING
- Strings corresponding to repair states. Used for debugging.
_additional_simulated_size
protected int _additional_simulated_size
- Number of bytes that the msg is simulating.
RepairDirectoryTest2
public RepairDirectoryTest2()
throws Exception
- Constructor: Creates a new
RepairDirectoryTest2
stage.
handleEvent
public void handleEvent(QueueElementIF item)
throws EventHandlerException
- Specified by seda.sandStorm.api.EventHandlerIF
- Specified by:
handleEvent
in interface EventHandlerIF
EventHandlerException
init
public void init(ConfigDataIF config)
throws Exception
- Specified by seda.sandStorm.api.EventHandlerIF
- Specified by:
init
in interface EventHandlerIF
- Overrides:
init
in class StandardStage
Exception