hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Bad concurrency bug in 0.12.3?
Date Fri, 01 Jun 2007 18:11:41 GMT
Calvin Yu wrote:
> public class Test {
>  public static void main(String[] args) {
>    System.out.println("interrupting..");
>    Thread.currentThread().interrupt();
>    try {
>      Thread.sleep(100);
>      System.out.println("done.");
>    } catch (InterruptedException e) {
>      e.printStackTrace();
>    }
>  }
> }
> 
> Granted, this is an over-simplified test, and won't test for JVM bugs.

Yes, but it does show that's probably the intended behavior: an 
interrupt should be sufficient, even if it doesn't arrive during the 
call to sleep().  We still don't know why join() hung, if it's a JVM 
bug, or if there's some bug in Hadoop.  In either case, I think we can 
defensively code this without the use of join().

Doug

Mime
View raw message