You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Jonathan Gray <jg...@apache.org> on 2010/11/10 01:30:53 UTC

Review Request: HBASE-3168 Sanity date and time check when a region server joins the cluster

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/1193/
-----------------------------------------------------------

Review request for hbase and stack.


Summary
-------

This is patch from Jeff Whiting.  I then did little bits of polish and slim down of the unit test.

I uncovered very odd coupling of LogsCleaner being instantiated within ServerManager, though we don't use it there and it doesn't use SM.  So that's refactored out into HMaster and is started up/shut down with start/stopServiceThreads().

Changes from Jeff patch:
- Moved pulling maxSkew from config into constructor rather than doing it on each call
- Cleaned up the logging message a bit and changed from DEBUG to WARN
- HRS side, use EnvironmentEdgeManager rather than System.currentTimeMillis directly
- Changes test to operate directly on ServerManager. I had to do a bit of refactoring of ServerManager to get this to work and it's nothing something anyone new would have pulled the trigger on (moving stuff into another class instead of the weird unnecessary coupling to ServerManager).


This addresses bug HBASE-3168.
    http://issues.apache.org/jira/browse/HBASE-3168


Diffs
-----

  trunk/src/main/java/org/apache/hadoop/hbase/ClockOutOfSyncException.java PRE-CREATION 
  trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPCProtocolVersion.java 1033288 
  trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterRegionInterface.java 1033288 
  trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java 1033288 
  trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java 1033288 
  trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 1033288 
  trunk/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java PRE-CREATION 

Diff: http://review.cloudera.org/r/1193/diff


Testing
-------

New added test passes.


Thanks,

Jonathan


Re: Review Request: HBASE-3168 Sanity date and time check when a region server joins the cluster

Posted by Jonathan Gray <jg...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/1193/
-----------------------------------------------------------

(Updated 2010-11-09 16:48:36.816438)


Review request for hbase and stack.


Changes
-------

Over in RS, if we get RemoteException which is instance of ClockSkew, then re-throw the IOE so that the HRS actually aborts.  Without this, HRS would not actually startup but instead of killing itself it would just loop insanely and keep trying to check in with master forever.

Thanks for review stack.  Committing this.


Summary
-------

This is patch from Jeff Whiting.  I then did little bits of polish and slim down of the unit test.

I uncovered very odd coupling of LogsCleaner being instantiated within ServerManager, though we don't use it there and it doesn't use SM.  So that's refactored out into HMaster and is started up/shut down with start/stopServiceThreads().

Changes from Jeff patch:
- Moved pulling maxSkew from config into constructor rather than doing it on each call
- Cleaned up the logging message a bit and changed from DEBUG to WARN
- HRS side, use EnvironmentEdgeManager rather than System.currentTimeMillis directly
- Changes test to operate directly on ServerManager. I had to do a bit of refactoring of ServerManager to get this to work and it's nothing something anyone new would have pulled the trigger on (moving stuff into another class instead of the weird unnecessary coupling to ServerManager).


This addresses bug HBASE-3168.
    http://issues.apache.org/jira/browse/HBASE-3168


Diffs (updated)
-----

  trunk/src/main/java/org/apache/hadoop/hbase/ClockOutOfSyncException.java PRE-CREATION 
  trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPCProtocolVersion.java 1033288 
  trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterRegionInterface.java 1033288 
  trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java 1033288 
  trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java 1033288 
  trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 1033288 
  trunk/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java PRE-CREATION 

Diff: http://review.cloudera.org/r/1193/diff


Testing
-------

New added test passes.


Thanks,

Jonathan


Re: Review Request: HBASE-3168 Sanity date and time check when a region server joins the cluster

Posted by Jonathan Gray <jg...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/1193/#review1882
-----------------------------------------------------------


Will fix one piece of whitespace.

Doing my own review of this, there's more to do.  As-is, the RS will keep looping trying to do startup even if it gets IOE.  We just retry in loop w/ a sleep.

Need to do explicit catch / check if instance of ClockSkew exception and then just shut down instead of keep trying.

- Jonathan


On 2010-11-09 16:30:53, Jonathan Gray wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://review.cloudera.org/r/1193/
> -----------------------------------------------------------
> 
> (Updated 2010-11-09 16:30:53)
> 
> 
> Review request for hbase and stack.
> 
> 
> Summary
> -------
> 
> This is patch from Jeff Whiting.  I then did little bits of polish and slim down of the unit test.
> 
> I uncovered very odd coupling of LogsCleaner being instantiated within ServerManager, though we don't use it there and it doesn't use SM.  So that's refactored out into HMaster and is started up/shut down with start/stopServiceThreads().
> 
> Changes from Jeff patch:
> - Moved pulling maxSkew from config into constructor rather than doing it on each call
> - Cleaned up the logging message a bit and changed from DEBUG to WARN
> - HRS side, use EnvironmentEdgeManager rather than System.currentTimeMillis directly
> - Changes test to operate directly on ServerManager. I had to do a bit of refactoring of ServerManager to get this to work and it's nothing something anyone new would have pulled the trigger on (moving stuff into another class instead of the weird unnecessary coupling to ServerManager).
> 
> 
> This addresses bug HBASE-3168.
>     http://issues.apache.org/jira/browse/HBASE-3168
> 
> 
> Diffs
> -----
> 
>   trunk/src/main/java/org/apache/hadoop/hbase/ClockOutOfSyncException.java PRE-CREATION 
>   trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPCProtocolVersion.java 1033288 
>   trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterRegionInterface.java 1033288 
>   trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java 1033288 
>   trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java 1033288 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 1033288 
>   trunk/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java PRE-CREATION 
> 
> Diff: http://review.cloudera.org/r/1193/diff
> 
> 
> Testing
> -------
> 
> New added test passes.
> 
> 
> Thanks,
> 
> Jonathan
> 
>


Re: Review Request: HBASE-3168 Sanity date and time check when a region server joins the cluster

Posted by st...@duboce.net.

> On 2010-11-09 16:40:02, stack wrote:
> > trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterRegionInterface.java, line 48
> > <http://review.cloudera.org/r/1193/diff/1/?file=17082#file17082line48>
> >
> >     White space

I'm +1 on commit.  Sounds like you found an issue where ClockSkewSync exception is wrapped in a RemoteException... good one.


- stack


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/1193/#review1883
-----------------------------------------------------------


On 2010-11-09 16:30:53, Jonathan Gray wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://review.cloudera.org/r/1193/
> -----------------------------------------------------------
> 
> (Updated 2010-11-09 16:30:53)
> 
> 
> Review request for hbase and stack.
> 
> 
> Summary
> -------
> 
> This is patch from Jeff Whiting.  I then did little bits of polish and slim down of the unit test.
> 
> I uncovered very odd coupling of LogsCleaner being instantiated within ServerManager, though we don't use it there and it doesn't use SM.  So that's refactored out into HMaster and is started up/shut down with start/stopServiceThreads().
> 
> Changes from Jeff patch:
> - Moved pulling maxSkew from config into constructor rather than doing it on each call
> - Cleaned up the logging message a bit and changed from DEBUG to WARN
> - HRS side, use EnvironmentEdgeManager rather than System.currentTimeMillis directly
> - Changes test to operate directly on ServerManager. I had to do a bit of refactoring of ServerManager to get this to work and it's nothing something anyone new would have pulled the trigger on (moving stuff into another class instead of the weird unnecessary coupling to ServerManager).
> 
> 
> This addresses bug HBASE-3168.
>     http://issues.apache.org/jira/browse/HBASE-3168
> 
> 
> Diffs
> -----
> 
>   trunk/src/main/java/org/apache/hadoop/hbase/ClockOutOfSyncException.java PRE-CREATION 
>   trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPCProtocolVersion.java 1033288 
>   trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterRegionInterface.java 1033288 
>   trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java 1033288 
>   trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java 1033288 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 1033288 
>   trunk/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java PRE-CREATION 
> 
> Diff: http://review.cloudera.org/r/1193/diff
> 
> 
> Testing
> -------
> 
> New added test passes.
> 
> 
> Thanks,
> 
> Jonathan
> 
>


Re: Review Request: HBASE-3168 Sanity date and time check when a region server joins the cluster

Posted by st...@duboce.net.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/1193/#review1883
-----------------------------------------------------------

Ship it!



trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterRegionInterface.java
<http://review.cloudera.org/r/1193/#comment6115>

    White space


- stack


On 2010-11-09 16:30:53, Jonathan Gray wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://review.cloudera.org/r/1193/
> -----------------------------------------------------------
> 
> (Updated 2010-11-09 16:30:53)
> 
> 
> Review request for hbase and stack.
> 
> 
> Summary
> -------
> 
> This is patch from Jeff Whiting.  I then did little bits of polish and slim down of the unit test.
> 
> I uncovered very odd coupling of LogsCleaner being instantiated within ServerManager, though we don't use it there and it doesn't use SM.  So that's refactored out into HMaster and is started up/shut down with start/stopServiceThreads().
> 
> Changes from Jeff patch:
> - Moved pulling maxSkew from config into constructor rather than doing it on each call
> - Cleaned up the logging message a bit and changed from DEBUG to WARN
> - HRS side, use EnvironmentEdgeManager rather than System.currentTimeMillis directly
> - Changes test to operate directly on ServerManager. I had to do a bit of refactoring of ServerManager to get this to work and it's nothing something anyone new would have pulled the trigger on (moving stuff into another class instead of the weird unnecessary coupling to ServerManager).
> 
> 
> This addresses bug HBASE-3168.
>     http://issues.apache.org/jira/browse/HBASE-3168
> 
> 
> Diffs
> -----
> 
>   trunk/src/main/java/org/apache/hadoop/hbase/ClockOutOfSyncException.java PRE-CREATION 
>   trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPCProtocolVersion.java 1033288 
>   trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterRegionInterface.java 1033288 
>   trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java 1033288 
>   trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java 1033288 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 1033288 
>   trunk/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java PRE-CREATION 
> 
> Diff: http://review.cloudera.org/r/1193/diff
> 
> 
> Testing
> -------
> 
> New added test passes.
> 
> 
> Thanks,
> 
> Jonathan
> 
>