查看调测结果
操作场景
HDFS应用程序运行完成后,可直接通过运行结果查看应用程序运行情况,也可以通过HDFS日志获取应用运行情况。
操作步骤
1、查看运行结果获取应用运行情况
- HdfsMain Windows样例程序运行结果如下所示。
1058 [main] INFO org.apache.hadoop.security.UserGroupInformation - Login successful for user test using keytab file
1058 [main] INFO com.huawei.hadoop.security.LoginUtil - Login success!!!!!!!!!!!!!!
4014 [main] INFO org.apache.hadoop.hdfs.PeerCache - SocketCache disabled.
4014 [main] WARN org.apache.hadoop.hdfs.shortcircuit.DomainSocketFactory - The short-circuit local reads feature cannot be used because UNIX Domain sockets are not available on Windows.
success to create path /user/hdfs-examples
4333 [main] WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
success to write.
success to append.
result is : hi, I am bigdata. It is successful if you can see me.I append this content.
success to read.
success to delete the file /user/hdfs-examples\test.txt
success to delete path /user/hdfs-examples
begin to set Storage Policy
success to create path /user/hdfs-examples
StoragePolicy:COLD
StoragePolicy:WARM
StoragePolicy:HOT
StoragePolicy:ONE_SSD
StoragePolicy:ALL_SSD
StoragePolicy:LAZY_PERSIST
success to set Storage Policy path /user/hdfs-examples
success to delete path /user/hdfs-examples
set Storage Policy end
- ColocationExample Windows样例程序运行结果如下所示。
4439 [main] INFO com.huawei.hadoop.oi.colocation.ZKUtil - ZooKeeper colocation znode : /hadoop/colocationDetails. Will publish colocation details under this znode hierarchy.
Create Group is running...
4693 [main] INFO org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=18910-120-85-181:24002,18910-120-85-172:24002,18910-120-85-154:24002 sessionTimeout=45000 watcher=com.huawei.hadoop.oi.colocation.ZooKeeperWatcher@160f883c
4693 [main] INFO org.apache.zookeeper.ClientCnxn - zookeeper.request.timeout is not configured. Using default value 120000.
4693 [main-SendThread(18910-120-85-172:24002)] INFO org.apache.zookeeper.client.FourLetterWordMain - connecting to 18910-120-85-172 24002
4693 [main-SendThread(18910-120-85-172:24002)] INFO org.apache.zookeeper.client.ZooKeeperSaslClient - Client will use GSSAPI as SASL mechanism.
4693 [main-SendThread(18910-120-85-172:24002)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 18910-120-85-172/18910.120.85.172:24002. Will attempt to SASL-authenticate using Login Context section 'Client'
4693 [main-SendThread(18910-120-85-172:24002)] INFO org.apache.zookeeper.ClientCnxn - Socket connection established, initiating session, client: /18910.120.17.232:53225, server: 18910-120-85-172/18910.120.85.172:24002
4709 [main-SendThread(18910-120-85-172:24002)] INFO org.apache.zookeeper.ClientCnxn - Session establishment complete on server 18910-120-85-172/18910.120.85.172:24002, sessionid = 0x110084793052292a, negotiated timeout = 45000
4725 [main] INFO com.huawei.hadoop.oi.colocation.ZKUtil - ZooKeeper colocation znode : /hadoop/colocationDetails. Will publish colocation details under this znode hierarchy.
Create Group has finished.
Put file is running...
4793 [main] WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Put file has finished.
Delete file is running...
Delete file has finished.
Delete Group is running...
Delete Group has finished.
- SmallFS Windows样例程序运行结果如下所示。
1043 [main] INFO org.apache.hadoop.security.UserGroupInformation - Login successful for user test using keytab file
1043 [main] INFO com.huawei.hadoop.security.LoginUtil - Login success!!!!!!!!!!!!!!
4012 [main] INFO org.apache.hadoop.hdfs.PeerCache - SocketCache disabled.
4012 [main] WARN org.apache.hadoop.hdfs.shortcircuit.DomainSocketFactory - The short-circuit local reads feature cannot be used because UNIX Domain sockets are not available on Windows.
success to create path /user/hdfs-examples
4380 [main] WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
success to write.
success to append.
result is : hi, I am bigdata. It is successful if you can see me.I append this content.
success to read.
success to delete the file /user/hdfs-examples\test.txt
success to delete path /user/hdfs-examples
begin to set Storage Policy
SmallFile not support to set Storage Policy !!!
set Storage Policy end
2、查看HDFS日志获取应用运行情况
您可以查看HDFS的NameNode日志了解应用运行情况,并根据日志信息调整应用程序。