2018-11-27 11:10:46 | 作者: 又琴 | 标签: 修正,配置文件,数据包 | 浏览: 8864
3. @Override
4. public InputStream open(String path) throws IOException {
5. Configuration conf = new Configuration();
6. FileSystem fs = FileSystem.get(URI.create(path), conf);
7. return fs.open(new Path(path));
8. }
9.
10. @Override
11. public OutputStream create(String path) throws IOException {
12. Configuration conf = new Configuration();
13. FileSystem fs = FileSystem.get(URI.create(path), conf);
14. OutputStream out = fs.create(new Path(path));
15. return out;
16. }
17. }
第二步:修正配置文件。root为hdfs上的数据包,把IOAdapter改为我们上面完成的类
ok,这样你就能在分布式集群上运用hanlp进行分词了。
整个过程比较简单,欢迎各位大神沟通讨论!
转载自:https://blog.csdn.net/qq_33872191/article/details/84963310
JDK 5.0(Tiger)中的一些新特性(2):枚举mingxing
经过poi在java程序中输入word文件ITeyetengxun