You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/05/05 09:07:06 UTC

[GitHub] [iotdb] jamber001 opened a new pull request, #5804: [IOTDB-3102] data-sync support ext pipe fwk

jamber001 opened a new pull request, #5804:
URL: https://github.com/apache/iotdb/pull/5804

   https://issues.apache.org/jira/browse/IOTDB-3102


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] Cpaulyz commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
Cpaulyz commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r867668446


##########
external-pipe-api/src/main/java/org/apache/iotdb/pipe/external/api/IExternalPipeSinkWriter.java:
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.iotdb.pipe.external.api;
+
+import java.io.IOException;
+
+/** Responsible for forwarding the operations to the sink. */
+public interface IExternalPipeSinkWriter extends AutoCloseable {
+
+  /** Initialize the writer. */
+  void open() throws IOException;
+
+  /**
+   * Insert a boolean data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertBoolean(String[] path, long time, boolean value) throws IOException;
+
+  /**
+   * Insert a 32-bit integer data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertInt32(String[] path, long time, int value) throws IOException;
+
+  /**
+   * Insert a 64-bit integer data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertInt64(String[] path, long time, long value) throws IOException;
+
+  /**
+   * Insert a float data point to the sink.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertFloat(String[] path, long time, float value) throws IOException;
+
+  /**
+   * Insert a double data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertDouble(String[] path, long time, double value) throws IOException;
+
+  /**
+   * Insert a text data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertText(String[] path, long time, String value) throws IOException;
+
+  /**
+   * Insert a vector data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param dataTypes Datatype of each element in the vector.
+   * @param time Timestamp of the data point.
+   * @param values Value of each element in the vector.
+   */
+  void insertVector(String[] path, DataType[] dataTypes, long time, Object[] values)

Review Comment:
   Param "path" indicates the path to the device to be written to. But how to indicate the measurements?



##########
server/src/main/java/org/apache/iotdb/db/sync/sender/service/SenderService.java:
##########
@@ -163,24 +173,29 @@ public synchronized void addPipe(CreatePipePlan plan) throws PipeException {
 
     PipeSink runningPipeSink = getPipeSink(plan.getPipeSinkName());
     runningPipe = parseCreatePipePlan(plan, runningPipeSink, currentTime);
-    try {
-      transportHandler =
-          TransportHandler.getNewTransportHandler(runningPipe, (IoTDBPipeSink) runningPipeSink);
-      sendMsg(RequestType.CREATE);
-    } catch (ClassCastException e) {
-      logger.error(
-          String.format(
-              "Cast Class to %s error when create pipe %s.",
-              IoTDBPipeSink.class.getName(), plan.getPipeName()),
-          e);
-      runningPipe = null;
-      throw new PipeException(
-          String.format(
-              "Wrong pipeSink type %s for create pipe %s",
-              runningPipeSink.getType(), runningPipeSink.getName()));
-    } catch (PipeException e) {
-      runningPipe = null;
-      throw e;
+    if (runningPipe.getPipeSink().getType() == PipeSink.PipeSinkType.IoTDB) {
+      try {
+        transportHandler =
+            TransportHandler.getNewTransportHandler(runningPipe, (IoTDBPipeSink) runningPipeSink);
+        sendMsg(RequestType.CREATE);
+      } catch (ClassCastException e) {
+        logger.error(
+            String.format(
+                "Cast Class to %s error when create pipe %s.",
+                IoTDBPipeSink.class.getName(), plan.getPipeName()),
+            e);
+        runningPipe = null;
+        throw new PipeException(
+            String.format(
+                "Wrong pipeSink type %s for create pipe %s",
+                runningPipeSink.getType(), runningPipeSink.getPipeSinkName()));
+      } catch (PipeException e) {
+        runningPipe = null;
+        throw e;
+      }
+    } else { // for external pipe
+      // == start ExternalPipeProcessor for send data to external pip plugin

Review Comment:
   ```suggestion
         // == start ExternalPipeProcessor for send data to external pipe plugin
   ```



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] HTHou merged pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
HTHou merged PR #5804:
URL: https://github.com/apache/iotdb/pull/5804


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r879093366


##########
external-pipe-api/src/main/java/org/apache/iotdb/pipe/external/api/IExternalPipeSinkWriter.java:
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.iotdb.pipe.external.api;
+
+import java.io.IOException;
+
+/** Responsible for forwarding the operations to the sink. */
+public interface IExternalPipeSinkWriter extends AutoCloseable {
+
+  /** Initialize the writer. */
+  void open() throws IOException;
+
+  /**
+   * Insert a boolean data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertBoolean(String[] path, long time, boolean value) throws IOException;
+
+  /**
+   * Insert a 32-bit integer data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertInt32(String[] path, long time, int value) throws IOException;
+
+  /**
+   * Insert a 64-bit integer data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertInt64(String[] path, long time, long value) throws IOException;
+
+  /**
+   * Insert a float data point to the sink.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertFloat(String[] path, long time, float value) throws IOException;
+
+  /**
+   * Insert a double data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertDouble(String[] path, long time, double value) throws IOException;
+
+  /**
+   * Insert a text data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertText(String[] path, long time, String value) throws IOException;
+
+  /**
+   * Insert a vector data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param dataTypes Datatype of each element in the vector.
+   * @param time Timestamp of the data point.
+   * @param values Value of each element in the vector.
+   */
+  void insertVector(String[] path, DataType[] dataTypes, long time, Object[] values)

Review Comment:
   @Cpaulyz Thank your comments.  
   1) We have provided 1 example for ext-pipe codes in example/ext-pipe-plugin-example/
   2) In fact, this PR only provides ext-pipe framework and insert-data funciton.   
      Vector/time-aligned、 delete funciton will be added in consequent PRs soon.



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r879060560


##########
server/src/main/java/org/apache/iotdb/db/sync/sender/service/SenderService.java:
##########
@@ -163,24 +173,29 @@ public synchronized void addPipe(CreatePipePlan plan) throws PipeException {
 
     PipeSink runningPipeSink = getPipeSink(plan.getPipeSinkName());
     runningPipe = parseCreatePipePlan(plan, runningPipeSink, currentTime);
-    try {
-      transportHandler =
-          TransportHandler.getNewTransportHandler(runningPipe, (IoTDBPipeSink) runningPipeSink);
-      sendMsg(RequestType.CREATE);
-    } catch (ClassCastException e) {
-      logger.error(
-          String.format(
-              "Cast Class to %s error when create pipe %s.",
-              IoTDBPipeSink.class.getName(), plan.getPipeName()),
-          e);
-      runningPipe = null;
-      throw new PipeException(
-          String.format(
-              "Wrong pipeSink type %s for create pipe %s",
-              runningPipeSink.getType(), runningPipeSink.getName()));
-    } catch (PipeException e) {
-      runningPipe = null;
-      throw e;
+    if (runningPipe.getPipeSink().getType() == PipeSink.PipeSinkType.IoTDB) {
+      try {
+        transportHandler =
+            TransportHandler.getNewTransportHandler(runningPipe, (IoTDBPipeSink) runningPipeSink);
+        sendMsg(RequestType.CREATE);
+      } catch (ClassCastException e) {
+        logger.error(
+            String.format(
+                "Cast Class to %s error when create pipe %s.",
+                IoTDBPipeSink.class.getName(), plan.getPipeName()),
+            e);
+        runningPipe = null;
+        throw new PipeException(
+            String.format(
+                "Wrong pipeSink type %s for create pipe %s",
+                runningPipeSink.getType(), runningPipeSink.getPipeSinkName()));
+      } catch (PipeException e) {
+        runningPipe = null;
+        throw e;
+      }
+    } else { // for external pipe
+      // == start ExternalPipeProcessor for send data to external pip plugin

Review Comment:
   have corrected this.



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] Cpaulyz commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
Cpaulyz commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r867668446


##########
external-pipe-api/src/main/java/org/apache/iotdb/pipe/external/api/IExternalPipeSinkWriter.java:
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.iotdb.pipe.external.api;
+
+import java.io.IOException;
+
+/** Responsible for forwarding the operations to the sink. */
+public interface IExternalPipeSinkWriter extends AutoCloseable {
+
+  /** Initialize the writer. */
+  void open() throws IOException;
+
+  /**
+   * Insert a boolean data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertBoolean(String[] path, long time, boolean value) throws IOException;
+
+  /**
+   * Insert a 32-bit integer data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertInt32(String[] path, long time, int value) throws IOException;
+
+  /**
+   * Insert a 64-bit integer data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertInt64(String[] path, long time, long value) throws IOException;
+
+  /**
+   * Insert a float data point to the sink.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertFloat(String[] path, long time, float value) throws IOException;
+
+  /**
+   * Insert a double data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertDouble(String[] path, long time, double value) throws IOException;
+
+  /**
+   * Insert a text data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertText(String[] path, long time, String value) throws IOException;
+
+  /**
+   * Insert a vector data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param dataTypes Datatype of each element in the vector.
+   * @param time Timestamp of the data point.
+   * @param values Value of each element in the vector.
+   */
+  void insertVector(String[] path, DataType[] dataTypes, long time, Object[] values)

Review Comment:
   I'm confused about how to implement this interface...
   
   Param "path" indicates the path to the device to be written to. But how to indicate the measurements? 
   
   e.g.
   ```
   vector{
    device:"d1", 
    measurements:{"s1","s2"}
   }
   ```



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r881367003


##########
example/ext-pipe-plugin-example/pom.xml:
##########
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.iotdb</groupId>
+    <artifactId>iotdb-ext-pipe-example</artifactId>
+    <version>1.0-SNAPSHOT</version>

Review Comment:
   @HTHou   I have just changed 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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#issuecomment-1135462961

   @qiaojialin  @HTHou  @Cpaulyz   Any new comments?  :-)


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r879071033


##########
example/ext-pipe-plugin-example/pom.xml:
##########
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.iotdb</groupId>
+    <artifactId>iotdb-ext-pipe-example</artifactId>
+    <version>1.0-SNAPSHOT</version>

Review Comment:
   @HTHou  Could you help explain why you want to remove this vesion?



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] qiaojialin commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
qiaojialin commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r878822709


##########
external-pipe-api/src/main/java/org/apache/iotdb/pipe/external/api/IExternalPipeSinkWriter.java:
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.iotdb.pipe.external.api;
+
+import java.io.IOException;
+
+/** Responsible for forwarding the operations to the sink. */
+public interface IExternalPipeSinkWriter extends AutoCloseable {

Review Comment:
   Could we use the interface like Session?



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] qiaojialin commented on pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
qiaojialin commented on PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#issuecomment-1132392388

   Hi, please remove the .tsfile in resource. If we need to use a tsfile for test, we could generate it temporarily.


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] HTHou commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
HTHou commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r878792618


##########
example/ext-pipe-plugin-example/src/main/java/org/apache/iotdb/extpipe/ExtPipeSinkWriterFactory.java:
##########
@@ -0,0 +1,133 @@
+/*
+ * 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.
+ */

Review Comment:
   ```suggestion
   /*
    * 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.
    */
   ```



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] qiaojialin commented on pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
qiaojialin commented on PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#issuecomment-1132392387

   Hi, please remove the .tsfile in resource. If we need to use a tsfile for test, we could generate it temporarily.


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] HTHou commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
HTHou commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r878792848


##########
server/pom.xml:
##########
@@ -75,6 +75,11 @@
             <artifactId>influxdb-thrift</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.iotdb</groupId>
+            <artifactId>external-pipe-api</artifactId>
+            <version>0.14.0-SNAPSHOT</version>

Review Comment:
   ```suggestion
               <version>${project.version}</version>
   ```



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r879067173


##########
example/ext-pipe-plugin-example/src/main/java/org/apache/iotdb/extpipe/ExtPipeSinkWriterImpl.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * 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.
+ */

Review Comment:
   @HTHou I feel confused.
   The old codes and your suggested codes are same except line format.



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r879072919


##########
external-pipe-api/src/main/java/org/apache/iotdb/pipe/external/api/IExternalPipeSinkWriter.java:
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.iotdb.pipe.external.api;
+
+import java.io.IOException;
+
+/** Responsible for forwarding the operations to the sink. */
+public interface IExternalPipeSinkWriter extends AutoCloseable {

Review Comment:
   @qiaojialin  I can not catch your key point.
   IExternalPipeSinkWriter's every implement object will be run in 1 separate thread.
   Ext-pipe customer can run several IExternalPipeSinkWriter threads for 1 ext pipe sink.
   



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r879093366


##########
external-pipe-api/src/main/java/org/apache/iotdb/pipe/external/api/IExternalPipeSinkWriter.java:
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.iotdb.pipe.external.api;
+
+import java.io.IOException;
+
+/** Responsible for forwarding the operations to the sink. */
+public interface IExternalPipeSinkWriter extends AutoCloseable {
+
+  /** Initialize the writer. */
+  void open() throws IOException;
+
+  /**
+   * Insert a boolean data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertBoolean(String[] path, long time, boolean value) throws IOException;
+
+  /**
+   * Insert a 32-bit integer data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertInt32(String[] path, long time, int value) throws IOException;
+
+  /**
+   * Insert a 64-bit integer data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertInt64(String[] path, long time, long value) throws IOException;
+
+  /**
+   * Insert a float data point to the sink.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertFloat(String[] path, long time, float value) throws IOException;
+
+  /**
+   * Insert a double data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertDouble(String[] path, long time, double value) throws IOException;
+
+  /**
+   * Insert a text data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertText(String[] path, long time, String value) throws IOException;
+
+  /**
+   * Insert a vector data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param dataTypes Datatype of each element in the vector.
+   * @param time Timestamp of the data point.
+   * @param values Value of each element in the vector.
+   */
+  void insertVector(String[] path, DataType[] dataTypes, long time, Object[] values)

Review Comment:
   @Cpaulyz Thank your comments.  
   1) We have provided 1 example for ext-pipe codes in example/ext-pipe-plugin-example/
   2) In fact, this PR only provides ext-pipe framework and insert-data funciton.   
      Vector/time-aligned、 delete funciton will be added in consequent PRs soon.
   3) In futur, for vector , Param "path" may indicate the path to the sensors.
   
   



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] HTHou commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
HTHou commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r878792768


##########
example/ext-pipe-plugin-example/pom.xml:
##########
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.iotdb</groupId>
+    <artifactId>iotdb-ext-pipe-example</artifactId>
+    <version>1.0-SNAPSHOT</version>

Review Comment:
   Remove the version?



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] HTHou commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
HTHou commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r881259932


##########
example/ext-pipe-plugin-example/pom.xml:
##########
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.iotdb</groupId>
+    <artifactId>iotdb-ext-pipe-example</artifactId>
+    <version>1.0-SNAPSHOT</version>

Review Comment:
   Because other example code in IoTDB don't have specific version... 



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] HTHou commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
HTHou commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r881260492


##########
example/ext-pipe-plugin-example/src/main/java/org/apache/iotdb/extpipe/ExtPipeSinkWriterImpl.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * 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.
+ */

Review Comment:
   Line 9- 11...



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r881366881


##########
example/ext-pipe-plugin-example/src/main/java/org/apache/iotdb/extpipe/ExtPipeSinkWriterFactory.java:
##########
@@ -0,0 +1,133 @@
+/*
+ * 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.
+ */

Review Comment:
   I have just changed it.  :-)



##########
example/ext-pipe-plugin-example/pom.xml:
##########
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.iotdb</groupId>
+    <artifactId>iotdb-ext-pipe-example</artifactId>
+    <version>1.0-SNAPSHOT</version>

Review Comment:
   I have just changed 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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#issuecomment-1136769182

   > Could extend the SinkWriter to batch interface later.
   
   No problem.  :-)


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#issuecomment-1119429809

   @Cpaulyz Could you help review code changs?


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r879059736


##########
server/pom.xml:
##########
@@ -75,6 +75,11 @@
             <artifactId>influxdb-thrift</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.iotdb</groupId>
+            <artifactId>external-pipe-api</artifactId>
+            <version>0.14.0-SNAPSHOT</version>

Review Comment:
   have changed the codes.



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] HTHou commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
HTHou commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r878792663


##########
example/ext-pipe-plugin-example/src/main/java/org/apache/iotdb/extpipe/ExtPipeSinkWriterImpl.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * 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.
+ */

Review Comment:
   ```suggestion
   /*
    * 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.
    */
   ```



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r879066310


##########
example/ext-pipe-plugin-example/src/main/java/org/apache/iotdb/extpipe/ExtPipeSinkWriterFactory.java:
##########
@@ -0,0 +1,133 @@
+/*
+ * 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.
+ */

Review Comment:
   @HTHou   I feel confused for this comment.
   The old codes and your suggested codes are same except line format.



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r879093366


##########
external-pipe-api/src/main/java/org/apache/iotdb/pipe/external/api/IExternalPipeSinkWriter.java:
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.iotdb.pipe.external.api;
+
+import java.io.IOException;
+
+/** Responsible for forwarding the operations to the sink. */
+public interface IExternalPipeSinkWriter extends AutoCloseable {
+
+  /** Initialize the writer. */
+  void open() throws IOException;
+
+  /**
+   * Insert a boolean data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertBoolean(String[] path, long time, boolean value) throws IOException;
+
+  /**
+   * Insert a 32-bit integer data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertInt32(String[] path, long time, int value) throws IOException;
+
+  /**
+   * Insert a 64-bit integer data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertInt64(String[] path, long time, long value) throws IOException;
+
+  /**
+   * Insert a float data point to the sink.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertFloat(String[] path, long time, float value) throws IOException;
+
+  /**
+   * Insert a double data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertDouble(String[] path, long time, double value) throws IOException;
+
+  /**
+   * Insert a text data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param time Timestamp of the data point.
+   * @param value Value of the data point.
+   */
+  void insertText(String[] path, long time, String value) throws IOException;
+
+  /**
+   * Insert a vector data point to the sink.
+   *
+   * <p>The framework will retry if this method throws an {@link IOException}.
+   *
+   * @param path The parts of a path separated by '.'. For example, for a path root.a.b.c, the input
+   *     argument would be ["root", "a", "b", "c"].
+   * @param dataTypes Datatype of each element in the vector.
+   * @param time Timestamp of the data point.
+   * @param values Value of each element in the vector.
+   */
+  void insertVector(String[] path, DataType[] dataTypes, long time, Object[] values)

Review Comment:
   @Cpaulyz Thank your comments.  
   1) We have provided 1 example for ext-pipe codes in example/ext-pipe-plugin-example/
   2) In fact, this PR only provides ext-pipe framework and insert-data funciton.   
      Vector 、 time-aligned、 delete funciton will be added in consequent PRs soon.



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] jamber001 commented on pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
jamber001 commented on PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#issuecomment-1132584469

   > Hi, please remove the .tsfile in resource. If we need to use a tsfile for test, we could generate it temporarily.
   
   OK. I am changing test-code to generate tsfile for test. :-)


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] HTHou commented on a diff in pull request #5804: [IOTDB-3102] data-sync support ext pipe fwk

Posted by GitBox <gi...@apache.org>.
HTHou commented on code in PR #5804:
URL: https://github.com/apache/iotdb/pull/5804#discussion_r881260238


##########
example/ext-pipe-plugin-example/src/main/java/org/apache/iotdb/extpipe/ExtPipeSinkWriterFactory.java:
##########
@@ -0,0 +1,133 @@
+/*
+ * 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.
+ */

Review Comment:
   Line 9- 11...



-- 
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: reviews-unsubscribe@iotdb.apache.org

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