hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Reed <br...@yahoo-inc.com>
Subject RE: InterruptedException
Date Thu, 08 Jan 2009 23:21:56 GMT
InterruptedException is rather tricky because the semantics of Thread.isInterrupted() is rather
vague. specifically, it is unclear why someone would interrupt a thread. usually Thread.interrupt()
is used to shut things down which requires special handing. thus we propagate it. for example,
i'm not clear how you shutdown your poll() method. an easy way to do it would be to use Thread.interrupt().

ben

-----Original Message-----
From: Mahadev Konar [mailto:mahadev@yahoo-inc.com] 
Sent: Tuesday, January 06, 2009 7:05 PM
To: zookeeper-user@hadoop.apache.org
Subject: Re: InterruptedException

Hi Kevin,
 The interrupt exception would be thrown in case any other thread tries to
interrupt zookeeper threads during a client call (its not really
interrupting the server but interrupting the client threads). Its like any
synchronous operation that waits throwing an interrupted exception if
interrupted by any other thread.

Mahadev

PS: ill try responding to your other emails as well as soon as possible :).


On 1/6/09 7:00 PM, "Kevin Burton" <burton@spinn3r.com> wrote:

> Why does ZK throw InterruptedException?
> Shouldn't this be a KeeperException instead of a java system exception when
> interrupt() is called?
> 
> The javadoc just says:
> 
> "If the server transaction is interrupted"
> 
> If this is a ZK related it should be KeeperException...
> 
> 


Mime
View raw message