> On 2010-07-23 16:35:42, Jonathan Gray wrote: > > Thinking on it, I will probably need to not just blindly force something to > > OFFLINE in the masters force to OFFLINE. Though any state will be able to > > be transitioned to OFFLINE (during recovery, we may need to restart the > > assignment of something, setting to OFFLINE first is what allows us to > > timeout if for some reason an RS doesn't respond/act on an OPEN rpc), we > > will want to use more of a CAS operation so we don't accidentally miss a > > transition on that node. > > > > For example, we may timeout an OFFLINE because it took too long, so we want > > to switch it back to a new version of OFFLINE and assign to someone else. > > We'll want to ensure when setting to OFFLINE it's still in the previously > > seen OFFLINE version, otherwise a server may have started OPENING in > > between our check and set.
(this is not totally clear to me yet, going to wait until i get a bit further in integration of this class) - Jonathan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://review.hbase.org/r/382/#review476 ----------------------------------------------------------- On 2010-07-23 16:29:43, Jonathan Gray wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://review.hbase.org/r/382/ > ----------------------------------------------------------- > > (Updated 2010-07-23 16:29:43) > > > Review request for hbase, stack, Jean-Daniel Cryans, Karthik Ranganathan, and > Kannan Muthukkaruppan. > > > Summary > ------- > > This method implements all the zookeeper methods needed for this last part of > the doc posted in HBASE-2692 (definition of valid creation/transitions for > unassigned znodes): > > > MASTER > > 1. Master creates an unassigned node as OFFLINE. > > - Cluster startup and table enabling. > > 2. Master forces an existing unassigned node to OFFLINE. > > - RegionServer failure. > > - Allows transitions from all states to OFFLINE. > > 3. Master deletes an unassigned node that was in a OPENED state. > > - Normal region transitions. Besides cluster startup, no other deletions > of unassigned nodes is allowed. > > 4. Master deletes all unassigned nodes regardless of state. > > - Cluster startup before any assignment happens. > > REGIONSERVER > > 1. RegionServer creates an unassigned node as CLOSING. > > - All region closes will do this in response to a CLOSE RPC from Master. > > - A node can never be transitioned to CLOSING, only created. > > 2. RegionServer transitions an unassigned node from CLOSING to CLOSED. > > - Normal region closes. CAS operation. > > 3. RegionServer transitions an unassigned node from OFFLINE to OPENING. > > - All region opens will do this in response to an OPEN RPC from the > Master. > > - Normal region opens. CAS operation. > > 4. RegionServer transitions an unassigned node from OPENING to OPENED. > > - Normal region opens. CAS operation. > > > Should I put above into the class comment javadoc or is it too much for there? > > > This addresses bug HBASE-2697. > http://issues.apache.org/jira/browse/HBASE-2697 > > > Diffs > ----- > > > branches/0.90_master_rewrite/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java > PRE-CREATION > > Diff: http://review.hbase.org/r/382/diff > > > Testing > ------- > > Unit test to come. Just putting up since there have been some recent issues > with multiple transitions and stuff, wanted to show what the new stuff looks > like. > > > Thanks, > > Jonathan > >