You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/02/26 13:40:52 UTC

[GitHub] [flink] leonardBang opened a new pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

leonardBang opened a new pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223
 
 
   parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
   
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
   
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Travis CI to do that following [this guide](https://flink.apache.org/contributing/contribute-code.html#open-a-pull-request).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
   
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   *This pull request fix 'maxRetryTimes' can not work properly in JDBCUpsertTableSink( only AppendOnlyWriter) .*
   
   
   ## Brief change log
   
     - *Cache data in AppendOnlyWriter for multiple call*
     - *Update executeBatch() in AppendOnlyWriter*
   
   
   ## Verifying this change
   
    Test exception will be thrown normally in JDBCUpsertTableSinkITCase.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): ( no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r385051133
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCUpsertTableSinkITCase.java
 ##########
 @@ -211,4 +213,31 @@ public void testAppend() throws Exception {
 				Row.of(20, 6, Timestamp.valueOf("1970-01-01 00:00:00.02"))
 		}, DB_URL, OUTPUT_TABLE2, new String[]{"id", "num", "ts"});
 	}
+
+	@Test(expected = JobExecutionException.class)
+	public void testTableNotExists() throws Exception {
 
 Review comment:
   What is this test for? I ran it on master, it passed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 64692a3605478258174ec0e1b88754843170a01e Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/150659264) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r384527500
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCUpsertTableSinkITCase.java
 ##########
 @@ -211,4 +213,31 @@ public void testAppend() throws Exception {
 				Row.of(20, 6, Timestamp.valueOf("1970-01-01 00:00:00.02"))
 		}, DB_URL, OUTPUT_TABLE2, new String[]{"id", "num", "ts"});
 	}
+
+	@Test(expected = JobExecutionException.class)
+	public void testTableNotExists() throws Exception {
 
 Review comment:
   why do you test "table not exists" for fixing "multiple flushing not work" issue ?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] leonardBang commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r386364383
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCAppenOnlyWriterTest.java
 ##########
 @@ -0,0 +1,103 @@
+/*
+ * 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.flink.api.java.io.jdbc;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.functions.RuntimeContext;
+import org.apache.flink.api.java.io.jdbc.writer.AppendOnlyWriter;
+import org.apache.flink.api.java.tuple.Tuple2;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.sql.BatchUpdateException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
+
+import static org.apache.flink.api.java.io.jdbc.JDBCOutputFormatTest.toRow;
+import static org.mockito.Mockito.doReturn;
+
+/**
+ * Test for the {@link AppendOnlyWriter}.
+ */
+public class JDBCAppenOnlyWriterTest extends JDBCTestBase {
+	private JDBCUpsertOutputFormat format;
+	private String[] fieldNames;
+	private String[] keyFields;
+
+	@Before
+	public void setup() {
+		fieldNames = new String[]{"id", "title", "author", "price", "qty"};
+		keyFields = null;
+	}
+
+	@Test(expected = BatchUpdateException.class)
+	public void testMaxRetry() throws Exception {
+		format = JDBCUpsertOutputFormat.builder()
+			.setOptions(JDBCOptions.builder()
+				.setDBUrl(DB_URL)
+				.setTableName(OUTPUT_TABLE)
+				.build())
+			.setFieldNames(fieldNames)
+			.setKeyFields(keyFields)
+			.build();
+		RuntimeContext context = Mockito.mock(RuntimeContext.class);
+		ExecutionConfig config = Mockito.mock(ExecutionConfig.class);
+		doReturn(config).when(context).getExecutionConfig();
+		doReturn(true).when(config).isObjectReuseEnabled();
+		format.setRuntimeContext(context);
+		format.open(0, 1);
+
+		// alter table schema to trigger retry logic after failure.
+		alterTable();
+		for (TestEntry entry : TEST_DATA) {
+			format.writeRecord(Tuple2.of(true, toRow(entry)));
+		}
+
+		// after retry default times, throws a BatchUpdateException.
+		format.flush();
+	}
+
+	private void alterTable() throws Exception {
+		Class.forName(DRIVER_CLASS);
+		try (Connection conn = DriverManager.getConnection(DB_URL);
+			Statement stat = conn.createStatement()) {
+			stat.execute("ALTER  TABLE " + OUTPUT_TABLE + " DROP COLUMN " + fieldNames[1]);
+			stat.close();
 
 Review comment:
   I see many this kind of style that call resource close() function in try(){} body in our code,  I just want to align, should I keep 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r385532707
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/writer/AppendOnlyWriter.java
 ##########
 @@ -38,6 +40,7 @@
 	private final String insertSQL;
 	private final int[] fieldTypes;
 
+	private transient List<Row> cachedRows;
 	private transient PreparedStatement statement;
 
 Review comment:
   I mean you can add a unit test for `AppendOnlyWriter`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151022291",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2cb96534f083b219b8652650425b2a6f8fbc1baa Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/150772198) 
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   * be5bed759e39f445d24dad3f2a0109ddddd7ce43 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/151022291) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2cb96534f083b219b8652650425b2a6f8fbc1baa Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/150772198) 
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-593718044
 
 
   I'll update title to `[FLINK-16281][jdbc] Parameter 'maxRetryTimes' can not work in AppendOnlyWriter`. FYI

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 64692a3605478258174ec0e1b88754843170a01e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r385045512
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/writer/AppendOnlyWriter.java
 ##########
 @@ -47,19 +50,28 @@ public AppendOnlyWriter(String insertSQL, int[] fieldTypes) {
 
 	@Override
 	public void open(Connection connection) throws SQLException {
+		this.cachedRows = new ArrayList<>();
 		this.statement = connection.prepareStatement(insertSQL);
 	}
 
 	@Override
-	public void addRecord(Tuple2<Boolean, Row> record) throws SQLException {
+	public void addRecord(Tuple2<Boolean, Row> record) {
 		checkArgument(record.f0, "Append mode can not receive retract/delete message.");
-		setRecordToStatement(statement, fieldTypes, record.f1);
-		statement.addBatch();
+		//deep copy, add record to buffer
+		Row row = Row.copy(record.f1);
 
 Review comment:
   See `UpsertWriter.addRecord`.
   `Tuple2<Boolean, Row> tuple2 = objectReuse ? new Tuple2<>(record.f0, Row.copy(record.f1)) : record;`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] leonardBang commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r385157186
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/writer/AppendOnlyWriter.java
 ##########
 @@ -47,19 +50,28 @@ public AppendOnlyWriter(String insertSQL, int[] fieldTypes) {
 
 	@Override
 	public void open(Connection connection) throws SQLException {
+		this.cachedRows = new ArrayList<>();
 		this.statement = connection.prepareStatement(insertSQL);
 	}
 
 	@Override
-	public void addRecord(Tuple2<Boolean, Row> record) throws SQLException {
+	public void addRecord(Tuple2<Boolean, Row> record) {
 		checkArgument(record.f0, "Append mode can not receive retract/delete message.");
-		setRecordToStatement(statement, fieldTypes, record.f1);
-		statement.addBatch();
+		//deep copy, add record to buffer
+		Row row = Row.copy(record.f1);
 
 Review comment:
   nice tips

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r385045864
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/writer/AppendOnlyWriter.java
 ##########
 @@ -47,19 +50,28 @@ public AppendOnlyWriter(String insertSQL, int[] fieldTypes) {
 
 	@Override
 	public void open(Connection connection) throws SQLException {
+		this.cachedRows = new ArrayList<>();
 		this.statement = connection.prepareStatement(insertSQL);
 	}
 
 	@Override
-	public void addRecord(Tuple2<Boolean, Row> record) throws SQLException {
+	public void addRecord(Tuple2<Boolean, Row> record) {
 		checkArgument(record.f0, "Append mode can not receive retract/delete message.");
-		setRecordToStatement(statement, fieldTypes, record.f1);
-		statement.addBatch();
+		//deep copy, add record to buffer
+		Row row = Row.copy(record.f1);
 
 Review comment:
   Both two writers need cache records. This copy could be extract to `JDBCUpsertOutputFormat`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] leonardBang commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r384900067
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCUpsertTableSinkITCase.java
 ##########
 @@ -211,4 +213,31 @@ public void testAppend() throws Exception {
 				Row.of(20, 6, Timestamp.valueOf("1970-01-01 00:00:00.02"))
 		}, DB_URL, OUTPUT_TABLE2, new String[]{"id", "num", "ts"});
 	}
+
+	@Test(expected = JobExecutionException.class)
+	public void testTableNotExists() throws Exception {
 
 Review comment:
   Hi,@libenchao 
   As this issue describe,this test will hang rather than throw an Exception when the `parameter connector.write.max-retries > 1`, so I add this case to check that exception will throw properly after retry 3 times. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r386317273
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCAppenOnlyWriterTest.java
 ##########
 @@ -0,0 +1,103 @@
+/*
+ * 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.flink.api.java.io.jdbc;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.functions.RuntimeContext;
+import org.apache.flink.api.java.io.jdbc.writer.AppendOnlyWriter;
+import org.apache.flink.api.java.tuple.Tuple2;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.sql.BatchUpdateException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
+
+import static org.apache.flink.api.java.io.jdbc.JDBCOutputFormatTest.toRow;
+import static org.mockito.Mockito.doReturn;
+
+/**
+ * Test for the {@link AppendOnlyWriter}.
+ */
+public class JDBCAppenOnlyWriterTest extends JDBCTestBase {
+	private JDBCUpsertOutputFormat format;
 
 Review comment:
   Add a empty line above.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
libenchao commented on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591775312
 
 
   LGTM, +1 for merging.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 64692a3605478258174ec0e1b88754843170a01e Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/150659264) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638) 
   * 2cb96534f083b219b8652650425b2a6f8fbc1baa UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 64692a3605478258174ec0e1b88754843170a01e Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/150659264) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r384526812
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCUpsertTableSinkITCase.java
 ##########
 @@ -52,6 +53,7 @@
 	public static final String DB_URL = "jdbc:derby:memory:upsert";
 	public static final String OUTPUT_TABLE1 = "upsertSink";
 	public static final String OUTPUT_TABLE2 = "appendSink";
+	public static final String NOT_EXISTS_TABLE = "notExistsTable";
 
 Review comment:
   `notExistedTable` ?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591432209
 
 
   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 64692a3605478258174ec0e1b88754843170a01e (Wed Feb 26 13:43:12 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151022291",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151351778",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   * be5bed759e39f445d24dad3f2a0109ddddd7ce43 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151022291) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737) 
   * 1f118045b3f009e3a10a8f06b8e35ec95562fbef Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/151351778) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] leonardBang commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r385159325
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/writer/AppendOnlyWriter.java
 ##########
 @@ -38,6 +40,7 @@
 	private final String insertSQL;
 	private final int[] fieldTypes;
 
+	private transient List<Row> cachedRows;
 	private transient PreparedStatement statement;
 
 Review comment:
   Could you give more tips? add some unit  tests for  checking/validating what.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r386318083
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCUpsertTableSinkITCase.java
 ##########
 @@ -52,6 +52,7 @@
 	public static final String DB_URL = "jdbc:derby:memory:upsert";
 	public static final String OUTPUT_TABLE1 = "upsertSink";
 	public static final String OUTPUT_TABLE2 = "appendSink";
+	public static final String NOT_EXISTS_TABLE = "notExistedTable";
 
 Review comment:
   Please remove 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] leonardBang commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r385180092
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCUpsertTableSinkITCase.java
 ##########
 @@ -211,4 +213,31 @@ public void testAppend() throws Exception {
 				Row.of(20, 6, Timestamp.valueOf("1970-01-01 00:00:00.02"))
 		}, DB_URL, OUTPUT_TABLE2, new String[]{"id", "num", "ts"});
 	}
+
+	@Test(expected = JobExecutionException.class)
+	public void testTableNotExists() throws Exception {
 
 Review comment:
   As this issue describe,this test will hang rather than throw an Exception when the parameter connector.write.max-retries > 1, so I add this case to check that exception will throw properly after retry 3 times.  
   
   I found this test passed in master,because this  'table not exists Exception' was thrown in open() function not in flush().  
   `@Override
   	public void open(Connection connection) throws SQLException {
   		this.cachedRows = new ArrayList<>();
   		this.statement = connection.prepareStatement(insertSQL);
   	}
   `
   when I used 'com.mysql.jdbc.Driver' it will be thrown in in flush() rather than open() function, the difference should be that we use 'org.apache.derby.jdbc.EmbeddedDriver' in ITcase.
   
   So, I will drop this function and try other tests to cover this issue update.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151022291",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151351778",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5819",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     }, {
       "hash" : "16f8eb6f78a933588c092306dc726aa640c2faa2",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151397269",
       "triggerID" : "16f8eb6f78a933588c092306dc726aa640c2faa2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   * 1f118045b3f009e3a10a8f06b8e35ec95562fbef Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/151351778) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5819) 
   * 16f8eb6f78a933588c092306dc726aa640c2faa2 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/151397269) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 64692a3605478258174ec0e1b88754843170a01e Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/150659264) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638) 
   * 2cb96534f083b219b8652650425b2a6f8fbc1baa Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/150772198) 
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r384908566
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCUpsertTableSinkITCase.java
 ##########
 @@ -211,4 +213,31 @@ public void testAppend() throws Exception {
 				Row.of(20, 6, Timestamp.valueOf("1970-01-01 00:00:00.02"))
 		}, DB_URL, OUTPUT_TABLE2, new String[]{"id", "num", "ts"});
 	}
+
+	@Test(expected = JobExecutionException.class)
+	public void testTableNotExists() throws Exception {
 
 Review comment:
   get 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151022291",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151351778",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5819",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   * 1f118045b3f009e3a10a8f06b8e35ec95562fbef Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/151351778) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5819) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151022291",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   * be5bed759e39f445d24dad3f2a0109ddddd7ce43 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151022291) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r386317919
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCAppenOnlyWriterTest.java
 ##########
 @@ -0,0 +1,103 @@
+/*
+ * 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.flink.api.java.io.jdbc;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.functions.RuntimeContext;
+import org.apache.flink.api.java.io.jdbc.writer.AppendOnlyWriter;
+import org.apache.flink.api.java.tuple.Tuple2;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.sql.BatchUpdateException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
+
+import static org.apache.flink.api.java.io.jdbc.JDBCOutputFormatTest.toRow;
+import static org.mockito.Mockito.doReturn;
+
+/**
+ * Test for the {@link AppendOnlyWriter}.
+ */
+public class JDBCAppenOnlyWriterTest extends JDBCTestBase {
+	private JDBCUpsertOutputFormat format;
+	private String[] fieldNames;
+	private String[] keyFields;
+
+	@Before
+	public void setup() {
+		fieldNames = new String[]{"id", "title", "author", "price", "qty"};
+		keyFields = null;
+	}
+
+	@Test(expected = BatchUpdateException.class)
+	public void testMaxRetry() throws Exception {
+		format = JDBCUpsertOutputFormat.builder()
+			.setOptions(JDBCOptions.builder()
+				.setDBUrl(DB_URL)
+				.setTableName(OUTPUT_TABLE)
+				.build())
+			.setFieldNames(fieldNames)
+			.setKeyFields(keyFields)
+			.build();
+		RuntimeContext context = Mockito.mock(RuntimeContext.class);
+		ExecutionConfig config = Mockito.mock(ExecutionConfig.class);
+		doReturn(config).when(context).getExecutionConfig();
+		doReturn(true).when(config).isObjectReuseEnabled();
+		format.setRuntimeContext(context);
+		format.open(0, 1);
+
+		// alter table schema to trigger retry logic after failure.
+		alterTable();
+		for (TestEntry entry : TEST_DATA) {
+			format.writeRecord(Tuple2.of(true, toRow(entry)));
+		}
+
+		// after retry default times, throws a BatchUpdateException.
+		format.flush();
+	}
+
+	private void alterTable() throws Exception {
+		Class.forName(DRIVER_CLASS);
+		try (Connection conn = DriverManager.getConnection(DB_URL);
+			Statement stat = conn.createStatement()) {
+			stat.execute("ALTER  TABLE " + OUTPUT_TABLE + " DROP COLUMN " + fieldNames[1]);
+			stat.close();
 
 Review comment:
   Remove close, already have try.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r386317045
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCAppenOnlyWriterTest.java
 ##########
 @@ -0,0 +1,103 @@
+/*
+ * 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.flink.api.java.io.jdbc;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.functions.RuntimeContext;
+import org.apache.flink.api.java.io.jdbc.writer.AppendOnlyWriter;
+import org.apache.flink.api.java.tuple.Tuple2;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.sql.BatchUpdateException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
+
+import static org.apache.flink.api.java.io.jdbc.JDBCOutputFormatTest.toRow;
+import static org.mockito.Mockito.doReturn;
+
+/**
+ * Test for the {@link AppendOnlyWriter}.
+ */
+public class JDBCAppenOnlyWriterTest extends JDBCTestBase {
+	private JDBCUpsertOutputFormat format;
+	private String[] fieldNames;
+	private String[] keyFields;
 
 Review comment:
   Don't need member. Just pass null.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151022291",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   * be5bed759e39f445d24dad3f2a0109ddddd7ce43 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/151022291) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151022291",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151351778",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5819",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   * 1f118045b3f009e3a10a8f06b8e35ec95562fbef Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/151351778) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5819) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r386317947
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCAppenOnlyWriterTest.java
 ##########
 @@ -0,0 +1,103 @@
+/*
+ * 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.flink.api.java.io.jdbc;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.functions.RuntimeContext;
+import org.apache.flink.api.java.io.jdbc.writer.AppendOnlyWriter;
+import org.apache.flink.api.java.tuple.Tuple2;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.sql.BatchUpdateException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
+
+import static org.apache.flink.api.java.io.jdbc.JDBCOutputFormatTest.toRow;
+import static org.mockito.Mockito.doReturn;
+
+/**
+ * Test for the {@link AppendOnlyWriter}.
+ */
+public class JDBCAppenOnlyWriterTest extends JDBCTestBase {
+	private JDBCUpsertOutputFormat format;
+	private String[] fieldNames;
+	private String[] keyFields;
+
+	@Before
+	public void setup() {
+		fieldNames = new String[]{"id", "title", "author", "price", "qty"};
+		keyFields = null;
+	}
+
+	@Test(expected = BatchUpdateException.class)
+	public void testMaxRetry() throws Exception {
+		format = JDBCUpsertOutputFormat.builder()
+			.setOptions(JDBCOptions.builder()
+				.setDBUrl(DB_URL)
+				.setTableName(OUTPUT_TABLE)
+				.build())
+			.setFieldNames(fieldNames)
+			.setKeyFields(keyFields)
+			.build();
+		RuntimeContext context = Mockito.mock(RuntimeContext.class);
+		ExecutionConfig config = Mockito.mock(ExecutionConfig.class);
+		doReturn(config).when(context).getExecutionConfig();
+		doReturn(true).when(config).isObjectReuseEnabled();
+		format.setRuntimeContext(context);
+		format.open(0, 1);
+
+		// alter table schema to trigger retry logic after failure.
+		alterTable();
+		for (TestEntry entry : TEST_DATA) {
+			format.writeRecord(Tuple2.of(true, toRow(entry)));
+		}
+
+		// after retry default times, throws a BatchUpdateException.
+		format.flush();
+	}
+
+	private void alterTable() throws Exception {
+		Class.forName(DRIVER_CLASS);
+		try (Connection conn = DriverManager.getConnection(DB_URL);
+			Statement stat = conn.createStatement()) {
+			stat.execute("ALTER  TABLE " + OUTPUT_TABLE + " DROP COLUMN " + fieldNames[1]);
+			stat.close();
+			conn.close();
+		}
+	}
+
+	@After
+	public void clear() throws Exception {
+		Class.forName(DRIVER_CLASS);
+		try (
+			Connection conn = DriverManager.getConnection(DB_URL);
+			Statement stat = conn.createStatement()) {
+			stat.execute("DELETE FROM " + OUTPUT_TABLE);
+
+			stat.close();
 
 Review comment:
   Remove close, already have try.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151022291",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151351778",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5819",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     }, {
       "hash" : "16f8eb6f78a933588c092306dc726aa640c2faa2",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151397269",
       "triggerID" : "16f8eb6f78a933588c092306dc726aa640c2faa2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "16f8eb6f78a933588c092306dc726aa640c2faa2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5833",
       "triggerID" : "16f8eb6f78a933588c092306dc726aa640c2faa2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   * 16f8eb6f78a933588c092306dc726aa640c2faa2 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151397269) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5833) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151022291",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151351778",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5819",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     }, {
       "hash" : "16f8eb6f78a933588c092306dc726aa640c2faa2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "16f8eb6f78a933588c092306dc726aa640c2faa2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   * 1f118045b3f009e3a10a8f06b8e35ec95562fbef Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/151351778) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5819) 
   * 16f8eb6f78a933588c092306dc726aa640c2faa2 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2cb96534f083b219b8652650425b2a6f8fbc1baa Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/150772198) 
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r386317145
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCAppenOnlyWriterTest.java
 ##########
 @@ -0,0 +1,103 @@
+/*
+ * 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.flink.api.java.io.jdbc;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.functions.RuntimeContext;
+import org.apache.flink.api.java.io.jdbc.writer.AppendOnlyWriter;
+import org.apache.flink.api.java.tuple.Tuple2;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.sql.BatchUpdateException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
+
+import static org.apache.flink.api.java.io.jdbc.JDBCOutputFormatTest.toRow;
+import static org.mockito.Mockito.doReturn;
+
+/**
+ * Test for the {@link AppendOnlyWriter}.
+ */
+public class JDBCAppenOnlyWriterTest extends JDBCTestBase {
+	private JDBCUpsertOutputFormat format;
 
 Review comment:
   close this 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151022291",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   * be5bed759e39f445d24dad3f2a0109ddddd7ce43 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151022291) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737) 
   * 1f118045b3f009e3a10a8f06b8e35ec95562fbef UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi merged pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi merged pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2cb96534f083b219b8652650425b2a6f8fbc1baa Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/150772198) 
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   * be5bed759e39f445d24dad3f2a0109ddddd7ce43 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r384521139
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/writer/AppendOnlyWriter.java
 ##########
 @@ -38,6 +40,7 @@
 	private final String insertSQL;
 	private final int[] fieldTypes;
 
+	private transient List<Tuple2<Boolean, Row>> rows;
 
 Review comment:
   `List<Row>` is sufficient here, we don't need to save a `Tuple`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r385050749
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/writer/AppendOnlyWriter.java
 ##########
 @@ -38,6 +40,7 @@
 	private final String insertSQL;
 	private final int[] fieldTypes;
 
+	private transient List<Row> cachedRows;
 	private transient PreparedStatement statement;
 
 Review comment:
   Can you mock a `PreparedStatement` and add some unit tests?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#discussion_r384521719
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/writer/AppendOnlyWriter.java
 ##########
 @@ -38,6 +40,7 @@
 	private final String insertSQL;
 	private final int[] fieldTypes;
 
+	private transient List<Tuple2<Boolean, Row>> rows;
 
 Review comment:
   And for the name, maybe `cachedRows` or `batchedRows` be better?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 64692a3605478258174ec0e1b88754843170a01e Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/150659264) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11223: [FLINK-16281][Table SQL / Ecosystem] parameter 'maxRetryTimes' can not work in JDBCUpsertTableSink.
URL: https://github.com/apache/flink/pull/11223#issuecomment-591439360
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150659264",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "64692a3605478258174ec0e1b88754843170a01e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5638",
       "triggerID" : "64692a3605478258174ec0e1b88754843170a01e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150772198",
       "triggerID" : "2cb96534f083b219b8652650425b2a6f8fbc1baa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25",
       "triggerType" : "PUSH"
     }, {
       "hash" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "70e3c71eaafa144ebc5a2fe8e19c9f205a48a277",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151022291",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5737",
       "triggerID" : "be5bed759e39f445d24dad3f2a0109ddddd7ce43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151351778",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5819",
       "triggerID" : "1f118045b3f009e3a10a8f06b8e35ec95562fbef",
       "triggerType" : "PUSH"
     }, {
       "hash" : "16f8eb6f78a933588c092306dc726aa640c2faa2",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151397269",
       "triggerID" : "16f8eb6f78a933588c092306dc726aa640c2faa2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "16f8eb6f78a933588c092306dc726aa640c2faa2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5833",
       "triggerID" : "16f8eb6f78a933588c092306dc726aa640c2faa2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 46b60757e8d5c7b38f6c2fa04cf1b01dd4712a25 UNKNOWN
   * 70e3c71eaafa144ebc5a2fe8e19c9f205a48a277 UNKNOWN
   * 16f8eb6f78a933588c092306dc726aa640c2faa2 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/151397269) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5833) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services