From e15293dbbca65fe7eab11af96d1f4b3689f1f05c Mon Sep 17 00:00:00 2001 From: jeremyhi Date: Tue, 9 Jan 2024 19:34:46 +0800 Subject: [PATCH] docs: docs improve --- .../src/main/java/io/greptime/StreamWriter.java | 5 ++++- .../src/main/java/io/greptime/Write.java | 14 ++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ingester-protocol/src/main/java/io/greptime/StreamWriter.java b/ingester-protocol/src/main/java/io/greptime/StreamWriter.java index f447538..55cc5d4 100644 --- a/ingester-protocol/src/main/java/io/greptime/StreamWriter.java +++ b/ingester-protocol/src/main/java/io/greptime/StreamWriter.java @@ -18,7 +18,10 @@ import java.util.concurrent.CompletableFuture; /** - * A stream-writer + * A stream writer to continuously write data to the database, + * typically used in data import scenarios. After completion, + * the stream needs to be closed(Call StreamWriter#completed()), + * and the write result can be obtained from the database server. * * @author jiachun.fjc */ diff --git a/ingester-protocol/src/main/java/io/greptime/Write.java b/ingester-protocol/src/main/java/io/greptime/Write.java index bf058a4..220f717 100644 --- a/ingester-protocol/src/main/java/io/greptime/Write.java +++ b/ingester-protocol/src/main/java/io/greptime/Write.java @@ -26,7 +26,7 @@ import java.util.concurrent.CompletableFuture; /** - * Write API: writes data in row format to the DB. + * Write API: writes data to the database. * * @author jiachun.fjc */ @@ -53,9 +53,9 @@ default CompletableFuture> write(Collection tables, } /** - * Write multi tables multi tables data to database. + * Write multiple rows of data (which can belong to multiple tables) to the database at once. * - * @param tables rows with multi tables + * @param tables a collection of data to be written, classified by table * @param writeOp write operation(insert or delete) * @param ctx invoke context * @return write result @@ -77,10 +77,12 @@ default StreamWriter streamWriter(int maxPointsPerSecond) { } /** - * Create a `Stream` to write `Table` data. + * Create a stream to continuously write data to the database, typically used in data import + * scenarios. After completion, the stream needs to be closed(Call StreamWriter#completed()), + * and the write result can be obtained from the database server. * - * @param maxPointsPerSecond The max number of points that can be written per second, - * exceeding which may cause blockage. + * @param maxPointsPerSecond the max number of points that can be written per second, + * exceeding which may cause blockage * @param ctx invoke context * @return a stream writer instance */