You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@graphar.apache.org by "keksmd (via GitHub)" <gi...@apache.org> on 2026/08/11 15:40:59 UTC
[PR] fix(java): align edge metadata paths with GraphAr v1 [incubator-graphar]
keksmd opened a new pull request, #946:
URL: https://github.com/apache/incubator-graphar/pull/946
## Summary
Implements the #943 metadata-layout gate without introducing physical-IO dependencies:
- resolve edge topology chunks as `adj_list/part{vertexChunk}/chunk{edgeChunk}`;
- resolve edge property chunks by adjacency layout and both chunk indexes;
- place counts and offsets directly below the adjacency layout prefix;
- normalize relative URI joins that lack a trailing slash;
- verify paths against the real Parquet fixture (`part2/chunk1`) and all adjacency layouts.
The format contract, compatibility matrix, and staged Java-SDK roadmap are included under `docs/libraries/java/` and link #756, #943, and #944.
## Verification
- `mvn --no-transfer-progress spotless:check`
- `mvn --no-transfer-progress clean verify -Dspotless.check.skip=true` in `ghcr.io/apache/graphar-dev:latest` (124 tests; 0 failures, errors, or skips)
Relates-to: #943
Relates-to: #756
The broader metadata parity work remains separately tracked in #944; C++ devcontainer restoration is isolated in #945.
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] fix(java): align edge metadata paths with GraphAr v1 [incubator-graphar]
Posted by "SemyonSinchenko (via GitHub)" <gi...@apache.org>.
SemyonSinchenko commented on code in PR #946:
URL: https://github.com/apache/incubator-graphar/pull/946#discussion_r3796907550
##########
maven-projects/info/src/main/java/org/apache/graphar/info/EdgeInfo.java:
##########
@@ -462,38 +462,58 @@ public PropertyGroup getPropertyGroup(String property) {
return propertyGroups.getPropertyGroup(property);
}
- public URI getPropertyGroupUri(PropertyGroup propertyGroup) {
+ public URI getPropertyGroupUri(PropertyGroup propertyGroup, AdjListType adjListType) {
checkPropertyGroupExist(propertyGroup);
- return getBaseUri().resolve(propertyGroup.getBaseUri());
+ return resolvePath(getAdjacentListBaseUri(adjListType), propertyGroup.getPrefix());
}
- public URI getPropertyGroupChunkUri(PropertyGroup propertyGroup, long chunkIndex) {
- // PropertyGroup will be checked in getPropertyGroupPrefix
- return getPropertyGroupUri(propertyGroup).resolve("chunk" + chunkIndex);
+ public URI getPropertyGroupChunkUri(
+ PropertyGroup propertyGroup,
+ AdjListType adjListType,
+ long vertexChunkIndex,
+ long edgeChunkIndex) {
+ return resolvePath(
+ getPropertyGroupUri(propertyGroup, adjListType),
+ "part" + vertexChunkIndex + "/chunk" + edgeChunkIndex);
}
public URI getAdjacentListUri(AdjListType adjListType) {
- return getBaseUri().resolve(getAdjacentList(adjListType).getBaseUri()).resolve("adj_list/");
+ return resolvePath(getAdjacentListBaseUri(adjListType), "adj_list/");
}
- public URI getAdjacentListChunkUri(AdjListType adjListType, long vertexChunkIndex) {
- return getAdjacentListUri(adjListType).resolve("chunk" + vertexChunkIndex);
+ public URI getAdjacentListChunkUri(
+ AdjListType adjListType, long vertexChunkIndex, long edgeChunkIndex) {
+ return resolvePath(
+ getAdjacentListUri(adjListType),
+ "part" + vertexChunkIndex + "/chunk" + edgeChunkIndex);
}
public URI getOffsetUri(AdjListType adjListType) {
- return getAdjacentListUri(adjListType).resolve("offset/");
+ return resolvePath(getAdjacentListBaseUri(adjListType), "offset/");
}
public URI getOffsetChunkUri(AdjListType adjListType, long vertexChunkIndex) {
- return getOffsetUri(adjListType).resolve("chunk" + vertexChunkIndex);
+ return resolvePath(getOffsetUri(adjListType), "chunk" + vertexChunkIndex);
}
public URI getVerticesNumFileUri(AdjListType adjListType) {
- return getAdjacentListUri(adjListType).resolve("vertex_count");
+ return resolvePath(getAdjacentListBaseUri(adjListType), "vertex_count");
}
public URI getEdgesNumFileUri(AdjListType adjListType, long vertexChunkIndex) {
- return getAdjacentListUri(adjListType).resolve("edge_count" + vertexChunkIndex);
+ return resolvePath(getAdjacentListBaseUri(adjListType), "edge_count" + vertexChunkIndex);
+ }
+
+ private URI getAdjacentListBaseUri(AdjListType adjListType) {
+ return resolvePath(getBaseUri(), getAdjacentList(adjListType).getPrefix());
+ }
+
+ private static URI resolvePath(URI baseUri, String childPath) {
+ String base = baseUri.toString();
+ if (!base.endsWith("/")) {
+ base += "/";
Review Comment:
Should we use URI-based semantics here instead of a direct string-concatenations?
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] fix(java): align edge metadata paths with GraphAr v1 [incubator-graphar]
Posted by "keksmd (via GitHub)" <gi...@apache.org>.
keksmd commented on PR #946:
URL: https://github.com/apache/incubator-graphar/pull/946#issuecomment-5257217580
@SemyonSinchenko thanks for your feedback, removed junk files
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] fix(java): align edge metadata paths with GraphAr v1 [incubator-graphar]
Posted by "SemyonSinchenko (via GitHub)" <gi...@apache.org>.
SemyonSinchenko commented on code in PR #946:
URL: https://github.com/apache/incubator-graphar/pull/946#discussion_r3796905000
##########
maven-projects/info/src/main/java/org/apache/graphar/info/EdgeInfo.java:
##########
@@ -462,38 +462,58 @@ public PropertyGroup getPropertyGroup(String property) {
return propertyGroups.getPropertyGroup(property);
}
- public URI getPropertyGroupUri(PropertyGroup propertyGroup) {
+ public URI getPropertyGroupUri(PropertyGroup propertyGroup, AdjListType adjListType) {
checkPropertyGroupExist(propertyGroup);
- return getBaseUri().resolve(propertyGroup.getBaseUri());
+ return resolvePath(getAdjacentListBaseUri(adjListType), propertyGroup.getPrefix());
}
- public URI getPropertyGroupChunkUri(PropertyGroup propertyGroup, long chunkIndex) {
- // PropertyGroup will be checked in getPropertyGroupPrefix
- return getPropertyGroupUri(propertyGroup).resolve("chunk" + chunkIndex);
+ public URI getPropertyGroupChunkUri(
+ PropertyGroup propertyGroup,
+ AdjListType adjListType,
+ long vertexChunkIndex,
+ long edgeChunkIndex) {
+ return resolvePath(
+ getPropertyGroupUri(propertyGroup, adjListType),
+ "part" + vertexChunkIndex + "/chunk" + edgeChunkIndex);
}
public URI getAdjacentListUri(AdjListType adjListType) {
- return getBaseUri().resolve(getAdjacentList(adjListType).getBaseUri()).resolve("adj_list/");
+ return resolvePath(getAdjacentListBaseUri(adjListType), "adj_list/");
}
- public URI getAdjacentListChunkUri(AdjListType adjListType, long vertexChunkIndex) {
- return getAdjacentListUri(adjListType).resolve("chunk" + vertexChunkIndex);
+ public URI getAdjacentListChunkUri(
+ AdjListType adjListType, long vertexChunkIndex, long edgeChunkIndex) {
+ return resolvePath(
+ getAdjacentListUri(adjListType),
+ "part" + vertexChunkIndex + "/chunk" + edgeChunkIndex);
}
public URI getOffsetUri(AdjListType adjListType) {
- return getAdjacentListUri(adjListType).resolve("offset/");
+ return resolvePath(getAdjacentListBaseUri(adjListType), "offset/");
}
public URI getOffsetChunkUri(AdjListType adjListType, long vertexChunkIndex) {
- return getOffsetUri(adjListType).resolve("chunk" + vertexChunkIndex);
+ return resolvePath(getOffsetUri(adjListType), "chunk" + vertexChunkIndex);
}
public URI getVerticesNumFileUri(AdjListType adjListType) {
- return getAdjacentListUri(adjListType).resolve("vertex_count");
+ return resolvePath(getAdjacentListBaseUri(adjListType), "vertex_count");
}
public URI getEdgesNumFileUri(AdjListType adjListType, long vertexChunkIndex) {
- return getAdjacentListUri(adjListType).resolve("edge_count" + vertexChunkIndex);
+ return resolvePath(getAdjacentListBaseUri(adjListType), "edge_count" + vertexChunkIndex);
+ }
+
+ private URI getAdjacentListBaseUri(AdjListType adjListType) {
+ return resolvePath(getBaseUri(), getAdjacentList(adjListType).getPrefix());
+ }
+
+ private static URI resolvePath(URI baseUri, String childPath) {
+ String base = baseUri.toString();
Review Comment:
Let's add a fast fail if chilPath is `null`: otherwise it may produce something strange.
```java
if (childPath == null)
throw new IllegalArgumentException("childPath must not be null");
}
```
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] fix(java): align edge metadata paths with GraphAr v1 [incubator-graphar]
Posted by "keksmd (via GitHub)" <gi...@apache.org>.
keksmd commented on PR #946:
URL: https://github.com/apache/incubator-graphar/pull/946#issuecomment-5255347011
CI status recorded after inspection:
- `Validate pull request title` is green.
- `GraphAr Java-Info CI`, `GraphAr Docs`, `Pre-commit Checks`, and `license` are all `action_required` because this is a fork PR; each run has no job/log yet.
- I attempted the standard workflow approval endpoint with the authenticated contributor account; GitHub returned `403 Must have admin rights to Repository`.
Local equivalent verification has already passed in the declared devcontainer: `spotless:check` and `clean verify` (124 tests, 0 failures/errors/skips). This comment deliberately distinguishes that evidence from the still-unapproved upstream workflows.
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] fix(java): align edge metadata paths with GraphAr v1 [incubator-graphar]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #946:
URL: https://github.com/apache/incubator-graphar/pull/946#issuecomment-5256753488
## [Codecov](https://app.codecov.io/gh/apache/incubator-graphar/pull/946?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `88.88889%` with `2 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 77.40%. Comparing base ([`54601c9`](https://app.codecov.io/gh/apache/incubator-graphar/commit/54601c9c76f37b13b49e3a4bd413f1f3ae99afcd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`fc317c9`](https://app.codecov.io/gh/apache/incubator-graphar/commit/fc317c9131d89d783aef7e3355a03242b59f520c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/incubator-graphar/pull/946?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...rc/main/java/org/apache/graphar/info/EdgeInfo.java](https://app.codecov.io/gh/apache/incubator-graphar/pull/946?src=pr&el=tree&filepath=maven-projects%2Finfo%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgraphar%2Finfo%2FEdgeInfo.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bWF2ZW4tcHJvamVjdHMvaW5mby9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3JhcGhhci9pbmZvL0VkZ2VJbmZvLmphdmE=) | 88.88% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/incubator-graphar/pull/946?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #946 +/- ##
=========================================
Coverage 77.40% 77.40%
- Complexity 615 618 +3
=========================================
Files 84 84
Lines 8957 8967 +10
Branches 1069 1071 +2
=========================================
+ Hits 6933 6941 +8
- Misses 1784 1785 +1
- Partials 240 241 +1
```
| [Flag](https://app.codecov.io/gh/apache/incubator-graphar/pull/946/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [java-info](https://app.codecov.io/gh/apache/incubator-graphar/pull/946/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `84.99% <88.88%> (-0.05%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/incubator-graphar/pull/946?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] fix(java): align edge metadata paths with GraphAr v1 [incubator-graphar]
Posted by "keksmd (via GitHub)" <gi...@apache.org>.
keksmd closed pull request #946: fix(java): align edge metadata paths with GraphAr v1
URL: https://github.com/apache/incubator-graphar/pull/946
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] fix(java): align edge metadata paths with GraphAr v1 [incubator-graphar]
Posted by "SemyonSinchenko (via GitHub)" <gi...@apache.org>.
SemyonSinchenko commented on code in PR #946:
URL: https://github.com/apache/incubator-graphar/pull/946#discussion_r3760000720
##########
tasks/todo.md:
##########
Review Comment:
I think we should not commit such a files.
##########
tasks/lessons.md:
##########
Review Comment:
I think we should not commit such a files.
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] fix(java): align edge metadata paths with GraphAr v1 [incubator-graphar]
Posted by "SYaoJun (via GitHub)" <gi...@apache.org>.
SYaoJun merged PR #946:
URL: https://github.com/apache/incubator-graphar/pull/946
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] fix(java): align edge metadata paths with GraphAr v1 [incubator-graphar]
Posted by "SemyonSinchenko (via GitHub)" <gi...@apache.org>.
SemyonSinchenko commented on PR #946:
URL: https://github.com/apache/incubator-graphar/pull/946#issuecomment-5317665044
@SYaoJun @yangxk1 @Thespica Hi! Let's merge this one? LGTM overall. GAR Java is not published, so there cannot be any breaking changes and it is safe to merge imo.
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org