我得到了一个错误,就像kkslct得到的:http://eldadlevy.wordpress.com/2011/02/05/hadoop-binary-files-processing-entroduced-by-image-duplicates-finder/ kkslct解决了,但我不能。有什么想法吗?
代码为:
public class BinaryFilesToHadoopSequenceFileMapper extends Mapper<Object, Text, Text, BytesWritable> {
public void map(Object key, Text value, Context context)
throws IOException, InterruptedException {
String uri = value.toString();
Configuration conf = new Configuration();
FSDataInputStream in = null;
try {
FileSystem fs = FileSystem.get(URI.create(uri), conf); ERROR HERE
我得到的错误有:error binaryfilestohadoopsequencefilemapper error,uri:l���2���;法国���ӑt型�%2���苯丙氨酸�z�ә小时��t型�� ���z�/�#��:� null class java.lang.IllegalArgumentException with Cause: java.net.URISyntaxException: Illegal character in path at index 13: L���2���;fR���ӐT�%2���PHe�Z�әh��T��
���z�/�#��:�
以前有用的!!
1条答案
按热度按时间fwzugrvs1#
那是浪费了半天时间。我忘了:输入的是一个包含所有图像文件的hdfs文件名。例如:
hdfs://localhost:8022/user/elevy/smallarchiveimages/wonderwoman.jpg
http://eldadlevy.wordpress.com/2011/02/05/hadoop-binary-files-processing-entroduced-by-image-duplicates-finder/