Hadoop-0.20.2 Child.java bug

 

} finally {
      RPC.stopProxy(umbilical);
      MetricsContext metricsContext = MetricsUtil.getContext("mapred"); //此处的“mapred”应该为“jvm”
      metricsContext.close();
      // Shutting down log4j of the child-vm... 
      // This assumes that on return from Task.run() 
      // there is no more logging done.
      LogManager.shutdown();
    }

如果不更改的话,在finally中会新启动一个Updater线程,并很快被干掉( metricsContext.close();),而JvmMetrics的Updater线程会等到finally执行结束才会被终止(跟随child进程一块终止),这个bug在0.20.203中不存在了,因为代码已经变了

 

你可能感兴趣的:(jvm,hadoop)