• windows环境下Eclipse开发MapReduce程序遇到的四个问题及解决办法


    按此文章《Hadoop集群(第7期)_Eclipse开发环境设置》进行MapReduce开发环境搭建的过程中遇到一些问题,饶了一些弯路,解决办法记录在此:

    文档目的:

    记录windows环境下Eclipse开发MapReduce程序遇到的四个问题及解决办法;

    问题一:程序运行时报JobTracker is in safe mode

    security.UserGroupInformation: PriviledgedActionException as:hadoop cause:org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.mapred.SafeModeException: JobTracker is in safe mode 
        at org.apache.hadoop.mapred.JobTracker.checkSafeMode(JobTracker.java:5178)

    解决办法:

    解除安全模式,如下命令:

    bin/hadoop dfsadmin -safemode leave

    操作安全模式的参数:

    enter 进入安全模式

    leave 强制退出安全模式

    get 返回是否开启安全模式

    wait 等待,一直到安全模式结束

    问题二:程序运行时报错Input path does not exist: file

    14/06/05 13:41:06 INFO mapred.JobClient: Cleaning up the staging area hdfs://hadoop:9000/usr/local/hadoop/tmp/mapred/staging/hadoop/.staging/job_201406041924_0002
    14/06/05 13:41:06 ERROR security.UserGroupInformation: PriviledgedActionException as:hadoop cause:org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: file:

    解决办法:创建input目录

    问题三:程序运行时报错unknown host: hadoop

    14/06/05 13:46:05 ERROR security.UserGroupInformation: PriviledgedActionException as:hadoop cause:java.net.UnknownHostException: unknown host: hadoop
    Exception in thread "main" java.net.UnknownHostException: unknown host: hadoop

    解决办法:将C:WindowsSystem32driversetchosts文件中,增加Hadoop的DNS解析

    192.168.80.100        hadoop

    问题四:程序运行时报错JobTracker is in safe mode

    14/06/05 14:13:21 ERROR security.UserGroupInformation: PriviledgedActionException as:administrator cause:org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.mapred.SafeModeException: JobTracker is in safe mode

    解决办法:"右击"桌面上图标"我的电脑",选择"管理",将用户中,找到administrator,改为hadoop,注销或重启电脑。

  • 相关阅读:
    在 TB1 机器上编译并调试 TB 自带sample的方法
    C++编译错误 fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning
    c++生成随机数
    Unity调用讯飞做语音听写(Android Studio版)
    TouchDesigner 编译FlexChop
    Behavior Designer知识点
    清除Unity缓存
    UnityEngine.UI.dll is in timestamps but is not known in assetdatabase
    Unity插件学习记录 -- SW Actions
    Unity3D 使用LineRenderer制作画板功能
  • 原文地址:https://www.cnblogs.com/MyXQ/p/3789004.html
Copyright © 2020-2023  润新知