From f35e435ecb16fcadfc9ca90529fa1024fa8f9fd9 Mon Sep 17 00:00:00 2001 From: Selim Soufargi Date: Sat, 28 Jun 2025 20:21:57 +0200 Subject: [PATCH 1/9] Chunk Info Reader (Java) + refactoring for VertexInfo --- .../apache/graphar/info/ChunkInfoReader.java | 39 ++++++ .../org/apache/graphar/info/FileReader.java | 55 ++++++++ .../apache/graphar/info/FileReaderUtils.java | 117 ++++++++++++++++++ .../org/apache/graphar/info/VertexInfo.java | 4 - 4 files changed, 211 insertions(+), 4 deletions(-) create mode 100644 maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java create mode 100644 maven-projects/info/src/main/java/org/apache/graphar/info/FileReader.java create mode 100644 maven-projects/info/src/main/java/org/apache/graphar/info/FileReaderUtils.java diff --git a/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java b/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java new file mode 100644 index 000000000..faf7b451c --- /dev/null +++ b/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.graphar.info; + +public class ChunkInfoReader { + private final VertexInfo cachedVertexInfo; + private final PropertyGroup cachedPropertyGroup; + + public long chunkExists(long internalId) { + chunkIdx = internalId / cachedVertexInfo.getChunkSize(); + chunkCount = FileReader.getFileCount(cachedVertexInfo, cachedPropertyGroup); + if (chunkIdx < chunkCount) { + return true; + } + return false; + } + + public String getPropertyGroupChunkPath(PropertyGroup propertyGroup, long chunkIndex) { + // PropertyGroup will be checked in getPropertyGroupPrefix + return cachedVertexInfo.getPropertyGroupPrefix(propertyGroup) + "/chunk" + chunkIndex; + } +} diff --git a/maven-projects/info/src/main/java/org/apache/graphar/info/FileReader.java b/maven-projects/info/src/main/java/org/apache/graphar/info/FileReader.java new file mode 100644 index 000000000..b26e6b960 --- /dev/null +++ b/maven-projects/info/src/main/java/org/apache/graphar/info/FileReader.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.graphar.info; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FSDataInputStream; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.io.IOException; +import java.net.URI; + +public static class FileReader { + + //TODO API to read data files based on type (CSV, Parquet, ..) + public static long getFileCount(VertexInfo vertexInfo,PropertyGroup propertyGroup) { + // TODO check equality test for type + String type = propertyGroup.getFileType().toString(); + numberOfParts = vertexInfo.getChunkSize() + chunkBasePath = vertexInfo.getPropertyGroupPrefix() + "/part"; + totalRowCount = 0; + + for (int i : numberOfParts) { + chunkPath = chunkBasePath + Integer.toString(i); + if (type == "CSV") { + long currentChunkEntryCount = FileReaderUtils.countCsvFileRows(chunkPath); + } + elif(type == "Parquet") { + long currentChunkEntryCount = FileReaderUtils.countParquetFileRows(chunkPath); + } + totalRowCount = totalRowCount + currentChunkEntryCount; + } + return totalRowCount; + + } + +} \ No newline at end of file diff --git a/maven-projects/info/src/main/java/org/apache/graphar/info/FileReaderUtils.java b/maven-projects/info/src/main/java/org/apache/graphar/info/FileReaderUtils.java new file mode 100644 index 000000000..cd8a91214 --- /dev/null +++ b/maven-projects/info/src/main/java/org/apache/graphar/info/FileReaderUtils.java @@ -0,0 +1,117 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.graphar.info; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; +import org.apache.parquet.hadoop.ParquetFileReader; +import org.apache.parquet.hadoop.metadata.ParquetMetadata; +import org.apache.parquet.hadoop.metadata.BlockMetaData; + +import java.io.IOException; +import java.net.URI; +import java.util.List; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FSDataInputStream; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.io.IOException; +import java.net.URI; + +public static class FileReaderUtils { + private Configuration conf = new Configuration(); + + public static long countCsvFileRows(String filePath) { + + Path csvFilePath = new Path(filePath); + + FileSystem fs = null; + + FSDataInputStream inputStream = null; + BufferedReader reader = null; + long lineCount = 0; + IOException e + + try { + fs = FileSystem.get(conf); + inputStream = fs.open(csvFilePath); + reader = new BufferedReader(new InputStreamReader(inputStream)); + + while (reader.readLine() != null) { + lineCount++; + } + return lineCount; + + } catch ( + + { + System.err.println("Error reading CSV file: " + e.getMessage()); + e.printStackTrace(); + }) + + { + try { + if (reader != null) reader.close(); + if (inputStream != null) inputStream.close(); + if (fs != null) fs.close(); + } catch (IOException e) { + System.err.println("Error closing resources: " + e.getMessage()); + } + } + } + + public static long countParquetFileRows(String filePath) { + Path parquetFilePath = new Path(filePath); + + FileSystem fs = null; + try { + + fs = FileSystem.get(conf); + + // Open the Parquet file + try (ParquetFileReader reader = ParquetFileReader.open(conf, parquetFilePath)) { + ParquetMetadata metadata = reader.getFooter(); + long totalRowCount = 0; + + List blocks = metadata.getBlocks(); + for (BlockMetaData block : blocks) { + totalRowCount += block.getRowCount(); + } + + return totalRowCount; + } + } catch (IOException e) { + System.err.println("Error reading Parquet file: " + e.getMessage()); + e.printStackTrace(); + } finally { + if (fs != null) { + try { + fs.close(); + } catch (IOException e) { + System.err.println("Error closing FileSystem: " + e.getMessage()); + } + } + } + } +} diff --git a/maven-projects/info/src/main/java/org/apache/graphar/info/VertexInfo.java b/maven-projects/info/src/main/java/org/apache/graphar/info/VertexInfo.java index d32475623..657dfd651 100644 --- a/maven-projects/info/src/main/java/org/apache/graphar/info/VertexInfo.java +++ b/maven-projects/info/src/main/java/org/apache/graphar/info/VertexInfo.java @@ -101,10 +101,6 @@ public String getPropertyGroupPrefix(PropertyGroup propertyGroup) { return getPrefix() + "/" + propertyGroup.getPrefix(); } - public String getPropertyGroupChunkPath(PropertyGroup propertyGroup, long chunkIndex) { - // PropertyGroup will be checked in getPropertyGroupPrefix - return getPropertyGroupPrefix(propertyGroup) + "/chunk" + chunkIndex; - } public String getVerticesNumFilePath() { return getPrefix() + "/vertex_count"; From 65a2121dbe836e97b30bb72396accfe0441b03ca Mon Sep 17 00:00:00 2001 From: Selim Soufargi Date: Mon, 30 Jun 2025 18:22:56 +0200 Subject: [PATCH 2/9] switch for file types instead of if for file type names --- .../java/org/apache/graphar/info/FileReader.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/maven-projects/info/src/main/java/org/apache/graphar/info/FileReader.java b/maven-projects/info/src/main/java/org/apache/graphar/info/FileReader.java index b26e6b960..81c3dd5d7 100644 --- a/maven-projects/info/src/main/java/org/apache/graphar/info/FileReader.java +++ b/maven-projects/info/src/main/java/org/apache/graphar/info/FileReader.java @@ -18,10 +18,12 @@ */ package org.apache.graphar.info; + import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; +import org.apache.graphar.types.FileType; import java.io.BufferedReader; import java.io.InputStreamReader; @@ -31,21 +33,25 @@ public static class FileReader { //TODO API to read data files based on type (CSV, Parquet, ..) - public static long getFileCount(VertexInfo vertexInfo,PropertyGroup propertyGroup) { + public static long getFileCount(VertexInfo vertexInfo, PropertyGroup propertyGroup) { // TODO check equality test for type - String type = propertyGroup.getFileType().toString(); + FileType type = propertyGroup.getFileType(); numberOfParts = vertexInfo.getChunkSize() chunkBasePath = vertexInfo.getPropertyGroupPrefix() + "/part"; totalRowCount = 0; for (int i : numberOfParts) { chunkPath = chunkBasePath + Integer.toString(i); - if (type == "CSV") { + switch (type): + case CSV { long currentChunkEntryCount = FileReaderUtils.countCsvFileRows(chunkPath); + break; } - elif(type == "Parquet") { + case PARQUET { long currentChunkEntryCount = FileReaderUtils.countParquetFileRows(chunkPath); + break; } + // TODO ORC... totalRowCount = totalRowCount + currentChunkEntryCount; } return totalRowCount; From fbec999060e549f35ed2b0fbb425c538dd1f2979 Mon Sep 17 00:00:00 2001 From: Selim Soufargi Date: Tue, 1 Jul 2025 17:01:30 +0200 Subject: [PATCH 3/9] getChunk and checKChunkExists for ChunkInfoReader --- .../apache/graphar/info/ChunkInfoReader.java | 25 ++-- .../org/apache/graphar/info/FileReader.java | 61 --------- .../apache/graphar/info/FileReaderUtils.java | 117 ------------------ 3 files changed, 18 insertions(+), 185 deletions(-) delete mode 100644 maven-projects/info/src/main/java/org/apache/graphar/info/FileReader.java delete mode 100644 maven-projects/info/src/main/java/org/apache/graphar/info/FileReaderUtils.java diff --git a/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java b/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java index faf7b451c..f7690bed4 100644 --- a/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java +++ b/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java @@ -18,18 +18,29 @@ */ package org.apache.graphar.info; - +// based on https://github.com/apache/incubator-graphar/blob/main/cpp/src/graphar/chunk_info_reader.cc public class ChunkInfoReader { private final VertexInfo cachedVertexInfo; private final PropertyGroup cachedPropertyGroup; - public long chunkExists(long internalId) { - chunkIdx = internalId / cachedVertexInfo.getChunkSize(); - chunkCount = FileReader.getFileCount(cachedVertexInfo, cachedPropertyGroup); - if (chunkIdx < chunkCount) { - return true; + public static String getChunk(long, index, VertexInfo vertexInfo) { + long chunkIndex = chunkExists(index); + String chunkBasePath = vertexInfo.getPropertyGroupPrefix() + "/chunk"; + return chunkBasePath + String.valueOf(chunkIndex); + + } + + public long chunkExists(long index) { + int chunkSize = vertexInfo.getChunkSize() + int totalCount = Integer.valueOf(vertexInfo.getVerticesNumFilePath()); + int chunksCount = totalCount / chunkSize; + long chunkIndex = index / chunksCount; + + if (chunkIndex < chunkCount) { + return chunkIndex; } - return false; + throw new IndexOutOfBoundsException("Chunk Index out of Range " + Integer.valueOf(index)); + } public String getPropertyGroupChunkPath(PropertyGroup propertyGroup, long chunkIndex) { diff --git a/maven-projects/info/src/main/java/org/apache/graphar/info/FileReader.java b/maven-projects/info/src/main/java/org/apache/graphar/info/FileReader.java deleted file mode 100644 index 81c3dd5d7..000000000 --- a/maven-projects/info/src/main/java/org/apache/graphar/info/FileReader.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.graphar.info; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FSDataInputStream; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; -import org.apache.graphar.types.FileType; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.URI; - -public static class FileReader { - - //TODO API to read data files based on type (CSV, Parquet, ..) - public static long getFileCount(VertexInfo vertexInfo, PropertyGroup propertyGroup) { - // TODO check equality test for type - FileType type = propertyGroup.getFileType(); - numberOfParts = vertexInfo.getChunkSize() - chunkBasePath = vertexInfo.getPropertyGroupPrefix() + "/part"; - totalRowCount = 0; - - for (int i : numberOfParts) { - chunkPath = chunkBasePath + Integer.toString(i); - switch (type): - case CSV { - long currentChunkEntryCount = FileReaderUtils.countCsvFileRows(chunkPath); - break; - } - case PARQUET { - long currentChunkEntryCount = FileReaderUtils.countParquetFileRows(chunkPath); - break; - } - // TODO ORC... - totalRowCount = totalRowCount + currentChunkEntryCount; - } - return totalRowCount; - - } - -} \ No newline at end of file diff --git a/maven-projects/info/src/main/java/org/apache/graphar/info/FileReaderUtils.java b/maven-projects/info/src/main/java/org/apache/graphar/info/FileReaderUtils.java deleted file mode 100644 index cd8a91214..000000000 --- a/maven-projects/info/src/main/java/org/apache/graphar/info/FileReaderUtils.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.graphar.info; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; -import org.apache.parquet.hadoop.ParquetFileReader; -import org.apache.parquet.hadoop.metadata.ParquetMetadata; -import org.apache.parquet.hadoop.metadata.BlockMetaData; - -import java.io.IOException; -import java.net.URI; -import java.util.List; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FSDataInputStream; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.IOException; -import java.net.URI; - -public static class FileReaderUtils { - private Configuration conf = new Configuration(); - - public static long countCsvFileRows(String filePath) { - - Path csvFilePath = new Path(filePath); - - FileSystem fs = null; - - FSDataInputStream inputStream = null; - BufferedReader reader = null; - long lineCount = 0; - IOException e - - try { - fs = FileSystem.get(conf); - inputStream = fs.open(csvFilePath); - reader = new BufferedReader(new InputStreamReader(inputStream)); - - while (reader.readLine() != null) { - lineCount++; - } - return lineCount; - - } catch ( - - { - System.err.println("Error reading CSV file: " + e.getMessage()); - e.printStackTrace(); - }) - - { - try { - if (reader != null) reader.close(); - if (inputStream != null) inputStream.close(); - if (fs != null) fs.close(); - } catch (IOException e) { - System.err.println("Error closing resources: " + e.getMessage()); - } - } - } - - public static long countParquetFileRows(String filePath) { - Path parquetFilePath = new Path(filePath); - - FileSystem fs = null; - try { - - fs = FileSystem.get(conf); - - // Open the Parquet file - try (ParquetFileReader reader = ParquetFileReader.open(conf, parquetFilePath)) { - ParquetMetadata metadata = reader.getFooter(); - long totalRowCount = 0; - - List blocks = metadata.getBlocks(); - for (BlockMetaData block : blocks) { - totalRowCount += block.getRowCount(); - } - - return totalRowCount; - } - } catch (IOException e) { - System.err.println("Error reading Parquet file: " + e.getMessage()); - e.printStackTrace(); - } finally { - if (fs != null) { - try { - fs.close(); - } catch (IOException e) { - System.err.println("Error closing FileSystem: " + e.getMessage()); - } - } - } - } -} From c7a09889b67dc869f974b4decc43ed45f93267aa Mon Sep 17 00:00:00 2001 From: Selim Soufargi Date: Tue, 29 Jul 2025 07:27:07 +0200 Subject: [PATCH 4/9] fixed issues --- maven-projects/info/pom.xml | 2 +- .../apache/graphar/info/ChunkInfoReader.java | 20 +++++++++---------- .../org/apache/graphar/info/VertexInfo.java | 5 ++++- maven-projects/pom.xml | 2 +- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/maven-projects/info/pom.xml b/maven-projects/info/pom.xml index 3df2b5bab..0ee62bae1 100644 --- a/maven-projects/info/pom.xml +++ b/maven-projects/info/pom.xml @@ -94,7 +94,7 @@ - 1.7 + 1.28.0 diff --git a/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java b/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java index f7690bed4..e246e7741 100644 --- a/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java +++ b/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java @@ -20,26 +20,26 @@ package org.apache.graphar.info; // based on https://github.com/apache/incubator-graphar/blob/main/cpp/src/graphar/chunk_info_reader.cc public class ChunkInfoReader { - private final VertexInfo cachedVertexInfo; - private final PropertyGroup cachedPropertyGroup; + private static final VertexInfo cachedVertexInfo = null; + private static final PropertyGroup cachedPropertyGroup = null; - public static String getChunk(long, index, VertexInfo vertexInfo) { + public static String getChunk(long index) { long chunkIndex = chunkExists(index); - String chunkBasePath = vertexInfo.getPropertyGroupPrefix() + "/chunk"; + String chunkBasePath = cachedVertexInfo.getPropertyGroupPrefix(cachedPropertyGroup) + "/chunk"; return chunkBasePath + String.valueOf(chunkIndex); } - public long chunkExists(long index) { - int chunkSize = vertexInfo.getChunkSize() - int totalCount = Integer.valueOf(vertexInfo.getVerticesNumFilePath()); - int chunksCount = totalCount / chunkSize; + public static long chunkExists(long index) { + long chunkSize = cachedVertexInfo.getChunkSize(); + int totalCount = Integer.valueOf(cachedVertexInfo.getVerticesNumFilePath()); + long chunksCount = totalCount / chunkSize; long chunkIndex = index / chunksCount; - if (chunkIndex < chunkCount) { + if (chunkIndex < chunksCount) { return chunkIndex; } - throw new IndexOutOfBoundsException("Chunk Index out of Range " + Integer.valueOf(index)); + throw new IndexOutOfBoundsException("Chunk Index out of Range " + String.valueOf(index)); } diff --git a/maven-projects/info/src/main/java/org/apache/graphar/info/VertexInfo.java b/maven-projects/info/src/main/java/org/apache/graphar/info/VertexInfo.java index 657dfd651..899fad8e1 100644 --- a/maven-projects/info/src/main/java/org/apache/graphar/info/VertexInfo.java +++ b/maven-projects/info/src/main/java/org/apache/graphar/info/VertexInfo.java @@ -100,7 +100,10 @@ public String getPropertyGroupPrefix(PropertyGroup propertyGroup) { checkPropertyGroupExist(propertyGroup); return getPrefix() + "/" + propertyGroup.getPrefix(); } - + public String getPropertyGroupChunkPath(PropertyGroup propertyGroup, long chunkIndex) { + // PropertyGroup will be checked in getPropertyGroupPrefix + return getPropertyGroupPrefix(propertyGroup) + "chunk" + chunkIndex; + } public String getVerticesNumFilePath() { return getPrefix() + "/vertex_count"; diff --git a/maven-projects/pom.xml b/maven-projects/pom.xml index b7c1b09ec..d7ab6d107 100644 --- a/maven-projects/pom.xml +++ b/maven-projects/pom.xml @@ -72,7 +72,7 @@ --> 0.12.0-SNAPSHOT - 2.20.0 + 2.46.1 java From 245a8220210e3654b4661da6887fcee2107525c9 Mon Sep 17 00:00:00 2001 From: Selim Soufargi Date: Thu, 31 Jul 2025 05:09:17 +0200 Subject: [PATCH 5/9] fixed issues related to maven compiler version --- maven-projects/info/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maven-projects/info/pom.xml b/maven-projects/info/pom.xml index 0ee62bae1..7b0227e7a 100644 --- a/maven-projects/info/pom.xml +++ b/maven-projects/info/pom.xml @@ -39,8 +39,8 @@ graphar-info - 11 - 11 + 17 + 17 UTF-8 2.3.0 4.27.1 From ea75e8757e467a7be9fc5af39c9eb3e0b64be61b Mon Sep 17 00:00:00 2001 From: Selim Soufargi Date: Fri, 1 Aug 2025 05:27:51 +0200 Subject: [PATCH 6/9] fix tests for CI to pass --- maven-projects/info/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maven-projects/info/pom.xml b/maven-projects/info/pom.xml index 7b0227e7a..9e693132f 100644 --- a/maven-projects/info/pom.xml +++ b/maven-projects/info/pom.xml @@ -39,8 +39,8 @@ graphar-info - 17 - 17 + 17 + 17 UTF-8 2.3.0 4.27.1 From 345284779698ca72c2f743a92d810a8c2bc055cb Mon Sep 17 00:00:00 2001 From: Selim Soufargi Date: Tue, 5 Aug 2025 10:10:04 +0200 Subject: [PATCH 7/9] fixing CI spotless error --- maven-projects/info/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven-projects/info/pom.xml b/maven-projects/info/pom.xml index 9e693132f..0096fa2d2 100644 --- a/maven-projects/info/pom.xml +++ b/maven-projects/info/pom.xml @@ -94,7 +94,7 @@ - 1.28.0 + 1.14.0 From 48898e0b8a1a8a9f9abdae6384c2335408de746b Mon Sep 17 00:00:00 2001 From: Selim Soufargi Date: Tue, 5 Aug 2025 10:27:59 +0200 Subject: [PATCH 8/9] fixing CI error on formatting --- .../java/org/apache/graphar/info/ChunkInfoReader.java | 8 ++++---- .../src/main/java/org/apache/graphar/info/VertexInfo.java | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java b/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java index e246e7741..a4acfb80f 100644 --- a/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java +++ b/maven-projects/info/src/main/java/org/apache/graphar/info/ChunkInfoReader.java @@ -18,16 +18,17 @@ */ package org.apache.graphar.info; -// based on https://github.com/apache/incubator-graphar/blob/main/cpp/src/graphar/chunk_info_reader.cc +// based on +// https://github.com/apache/incubator-graphar/blob/main/cpp/src/graphar/chunk_info_reader.cc public class ChunkInfoReader { private static final VertexInfo cachedVertexInfo = null; private static final PropertyGroup cachedPropertyGroup = null; public static String getChunk(long index) { long chunkIndex = chunkExists(index); - String chunkBasePath = cachedVertexInfo.getPropertyGroupPrefix(cachedPropertyGroup) + "/chunk"; + String chunkBasePath = + cachedVertexInfo.getPropertyGroupPrefix(cachedPropertyGroup) + "/chunk"; return chunkBasePath + String.valueOf(chunkIndex); - } public static long chunkExists(long index) { @@ -40,7 +41,6 @@ public static long chunkExists(long index) { return chunkIndex; } throw new IndexOutOfBoundsException("Chunk Index out of Range " + String.valueOf(index)); - } public String getPropertyGroupChunkPath(PropertyGroup propertyGroup, long chunkIndex) { diff --git a/maven-projects/info/src/main/java/org/apache/graphar/info/VertexInfo.java b/maven-projects/info/src/main/java/org/apache/graphar/info/VertexInfo.java index 899fad8e1..b1a0ec83a 100644 --- a/maven-projects/info/src/main/java/org/apache/graphar/info/VertexInfo.java +++ b/maven-projects/info/src/main/java/org/apache/graphar/info/VertexInfo.java @@ -100,6 +100,7 @@ public String getPropertyGroupPrefix(PropertyGroup propertyGroup) { checkPropertyGroupExist(propertyGroup); return getPrefix() + "/" + propertyGroup.getPrefix(); } + public String getPropertyGroupChunkPath(PropertyGroup propertyGroup, long chunkIndex) { // PropertyGroup will be checked in getPropertyGroupPrefix return getPropertyGroupPrefix(propertyGroup) + "chunk" + chunkIndex; From 4443d3d057cc1742dcc99a54ea27c1053def34f7 Mon Sep 17 00:00:00 2001 From: Selim Soufargi Date: Tue, 5 Aug 2025 11:53:02 +0200 Subject: [PATCH 9/9] fixing CI error --- maven-projects/info/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maven-projects/info/pom.xml b/maven-projects/info/pom.xml index 0096fa2d2..2f993e6f7 100644 --- a/maven-projects/info/pom.xml +++ b/maven-projects/info/pom.xml @@ -100,6 +100,16 @@ + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.5.0 + org.apache.maven.plugins maven-shade-plugin