incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

通过 HugeGraph-Loader 导入hdfs文件(通过hive创建的带分区表)报错

Open ssjiyi1 opened this issue 7 years ago • 7 comments

Expected behavior 期望表现

可以正常读取目录

Actual behavior 实际表现

当遍历到分区目录时候。直接认为是一个文件获取读取导致报错。

Caused by: java.io.FileNotFoundException: Path is not a file: /data/graph/table_name/source=partition_properties

Steps to reproduce the problem 复现步骤

1 配置通过HDFS导入数据(是hive创建的表) 2 读到到分区路径,比如上面报错中的source=partition_properties报错

Status of loaded data 数据状态

Vertex/Edge summary 数据量

  • loaded vertices amount: {like 10 条}
  • loaded edges amount: {like 20 条}

Specifications of environment 环境信息

  • hugegraph version: {like v0.9.2}
  • operating system: {like centos 7.4, 32 CPUs, 64G RAM}
  • hugegraph backend: 单机-memory

ssjiyi1 avatar Sep 06 '19 01:09 ssjiyi1

@zwwei1314 提供完整的 Struct 文件看下

suesunss avatar Sep 10 '19 02:09 suesunss

struct.tar.gz

ssjiyi1 avatar Sep 12 '19 06:09 ssjiyi1

@zwwei1314 请参考 HugeGraph Loader 文档。

用户可以指定本地磁盘文件作为数据源,如果数据分散在多个文件中,也支持以某个目录作为数据源,但暂时不支持以多个目录作为数据源,也不支持过滤目录下的文件。

因此,目前不支持导入多个分区。

如果需要导入多个分区,可以尝试使用脚本多次启动导入任务的方式解决。

suesunss avatar Sep 15 '19 09:09 suesunss

@zwwei1314 请参考 HugeGraph Loader 文档。

用户可以指定本地磁盘文件作为数据源,如果数据分散在多个文件中,也支持以某个目录作为数据源,但暂时不支持以多个目录作为数据源,也不支持过滤目录下的文件。

因此,目前不支持导入多个分区。

如果需要导入多个分区,可以尝试使用脚本多次启动导入任务的方式解决。

目前是配置了一个目录作为数据源。但是读取到下一级目录的时候。报错 Caused by: java.io.FileNotFoundException: Path is not a file: 。并非配置多个数据源

ssjiyi1 avatar Sep 16 '19 02:09 ssjiyi1

目前是配置了一个目录作为数据源。但是读取到下一级目录的时候。

@zwwei1314 loader 目前支持的是导入某一个目录下所有的文件,而不是某一个目录下的多个目录下的文件,这是有区别的。不同的分区是不同的目录,因此不能一次导入。

suesunss avatar Sep 16 '19 03:09 suesunss

感谢 @suesunss 的解答 👍👍

Linary avatar Sep 16 '19 03:09 Linary

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

github-actions[bot] avatar Jan 01 '22 21:01 github-actions[bot]