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