我意外删除了hadoop.tmp.dir,在我的情况下是/tmp/{user.name}/*。现在,每当我从CLI运行配置单元查询时,mapred作业将在任务尝试失败,如下所示:
Error initializing attempt_201202231712_1266_m_000009_0:
org.apache.hadoop.util.DiskChecker$DiskErrorException: Could not find any valid local directory for ttprivate/taskTracker/hdfs/jobcache/job_201202231712_1266/jobToken
at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.getLocalPathForWrite(LocalDirAllocator.java:376)
at org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:146)
at org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:127)
at org.apache.hadoop.mapred.TaskTracker.localizeJobTokenFile(TaskTracker.java:4432)
at org.apache.hadoop.mapred.TaskTracker.initializeJob(TaskTracker.java:1301)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:1242)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:2541)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:2505)
这是一个测试环境,我不关心数据。如何让系统恢复正常?
答案 0 :(得分:1)
你应该调用stop-all.sh文件,重新创建文件并在格式化tmp文件后启动
答案 1 :(得分:1)
您可以简单地重新创建目录并将文件的所有者更改为mapred。 chown mapred:mapred <your dir>