This is an automated email from the ASF dual-hosted git repository.
eskabetxe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bahir-flink.git
The following commit(s) were added to refs/heads/master by this push:
new bfc09d3 [BAHIR-263] Update flink to 1.12.2 (#115)
bfc09d3 is described below
commit bfc09d38b4f1dfd0686732584175d7322dc34f11
Author: Joao Boto <[email protected]>
AuthorDate: Fri Mar 12 08:53:06 2021 +0100
[BAHIR-263] Update flink to 1.12.2 (#115)
---
.travis.yml | 4 ++--
.../activemq/ActiveMQConnectorITCase.java | 2 --
.../connectors/kudu/table/KuduCatalogTest.java | 16 ++++++-------
.../kudu/table/KuduTableFactoryTest.java | 12 +++++-----
.../connectors/kudu/table/KuduTableSourceTest.java | 2 +-
.../src/test/resources/log4j.properties | 27 ++++++++++++++++++++++
pom.xml | 2 +-
7 files changed, 45 insertions(+), 20 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index f0c3c34..b6793dc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,8 +34,8 @@ jdk:
- openjdk8
env:
- - FLINK_VERSION="1.11.3" SCALA_VERSION="2.11"
- - FLINK_VERSION="1.11.3" SCALA_VERSION="2.12"
+ - FLINK_VERSION="1.12.2" SCALA_VERSION="2.11"
+ - FLINK_VERSION="1.12.2" SCALA_VERSION="2.12"
before_install:
- ./dev/change-scala-version.sh $SCALA_VERSION
diff --git
a/flink-connector-activemq/src/test/java/org/apache/flink/streaming/connectors/activemq/ActiveMQConnectorITCase.java
b/flink-connector-activemq/src/test/java/org/apache/flink/streaming/connectors/activemq/ActiveMQConnectorITCase.java
index 6e3a247..c784d9a 100644
---
a/flink-connector-activemq/src/test/java/org/apache/flink/streaming/connectors/activemq/ActiveMQConnectorITCase.java
+++
b/flink-connector-activemq/src/test/java/org/apache/flink/streaming/connectors/activemq/ActiveMQConnectorITCase.java
@@ -60,7 +60,6 @@ public class ActiveMQConnectorITCase {
flinkConfig.setInteger(ConfigConstants.LOCAL_NUMBER_TASK_MANAGER, 1);
flinkConfig.setInteger(TaskManagerOptions.NUM_TASK_SLOTS.key(), 8);
flinkConfig.setInteger(TaskManagerOptions.MANAGED_MEMORY_SIZE.key(),
16);
-
flinkConfig.setString(ConfigConstants.RESTART_STRATEGY_FIXED_DELAY_DELAY, "0
s");
}
@@ -111,7 +110,6 @@ public class ActiveMQConnectorITCase {
private StreamExecutionEnvironment createExecutionEnvironment() {
StreamExecutionEnvironment env =
StreamExecutionEnvironment.createLocalEnvironmentWithWebUI(flinkConfig);
env.setRestartStrategy(RestartStrategies.noRestart());
- env.getConfig().disableSysoutLogging();
return env;
}
diff --git
a/flink-connector-kudu/src/test/java/org/apache/flink/connectors/kudu/table/KuduCatalogTest.java
b/flink-connector-kudu/src/test/java/org/apache/flink/connectors/kudu/table/KuduCatalogTest.java
index 4bb1871..2bc8b12 100644
---
a/flink-connector-kudu/src/test/java/org/apache/flink/connectors/kudu/table/KuduCatalogTest.java
+++
b/flink-connector-kudu/src/test/java/org/apache/flink/connectors/kudu/table/KuduCatalogTest.java
@@ -77,7 +77,7 @@ public class KuduCatalogTest extends KuduTestBase {
tableEnv.executeSql("INSERT INTO TestTable1 VALUES ('f', 's')")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
// Add this once Primary key support has been enabled
@@ -101,7 +101,7 @@ public class KuduCatalogTest extends KuduTestBase {
tableEnv.executeSql("INSERT INTO TestTable3 VALUES ('f', 2, 't')")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
validateMultiKey("TestTable3");
@@ -113,14 +113,14 @@ public class KuduCatalogTest extends KuduTestBase {
tableEnv.executeSql("INSERT INTO TestTable5 VALUES ('s', 'f', 't')")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
tableEnv.executeSql("CREATE TABLE TestTable6 (`first` STRING, `second`
String) WITH ('kudu.hash-columns' = 'first', 'kudu.primary-key-columns' =
'first')");
tableEnv.executeSql("INSERT INTO TestTable6 (SELECT `first`, `second`
FROM TestTable5)")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
validateSingleKey("TestTable6");
@@ -133,12 +133,12 @@ public class KuduCatalogTest extends KuduTestBase {
tableEnv.executeSql("INSERT INTO TestTableEP VALUES ('f','s')")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
tableEnv.executeSql("INSERT INTO TestTableEP VALUES ('f2','s2')")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
Table result = tableEnv.sqlQuery("SELECT COUNT(*) FROM TestTableEP");
@@ -225,7 +225,7 @@ public class KuduCatalogTest extends KuduTestBase {
tableEnv.executeSql("INSERT INTO TestTableTsC values ('f', TIMESTAMP
'2020-01-01 12:12:12.123456')")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
KuduTable kuduTable = harness.getClient().openTable("TestTableTsC");
@@ -252,7 +252,7 @@ public class KuduCatalogTest extends KuduTestBase {
"TIMESTAMP '2020-04-15 12:34:56.123') ")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
validateManyTypes("TestTable8");
diff --git
a/flink-connector-kudu/src/test/java/org/apache/flink/connectors/kudu/table/KuduTableFactoryTest.java
b/flink-connector-kudu/src/test/java/org/apache/flink/connectors/kudu/table/KuduTableFactoryTest.java
index d852f8e..d4de7f6 100644
---
a/flink-connector-kudu/src/test/java/org/apache/flink/connectors/kudu/table/KuduTableFactoryTest.java
+++
b/flink-connector-kudu/src/test/java/org/apache/flink/connectors/kudu/table/KuduTableFactoryTest.java
@@ -64,7 +64,7 @@ public class KuduTableFactoryTest extends KuduTestBase {
"WITH ('connector.type'='kudu', 'kudu.table'='TestTable11',
'kudu.masters'='" + kuduMasters + "')");
JobClient jobClient = tableEnv.executeSql("INSERT INTO TestTable11
values ('f', 1)").getJobClient().get();
try {
- jobClient.getJobExecutionResult(getClass().getClassLoader()).get();
+ jobClient.getJobExecutionResult().get();
fail();
} catch (ExecutionException ee) {
assertTrue(ee.getCause() instanceof JobExecutionException);
@@ -80,7 +80,7 @@ public class KuduTableFactoryTest extends KuduTestBase {
tableEnv.executeSql("INSERT INTO TestTable11 values ('f', 's')")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
validateSingleKey("TestTable11");
@@ -96,13 +96,13 @@ public class KuduTableFactoryTest extends KuduTestBase {
tableEnv.executeSql("INSERT INTO TestTableTs values ('f', TIMESTAMP
'2020-01-01 12:12:12.123456')")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
tableEnv.executeSql("INSERT INTO TestTableTs values ('s', TIMESTAMP
'2020-02-02 23:23:23')")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
KuduTable kuduTable = harness.getClient().openTable("TestTableTs");
@@ -129,7 +129,7 @@ public class KuduTableFactoryTest extends KuduTestBase {
tableEnv.executeSql("INSERT INTO TestTable12 values ('f', 's')")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
// Then another one in SQL that refers to the previously created one
@@ -138,7 +138,7 @@ public class KuduTableFactoryTest extends KuduTestBase {
tableEnv.executeSql("INSERT INTO TestTable12b values ('f2','s2')")
.getJobClient()
.get()
- .getJobExecutionResult(getClass().getClassLoader())
+ .getJobExecutionResult()
.get(1, TimeUnit.MINUTES);
// Validate that both insertions were into the same table
diff --git
a/flink-connector-kudu/src/test/java/org/apache/flink/connectors/kudu/table/KuduTableSourceTest.java
b/flink-connector-kudu/src/test/java/org/apache/flink/connectors/kudu/table/KuduTableSourceTest.java
index 2dfb71b..e02a297 100644
---
a/flink-connector-kudu/src/test/java/org/apache/flink/connectors/kudu/table/KuduTableSourceTest.java
+++
b/flink-connector-kudu/src/test/java/org/apache/flink/connectors/kudu/table/KuduTableSourceTest.java
@@ -95,7 +95,7 @@ public class KuduTableSourceTest extends KuduTestBase {
void testGetProducedDataType() throws Exception {
DataType producedDataType = kuduTableSource.getProducedDataType();
assertNotNull(producedDataType);
- assertEquals(getReturnDataType(getFieldNames(), getFieldDataTypes()),
producedDataType);
+ assertEquals(getReturnDataType(getFieldNames(),
getFieldDataTypes()).notNull(), producedDataType);
}
@Test
diff --git a/flink-connector-kudu/src/test/resources/log4j.properties
b/flink-connector-kudu/src/test/resources/log4j.properties
new file mode 100644
index 0000000..15efe08
--- /dev/null
+++ b/flink-connector-kudu/src/test/resources/log4j.properties
@@ -0,0 +1,27 @@
+################################################################################
+# 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.
+################################################################################
+
+# This file ensures that tests executed from the IDE show log output
+
+log4j.rootLogger=WARN, console
+
+# Log all infos in the given file
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.target=System.err
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x
- %m%n
diff --git a/pom.xml b/pom.xml
index d45cd2b..7e83d85 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,7 +96,7 @@
<log4j2.version>2.13.3</log4j2.version>
<!-- Flink version -->
- <flink.version>1.11.3</flink.version>
+ <flink.version>1.12.2</flink.version>
<junit.jupiter.version>5.4.1</junit.jupiter.version>