关于利用hadoop实现Lucene分布式

public void reduce(IntWritable key, Iterable values,
Context context) throws IOException, InterruptedException {
IndexWriter iw = null;
Analyzer analyzer= new IKAnalyzer();
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(conf);
Path path = new Path("hdfs://software07:9000/tmp/index");
FileSystemDirectory fsdir= new FileSystemDirectory(fs, path, true, conf);
for (Text val : values) {
String var = val.toString();
Document doc = new Document();
iw = new IndexWriter(fsdir,analyzer,true,IndexWriter.MaxFieldLength.LIMITED);
doc.add(new Field("info", var, Field.Store.YES, Field.Index.ANALYZED));
iw.close();
}
iw.optimize();
iw.close();
//context.write(key, result);
}

这个reduce报错,
java.lang.IllegalArgumentException: Wrong FS: hdfs://software7:9000/tmp/index, expected: file:///
不知道为什么出错,难道FileSystemDirectory不能使用这类path
那如何创建索引到HDFS,那又如何从hdfs读取索引目录呢

另外hadoop contrib/index中使用了Lucene,是哪个版本的lucene啊,这个包如何使用啊
谢谢指导啊

据我所知,Lucene的索引一般不往HDFS上写,都是先写到本地文件系统,如果有需要,再移动到HDFS上,具体可以参考katta之类的开源实现,我觉得效率是主要因素吧。