赞
踩
过程参考:
此处需要的jar包有:
<dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-common</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-hdfs</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.2</version> </dependency>
此处需要导入的包:
ps:注意导入的是apache.hadoop的包
public static void writeToHDFS(String hdfsFile, String hdfsURL, String fileName)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。