You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Lars George <la...@gmail.com> on 2011/04/15 14:29:25 UTC
Spurious Instantiation
Hi,
>From AssignmentManager.java in trunk:
boolean setOfflineInZooKeeper(final RegionState state) {
if (!state.isClosed() && !state.isOffline()) {
new RuntimeException("Unexpected state trying to OFFLINE; " + state);
this.master.abort("Unexpected state trying to OFFLINE; " + state,
new IllegalStateException());
return false;
}
That first "new RuntimeException..." is a left over I presume?
Lars
Re: Spurious Instantiation
Posted by Stack <st...@duboce.net>.
One of you lads want to make a patch? (Bernd, you have it right I'd say).
Thanks,
St.Ack
On Fri, Apr 15, 2011 at 5:44 AM, Bernd Fondermann
<be...@googlemail.com> wrote:
> On Fri, Apr 15, 2011 at 14:29, Lars George <la...@gmail.com> wrote:
>> Hi,
>>
>> From AssignmentManager.java in trunk:
>>
>>
>> boolean setOfflineInZooKeeper(final RegionState state) {
>> if (!state.isClosed() && !state.isOffline()) {
>> new RuntimeException("Unexpected state trying to OFFLINE; " + state);
>> this.master.abort("Unexpected state trying to OFFLINE; " + state,
>> new IllegalStateException());
>> return false;
>> }
>>
>> That first "new RuntimeException..." is a left over I presume?
>
> Indeed, looks like two error handlings (throw vs. log+false) had been
> added at the same time and the latter seems the more consistent
> handling.
> see
> http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java?r1=1003329&r2=1003330&
>
> Bernd
>
Re: Spurious Instantiation
Posted by Bernd Fondermann <be...@googlemail.com>.
On Fri, Apr 15, 2011 at 14:29, Lars George <la...@gmail.com> wrote:
> Hi,
>
> From AssignmentManager.java in trunk:
>
>
> boolean setOfflineInZooKeeper(final RegionState state) {
> if (!state.isClosed() && !state.isOffline()) {
> new RuntimeException("Unexpected state trying to OFFLINE; " + state);
> this.master.abort("Unexpected state trying to OFFLINE; " + state,
> new IllegalStateException());
> return false;
> }
>
> That first "new RuntimeException..." is a left over I presume?
Indeed, looks like two error handlings (throw vs. log+false) had been
added at the same time and the latter seems the more consistent
handling.
see
http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java?r1=1003329&r2=1003330&
Bernd