使用HDFS作为文件服务器。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.3 KiB

# 开发和测试使用说明
- 1、hdfs仓库插件是平台文件服务器的扩展,首先需要正常方式安装插件;
- 2、在没有平台可视化设置之前,可以通过添加数据库字段来开启hdfs;
> 在fine_conf_entity添加HDFS的仓库配置:
![字段](./img/db_fields.png)
> 图中的`ResourceModuleConfig.profiles.HDFS_TEST.workroots.[你的机器id(可以拷贝表中LOCAL_ENV的)]`为hdfs的工作路径。
> `host`设置为Hadoop的hdfs地址,比如默认localhost,`port`为hdfs端口(默认9000)。
> 如果有用户组设置还需要对应用户名 `username`。
> 在fine_conf_entity添加数据库字段设置仓库为hdfs:
![设置](./img/set.png)
> 在fine_conf_classname:
添加
![profile](./img/class_fields.png)
- 3、启动设计器或者平台
- 4、其它说明:
改数据库太麻烦,可以直接在适当的地方(比如com.fr.io.ResourceRepositoryActivator.doExtra()方法末尾)添加代码
``` Map<String, Object> hdfsConfig = new HashMap<String, Object>();
hdfsConfig.put("host", "localhost");
hdfsConfig.put("port", 9000);
try {
ProfileFactory.create("HDFS", "HDFS_TEST", "/app", true, hdfsConfig).install().apply();
} catch (RepositoryException e) {
e.printStackTrace();
}