[hadoop@masterBF hadoop-2.5.0]$ bin/hdfs dfs -ls /
17/02/27 21:36:37 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
..
[hadoop@masterBF bin]$ ./hdfs dfs -mkdir /user
17/02/27 21:39:01 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
++++++++++++++++++++++++++++++++++
搜报错信息,有几种说法:
修改$HADOOP_CONF_DIR/log4j.properties文件 hadoop.root.logger=ALL,console
or:
开启:export HADOOP_ROOT_LOGGER=DEBUG,console
关闭:export HADOOP_ROOT_LOGGER=INFO,console
++++++++++++++++++++++++++++++++++++++++
开启debug就没完没了了:
[hadoop@masterBF hadoop-2.5.0]$ export HADOOP_ROOT_LOGGER=DEBUG,console
[hadoop@masterBF hadoop-2.5.0]$ bin/hdfs dfs -ls /
17/02/27 21:52:48 DEBUG util.Shell: setsid exited with exit code 0
17/02/27 21:52:48 DEBUG conf.Configuration: parsing URL jar:file:/opt/cdh-5.3.6/hadoop-2.5.0/share/hadoop/common/hadoop-common-2.5.0-cdh5.3.6.jar!/core-default.xml
17/02/27 21:52:48 DEBUG conf.Configuration: parsing input stream sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@4231c44c
17/02/27 21:52:48 DEBUG conf.Configuration: parsing URL file:/opt/cdh-5.3.6/hadoop-2.5.0/etc/hadoop/core-site.xml
17/02/27 21:52:48 DEBUG conf.Configuration: parsing input stream java.io.BufferedInputStream@333903d0
。。。。。
Found 1 items
drwxr-xr-x - hadoop supergroup 0 2017-02-27 21:39 /user
17/02/27 21:52:50 DEBUG ipc.Client: stopping client from cache: org.apache.hadoop.ipc.Client@716dadda
17/02/27 21:52:50 DEBUG ipc.Client: removing client from cache: org.apache.hadoop.ipc.Client@716dadda
17/02/27 21:52:50 DEBUG ipc.Client: stopping actual client because no more references remain: org.apache.hadoop.ipc.Client@716dadda
17/02/27 21:52:50 DEBUG ipc.Client: Stopping client
17/02/27 21:52:50 DEBUG ipc.Client: IPC Client (1534340330) connection to masterBF/192.168.2.130:8020 from hadoop: closed
17/02/27 21:52:50 DEBUG ipc.Client: IPC Client (1534340330) connection to masterBF/192.168.2.130:8020 from hadoop: stopped, remaining connections 0
关掉就好了:
[hadoop@masterBF hadoop-2.5.0]$ export HADOOP_ROOT_LOGGER=INFO,console
[hadoop@masterBF hadoop-2.5.0]$ bin/hdfs dfs -lsr /
lsr: DEPRECATED: Please use 'ls -R' instead.
17/02/27 21:57:23 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
drwxr-xr-x - hadoop supergroup 0 2017-02-27 21:55 /user
drwxr-xr-x - hadoop supergroup 0 2017-02-27 21:55 /user/hive
drwxr-xr-x - hadoop supergroup 0 2017-02-27 21:55 /user/hive/warehouse