-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b269cb9
commit 123b972
Showing
3 changed files
with
168 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/net/snowflake/ingest/streaming/internal/IngestionStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2023 Snowflake Computing Inc. All rights reserved. | ||
*/ | ||
|
||
package net.snowflake.ingest.streaming.internal; | ||
|
||
import java.util.Map; | ||
import net.snowflake.ingest.streaming.InsertValidationResponse; | ||
|
||
/** | ||
* Interface to a batch of rows into the row buffer based on different on error options | ||
*/ | ||
public interface IngestionStrategy<T> { | ||
/** | ||
* Insert a batch of rows into the row buffer | ||
* | ||
* @param rows input row | ||
* @param offsetToken offset token of the latest row in the batch | ||
* @return insert response that possibly contains errors because of insertion failures | ||
*/ | ||
InsertValidationResponse insertRows(AbstractRowBuffer<T> rowBuffer, Iterable<Map<String, Object>> rows, String offsetToken); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters