hililiwei commented on a change in pull request #3998:
URL: https://github.com/apache/iceberg/pull/3998#discussion_r815384578
##########
File path:
flink/v1.14/flink/src/test/java/org/apache/iceberg/flink/sink/TestFlinkIcebergSink.java
##########
@@ -326,4 +327,48 @@ public void testTwoSinksInDisjointedDAG() throws Exception
{
Assert.assertEquals("rightTable",
rightTable.currentSnapshot().summary().get("direction"));
}
+ @Test
+ public void testOverrideWriteConfiguration() {
Review comment:
good.
##########
File path:
flink/v1.14/flink/src/test/java/org/apache/iceberg/flink/sink/TestFlinkIcebergSink.java
##########
@@ -326,4 +327,48 @@ public void testTwoSinksInDisjointedDAG() throws Exception
{
Assert.assertEquals("rightTable",
rightTable.currentSnapshot().summary().get("direction"));
}
+ @Test
+ public void testOverrideWriteConfiguration() {
+ AssertHelpers.assertThrows("Override write configuration.",
+ RuntimeException.class, "No enum constant
org.apache.iceberg.DistributionMode.UNRECOGNIZED",
+ () -> {
+ Map<String, String> newProps = Maps.newHashMap();
+ newProps.put(TableProperties.WRITE_DISTRIBUTION_MODE,
"UNRECOGNIZED");
+
+ List<Row> rows = createRows("");
+ DataStream<Row> dataStream =
env.addSource(createBoundedSource(rows), ROW_TYPE_INFO);
+
+ FlinkSink.forRow(dataStream, SimpleDataUtil.FLINK_SCHEMA)
+ .table(table)
+ .tableLoader(tableLoader)
+ .writeParallelism(parallelism)
+ .properties(newProps)
+ .append();
+
+ // Execute the program.
+ env.execute("Test Iceberg DataStream.");
+ return null;
+ });
+
+ AssertHelpers.assertThrows("Override write configuration.",
Review comment:
done
##########
File path:
flink/v1.14/flink/src/main/java/org/apache/iceberg/flink/sink/FlinkSink.java
##########
@@ -322,6 +322,19 @@ public Builder setSnapshotProperty(String property, String
value) {
*/
@Deprecated
public DataStreamSink<RowData> build() {
Review comment:
done
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]