You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geaflow.apache.org by "cfsfine (via GitHub)" <gi...@apache.org> on 2025/08/04 06:50:45 UTC

[PR] Support ASync-Write mode for PaimonGraphStore [geaflow]

cfsfine opened a new pull request, #578:
URL: https://github.com/apache/geaflow/pull/578

   ### What changes were proposed in this pull request?
   Support ASync-Write mode for PaimonGraphStore.
   
   ### How was this PR tested?
   - [✅] Tests have Added for the changes
   - [❎] Production environment verified
   


-- 
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: issues-unsubscribe@geaflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org
For additional commands, e-mail: issues-help@geaflow.apache.org


Re: [PR] 【ISSUE-577】Support ASync-Write mode for PaimonGraphStore [geaflow]

Posted by "Loognqiang (via GitHub)" <gi...@apache.org>.
Loognqiang commented on code in PR #578:
URL: https://github.com/apache/geaflow/pull/578#discussion_r2265752600


##########
geaflow/geaflow-plugins/geaflow-store/geaflow-store-paimon/src/main/java/org/apache/geaflow/store/paimon/proxy/AsyncPaimonGraphRWProxy.java:
##########
@@ -0,0 +1,113 @@
+/*
+ * 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.geaflow.store.paimon.proxy;
+
+import com.google.common.collect.Lists;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import org.apache.geaflow.common.config.Configuration;
+import org.apache.geaflow.common.serialize.SerializerFactory;
+import org.apache.geaflow.model.graph.edge.IEdge;
+import org.apache.geaflow.model.graph.vertex.IVertex;
+import org.apache.geaflow.state.graph.encoder.IGraphKVEncoder;
+import org.apache.geaflow.state.pushdown.IStatePushDown;
+import org.apache.geaflow.state.pushdown.filter.inner.GraphFilter;
+import org.apache.geaflow.state.pushdown.filter.inner.IGraphFilter;
+import org.apache.geaflow.store.data.AsyncFlushBuffer;
+import org.apache.geaflow.store.data.GraphWriteBuffer;
+import org.apache.geaflow.store.paimon.PaimonTableRWHandle;
+
+public class AsyncPaimonGraphRWProxy<K, VV, EV> extends PaimonGraphRWProxy<K, VV, EV> {
+
+    private final AsyncFlushBuffer<K, VV, EV> flushBuffer;
+
+    public AsyncPaimonGraphRWProxy(PaimonTableRWHandle vertexHandle, PaimonTableRWHandle edgeHandle,
+                                   int[] projection, IGraphKVEncoder<K, VV, EV> encoder,
+                                   Configuration config) {
+        super(vertexHandle, edgeHandle, projection, encoder);
+        this.flushBuffer = new AsyncFlushBuffer<>(config, this::flush,
+            SerializerFactory.getKryoSerializer());
+    }
+
+    private void flush(GraphWriteBuffer<K, VV, EV> graphWriteBuffer) {

Review Comment:
   I got it.



-- 
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: issues-unsubscribe@geaflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org
For additional commands, e-mail: issues-help@geaflow.apache.org


Re: [PR] 【ISSUE-577】Support ASync-Write mode for PaimonGraphStore [geaflow]

Posted by "tanghaodong25 (via GitHub)" <gi...@apache.org>.
tanghaodong25 commented on PR #578:
URL: https://github.com/apache/geaflow/pull/578#issuecomment-3173362370

   LGTM


-- 
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: issues-unsubscribe@geaflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org
For additional commands, e-mail: issues-help@geaflow.apache.org


Re: [PR] 【ISSUE-577】Support ASync-Write mode for PaimonGraphStore [geaflow]

Posted by "tanghaodong25 (via GitHub)" <gi...@apache.org>.
tanghaodong25 merged PR #578:
URL: https://github.com/apache/geaflow/pull/578


-- 
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: issues-unsubscribe@geaflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org
For additional commands, e-mail: issues-help@geaflow.apache.org


Re: [PR] 【ISSUE-577】Support ASync-Write mode for PaimonGraphStore [geaflow]

Posted by "cfsfine (via GitHub)" <gi...@apache.org>.
cfsfine commented on code in PR #578:
URL: https://github.com/apache/geaflow/pull/578#discussion_r2265619213


##########
geaflow/geaflow-plugins/geaflow-store/geaflow-store-paimon/src/main/java/org/apache/geaflow/store/paimon/proxy/AsyncPaimonGraphRWProxy.java:
##########
@@ -0,0 +1,113 @@
+/*
+ * 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.geaflow.store.paimon.proxy;
+
+import com.google.common.collect.Lists;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import org.apache.geaflow.common.config.Configuration;
+import org.apache.geaflow.common.serialize.SerializerFactory;
+import org.apache.geaflow.model.graph.edge.IEdge;
+import org.apache.geaflow.model.graph.vertex.IVertex;
+import org.apache.geaflow.state.graph.encoder.IGraphKVEncoder;
+import org.apache.geaflow.state.pushdown.IStatePushDown;
+import org.apache.geaflow.state.pushdown.filter.inner.GraphFilter;
+import org.apache.geaflow.state.pushdown.filter.inner.IGraphFilter;
+import org.apache.geaflow.store.data.AsyncFlushBuffer;
+import org.apache.geaflow.store.data.GraphWriteBuffer;
+import org.apache.geaflow.store.paimon.PaimonTableRWHandle;
+
+public class AsyncPaimonGraphRWProxy<K, VV, EV> extends PaimonGraphRWProxy<K, VV, EV> {
+
+    private final AsyncFlushBuffer<K, VV, EV> flushBuffer;
+
+    public AsyncPaimonGraphRWProxy(PaimonTableRWHandle vertexHandle, PaimonTableRWHandle edgeHandle,
+                                   int[] projection, IGraphKVEncoder<K, VV, EV> encoder,
+                                   Configuration config) {
+        super(vertexHandle, edgeHandle, projection, encoder);
+        this.flushBuffer = new AsyncFlushBuffer<>(config, this::flush,
+            SerializerFactory.getKryoSerializer());
+    }
+
+    private void flush(GraphWriteBuffer<K, VV, EV> graphWriteBuffer) {

Review Comment:
   > When will this private interface be used? And why is this private interface needed when has public flush() interface.
   
   As you can see, the public method flush is exposed to out. While the private method flush is passed into the internal member `AsyncBuffer` as a callback function, which will be called when the `AsyncBuffer` is persisted to disk.



-- 
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: issues-unsubscribe@geaflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org
For additional commands, e-mail: issues-help@geaflow.apache.org


Re: [PR] 【ISSUE-577】Support ASync-Write mode for PaimonGraphStore [geaflow]

Posted by "Loognqiang (via GitHub)" <gi...@apache.org>.
Loognqiang commented on code in PR #578:
URL: https://github.com/apache/geaflow/pull/578#discussion_r2257085968


##########
geaflow/geaflow-plugins/geaflow-store/geaflow-store-paimon/src/main/java/org/apache/geaflow/store/paimon/proxy/AsyncPaimonGraphRWProxy.java:
##########
@@ -0,0 +1,113 @@
+/*
+ * 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.geaflow.store.paimon.proxy;
+
+import com.google.common.collect.Lists;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import org.apache.geaflow.common.config.Configuration;
+import org.apache.geaflow.common.serialize.SerializerFactory;
+import org.apache.geaflow.model.graph.edge.IEdge;
+import org.apache.geaflow.model.graph.vertex.IVertex;
+import org.apache.geaflow.state.graph.encoder.IGraphKVEncoder;
+import org.apache.geaflow.state.pushdown.IStatePushDown;
+import org.apache.geaflow.state.pushdown.filter.inner.GraphFilter;
+import org.apache.geaflow.state.pushdown.filter.inner.IGraphFilter;
+import org.apache.geaflow.store.data.AsyncFlushBuffer;
+import org.apache.geaflow.store.data.GraphWriteBuffer;
+import org.apache.geaflow.store.paimon.PaimonTableRWHandle;
+
+public class AsyncPaimonGraphRWProxy<K, VV, EV> extends PaimonGraphRWProxy<K, VV, EV> {
+
+    private final AsyncFlushBuffer<K, VV, EV> flushBuffer;
+
+    public AsyncPaimonGraphRWProxy(PaimonTableRWHandle vertexHandle, PaimonTableRWHandle edgeHandle,
+                                   int[] projection, IGraphKVEncoder<K, VV, EV> encoder,
+                                   Configuration config) {
+        super(vertexHandle, edgeHandle, projection, encoder);
+        this.flushBuffer = new AsyncFlushBuffer<>(config, this::flush,
+            SerializerFactory.getKryoSerializer());
+    }
+
+    private void flush(GraphWriteBuffer<K, VV, EV> graphWriteBuffer) {

Review Comment:
   When will this private interface be used? And why is this private interface needed when has public flush() interface.



-- 
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: issues-unsubscribe@geaflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org
For additional commands, e-mail: issues-help@geaflow.apache.org