simon824 commented on PR #334: URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/334#issuecomment-1250854391
> > hi @haohao0103 ,thanks for your contribution. I think maybe it's better to updateSchemaCache after `new LoadContext` just like `HugeGraphLoader`, what do you think? @imbajin @haohao0103 https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/spark/HugeGraphSparkLoader.java#L120 > > ```java > > private LoadContext initPartition( > > LoadOptions loadOptions, InputStruct struct) { > > LoadContext context = new LoadContext(loadOptions); > > for (VertexMapping vertexMapping : struct.vertices()) { > > this.builders.put( > > new VertexBuilder(context, struct, vertexMapping), > > new ArrayList<>()); > > } > > for (EdgeMapping edgeMapping : struct.edges()) { > > this.builders.put(new EdgeBuilder(context, struct, edgeMapping), > > new ArrayList<>()); > > } > > context.updateSchemaCache(); > > return context; > > } > > ``` > > 我觉得放在这里是可以的,我们第一次就在这里解决的;但是initPartition方法是HugeGraphSparkLoader类私有的;感觉需要调用initPartition方法才能正确正确创建及初始化LoadContext对象,感觉有点不合适哈。个人的浅见。。。。 没有明白你的意思,你是指哪里不合适?LoadContext 应该是只有在初始化分区的时候才需要创建? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
