为了解决数据问题,修改tab为逗号, String[] splited = line.split(","); int price = Integer.valueOf(splited[1]); 运行ok
[root@master IMFdatatest]#hadoop dfs -cat /library/dataForChain.txt DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it.
16/02/27 04:14:40 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Computer,5000 SmartPhone,3000 Tablet,1500 Tv,50000 Book,18 Clothes,150 Gloves,9 Computer,5000 SmartPhone,3000 Tablet,1500 Tv,50000 Book,18 Clothes,150 Gloves,9 SmartPhone,3000 Tablet,1500
[root@master IMFdatatest]#hadoop dfs -cat /library/outputdataForChain9/part-r-00000 DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs com