Skip to content

Commit

Permalink
docs: docs improve
Browse files Browse the repository at this point in the history
  • Loading branch information
fengjiachun committed Jan 9, 2024
1 parent 67cb71a commit e15293d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
14 changes: 8 additions & 6 deletions ingester-protocol/src/main/java/io/greptime/Write.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -53,9 +53,9 @@ default CompletableFuture<Result<WriteOk, Err>> write(Collection<Table> 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
Expand All @@ -77,10 +77,12 @@ default StreamWriter<Table, WriteOk> 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
*/
Expand Down

0 comments on commit e15293d

Please sign in to comment.