Description
When running the smallJobsBenchmark with 180 maps and hadoop metrics logging to a file
(ie hadoop-metrics.properties file contains
dfs.class=org.apache.hadoop.metrics.file.FileContext
mapred.class=org.apache.hadoop.metrics.file.FileContext)
then I get this error:
org.apache.hadoop.ipc.RemoteException: java.io.IOException: java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:574)
at org.apache.hadoop.ipc.Client.getConnection(Client.java:517)
at org.apache.hadoop.ipc.Client.call(Client.java:452)
at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:164)
at org.apache.hadoop.dfs.$Proxy0.isDir(Unknown Source)
at org.apache.hadoop.dfs.DFSClient.isDirectory(DFSClient.java:325)
at org.apache.hadoop.dfs.DistributedFileSystem.isDirectory(DistributedFileSystem.java:167)
at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:82)
at org.apache.hadoop.dfs.DistributedFileSystem.copyToLocalFile(DistributedFileSystem.java:222)
at org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:842)
at org.apache.hadoop.mapred.JobInProgress.<init>(JobInProgress.java:86)
at org.apache.hadoop.mapred.JobTracker.submitJob(JobTracker.java:1338)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:337)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:538)
at org.apache.hadoop.ipc.Client$Connection.run(Client.java:258)
Using jconsole, I see that 2000+ of these threads were created:
Name: Timer-101
State: TIMED_WAITING on java.util.TaskQueue@1501026
Total blocked: 0 Total waited: 5
Stack trace:
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Timer.java:509)
java.util.TimerThread.run(Timer.java:462)
The only use of the java.util.Timer API is in org.apache.hadoop.metrics.spi.AbstractMetricsContext.