我收到像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错误,uri:L 2 ;fR ӐT %2 PHe Z әh 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 / # :
以前工作!!
答案 0 :(得分:0)
这浪费了半天时间。我忘记了: 输入是一个文件,包含所有图像文件作为HDFS文件名。例如:
HDFS://本地主机:8022 /用户/ elevy / smallArchiveImages / WonderWoman.jpg