?????μ????????????????????????????????????Java???????
???????????????????????
???????JVM??????????????
???????JVM??????????????
????????????y??????????????
???????????slot????С??JobTracker web GUI??????????
???????????slot  ??slot????CPU??Core???????memory chip???????????????????????slot???????????????????????????????????????????С?????slot?? Hadoop???????λ?????????
???????????????????????????????裬??????????????????????????task attempt????檔
????????????????task attempt?? ????????????????????????? “Each task attempt is one particular instance of a Map or Reduce Task identified by its TaskID”??
?????????????????????????????????????????Java????????????? map/reduce ?????Job?????????????????????????????
????13/09/20 08:50:56 INFO mapred.JobClient: Task Id : attempt_201309200652_0003_m_000000_0?? Status : FAILED on node node1
????Error: Java heap space
????????????????????Java???????JVM???????????????????????????
????????Java????????????????????map??reduce?????????????????????????JVM??????????????????
???????磬hadoop-0.20.2-dev-examples.jar?е?wordcount ????? ??????????????map ??????????????檔??????????????????????????????????????????????MapR????wordcount???????512MB???????????JVM??′????????????????????????????Hadoop?????????????map???JVM????????????512MB??
?????????????????map????????????棨?????????512MB???? ??????????????ú?JVM??檔???????JVM?е????????TaskTracker?Map/Reduce?????????????趨??? TaskTracker?趨??????????????????????????????????????????С????????????????????????????TaskTracker?????? ???????С??JVM??
????mapred.map.child.java.opts??????????TaskTracker ???JVM?????map????????????reduce????????и????????????????mapred.map.child.java.opts????????ó?“-Xmx512m”?????map???JVMs????512MB??????????????????-Xmx???????????????????????????????? ???TaskTracker????????JVM??????????????????????????????TaskTracker?map/reduce task slot??????????????????????TaskTracker?????Map/Reduce????治????????????
????TaskTracker?map/reduce????????slot??????TaskTracker?????趨????????????????mapred-site.xml????????????????п?????
????mapred.tasktracker.map.tasks.maximum
????mapred.tasktracker.reduce.tasks.maximum
??????????Щ??????????????????CPU???????????????????????????????????????????
???????mapred-site.xml????趨????????slots?????
???????????????
?????????У?TaskTracker  map/reduce??????????????TaskTracker?????????趨??????????????????????????????????Hadoop conf???μ?hadoop-env.sh????п??????????????????????????????????????????
????export HADOOP_HEAPSIZE=2000
??????????????????????????????JVM??????????2000MB????檔????????hadoop-env.sh???????? HADOOP_HEAPSIZE??????????????MapR warden service???TaskTracker??????????????? warden service?????????????????????????????????????????????????ó???????С????????????warden.conf??????????????Щ?????
????service.command.mfs.heapsize.percent=20
????service.command.mfs.heapsize.min=512
???????????????warden??÷????MFS???????20%?????????512MB??512MB<20%??????????????£?????????????з????????????????????е??????????????? warden.conf?????????????????????????????????????????????????????????????棩????μ??????TaskTracker???????????????????????????