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/06/18 04:47:05 UTC
[GitHub] [flink] leonardBang opened a new pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
leonardBang opened a new pull request #12701:
URL: https://github.com/apache/flink/pull/12701
## What is the purpose of the change
* Flink doesn't contains a hbase shade jar right now, so users have to add hbase dependency manually. This pull request import a new flink-sql-connector-hbase module likes flink-sql-connector-elasticsearch7 to offer bundled jar.
* **Specially, this PR is inspired by #12369, #9898**
* This PR is ready for release-1.11 branch
## Brief change log
- Add new modular flink-sql-connector-hbase.
- Add new modular flink-end-to-end-test-hbase.
## Verifying this change
* End2end test `SQLClientHbaseITCase` covered
The new module flink-sql-connector-hbase only includes necessary dependencies that used to reading or writing data from/to hbase. And the module flink-end-to-end-test-hbase, just as name implies, is used for hbase e2e test.
(1) We do not shade hadoop dependencies into the jar. Because flink-sql-connector-hive doesn't contains either, so we do this in similar way.
(2) We shade all dependencies that hbase needed but except org.apache.hadoop.hbase.codec.* for preventing hbase region server throw timeout exception . Because the hbase region server can not find the shaded codec class to decoding data(byte[]).
(3) We add a new module, flink-end-to-end-test-hbase, only for e2e test.
## 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
[GitHub] [flink] leonardBang commented on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
leonardBang commented on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645856628
@zentol Thanks for you review, will address your comments soon.
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot edited a comment on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645774818
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748",
"triggerID" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 66412988a588056dd7e2e42508604a1b7806a7f4 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748)
<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
[GitHub] [flink] leonardBang commented on a change in pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #12701:
URL: https://github.com/apache/flink/pull/12701#discussion_r442055147
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-hbase/src/test/java/org/apache/flink/tests/util/hbase/SQLClientHBaseITCase.java
##########
@@ -0,0 +1,193 @@
+/*
+ * 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.tests.util.hbase;
+
+import org.apache.flink.api.common.time.Deadline;
+import org.apache.flink.tests.util.TestUtils;
+import org.apache.flink.tests.util.cache.DownloadCache;
+import org.apache.flink.tests.util.categories.PreCommit;
+import org.apache.flink.tests.util.categories.TravisGroup1;
+import org.apache.flink.tests.util.flink.ClusterController;
+import org.apache.flink.tests.util.flink.FlinkResource;
+import org.apache.flink.tests.util.flink.FlinkResourceSetup;
+import org.apache.flink.tests.util.flink.LocalStandaloneFlinkResourceFactory;
+import org.apache.flink.tests.util.flink.SQLJobSubmission;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.TestLogger;
+
+import org.hamcrest.CoreMatchers;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Duration;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.tests.util.flink.LocalStandaloneFlinkResourceFactory.loadProjectRootDirectory;
+import static org.hamcrest.Matchers.arrayContainingInAnyOrder;
+import static org.hamcrest.Matchers.containsString;
+import static org.junit.Assert.assertThat;
+
+/**
+ * End-to-end test for the HBase connectors.
+ */
+@Category(value = {TravisGroup1.class, PreCommit.class})
+public class SQLClientHBaseITCase extends TestLogger {
+
+ private static final Logger LOG = LoggerFactory.getLogger(SQLClientHBaseITCase.class);
+
+ private static final String HBASE_E2E_SQL = "hbase_e2e.sql";
+ private static final String YARN_CLASSPATH = "/flink-yarn-tests/target/yarn.classpath";
+
+ @Rule
+ public final HBaseResource hbase;
+
+ @Rule
+ public final FlinkResource flink = new LocalStandaloneFlinkResourceFactory()
+ .create(FlinkResourceSetup.builder().build());
+
+ @Rule
+ public final TemporaryFolder tmp = new TemporaryFolder();
+
+ @ClassRule
+ public static final DownloadCache DOWNLOAD_CACHE = DownloadCache.get();
+
+ private static final Path sqlToolBoxJar = TestUtils.getResourceJar(".*SqlToolbox.jar");
+ private static final Path sqlConnectorHBaseJar = TestUtils.getResourceJar(".*hbase.jar");
+ private List<Path> hadoopClasspathJars;
+
+ public SQLClientHBaseITCase() {
+ this.hbase = HBaseResource.get();
+ }
+
+ @Before
+ public void before() throws Exception {
+ DOWNLOAD_CACHE.before();
+ Path tmpPath = tmp.getRoot().toPath();
+ LOG.info("The current temporary path: {}", tmpPath);
+
+ // Prepare all hadoop jars under HADOOP_CLASSPATH, use yarn.classpath which contains all hadoop jars
+ Path currentModulePath = Paths.get("").toAbsolutePath();
+ Path flinkHomePath = loadProjectRootDirectory(currentModulePath);
+ String hadoopClasspath = Paths.get(flinkHomePath.toString(), YARN_CLASSPATH).toString();
Review comment:
I'm inspired by https://github.com/apache/flink/pull/12369#discussion_r439999545.
If we use the dependency-plugin, we need add many hadoop dependencies to the project for make a HADOOP_CLASSPATH, It's a little heavy from my side.
How about use flink shaded Hadoop jar for test ? @zentol
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot edited a comment on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645774818
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748",
"triggerID" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"triggerType" : "PUSH"
}, {
"hash" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3753",
"triggerID" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"triggerType" : "PUSH"
}, {
"hash" : "56928bef64674b5c2c40179087dd36e6cbe355ce",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3777",
"triggerID" : "56928bef64674b5c2c40179087dd36e6cbe355ce",
"triggerType" : "PUSH"
}, {
"hash" : "f91b46bbe0d8f099bcd211bdcc873d6d4887e1f1",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3781",
"triggerID" : "f91b46bbe0d8f099bcd211bdcc873d6d4887e1f1",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 56928bef64674b5c2c40179087dd36e6cbe355ce Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3777)
* f91b46bbe0d8f099bcd211bdcc873d6d4887e1f1 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3781)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645774818
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748",
"triggerID" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"triggerType" : "PUSH"
}, {
"hash" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3753",
"triggerID" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 66412988a588056dd7e2e42508604a1b7806a7f4 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748)
* 455dbd2dce231b59b951dc2aaec955b23de86e8c Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3753)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645774818
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748",
"triggerID" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"triggerType" : "PUSH"
}, {
"hash" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3753",
"triggerID" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 66412988a588056dd7e2e42508604a1b7806a7f4 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748)
* 455dbd2dce231b59b951dc2aaec955b23de86e8c Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3753)
<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
[GitHub] [flink] leonardBang closed pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
leonardBang closed pull request #12701:
URL: https://github.com/apache/flink/pull/12701
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot edited a comment on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645774818
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748",
"triggerID" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"triggerType" : "PUSH"
}, {
"hash" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3753",
"triggerID" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"triggerType" : "PUSH"
}, {
"hash" : "56928bef64674b5c2c40179087dd36e6cbe355ce",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "56928bef64674b5c2c40179087dd36e6cbe355ce",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 66412988a588056dd7e2e42508604a1b7806a7f4 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748)
* 455dbd2dce231b59b951dc2aaec955b23de86e8c Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3753)
* 56928bef64674b5c2c40179087dd36e6cbe355ce 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
[GitHub] [flink] leonardBang commented on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
leonardBang commented on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-647340011
Hello, @zentol , Could you kindly take a look the 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
[GitHub] [flink] leonardBang edited a comment on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
leonardBang edited a comment on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-646482119
azure pipeline passed, see :
https://dev.azure.com/xbjtdcq/653a52d3-f743-4023-8e3e-4843eafbc953/_apis/build/builds/99/logs/26
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot edited a comment on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645774818
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748",
"triggerID" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"triggerType" : "PUSH"
}, {
"hash" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3753",
"triggerID" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"triggerType" : "PUSH"
}, {
"hash" : "56928bef64674b5c2c40179087dd36e6cbe355ce",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3777",
"triggerID" : "56928bef64674b5c2c40179087dd36e6cbe355ce",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 56928bef64674b5c2c40179087dd36e6cbe355ce Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3777)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645774818
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748",
"triggerID" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"triggerType" : "PUSH"
}, {
"hash" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3753",
"triggerID" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"triggerType" : "PUSH"
}, {
"hash" : "56928bef64674b5c2c40179087dd36e6cbe355ce",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3777",
"triggerID" : "56928bef64674b5c2c40179087dd36e6cbe355ce",
"triggerType" : "PUSH"
}, {
"hash" : "f91b46bbe0d8f099bcd211bdcc873d6d4887e1f1",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "f91b46bbe0d8f099bcd211bdcc873d6d4887e1f1",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 56928bef64674b5c2c40179087dd36e6cbe355ce Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3777)
* f91b46bbe0d8f099bcd211bdcc873d6d4887e1f1 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
[GitHub] [flink] leonardBang commented on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
leonardBang commented on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-647481266
close this PR because this improvement will only support in master
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot edited a comment on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645774818
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748",
"triggerID" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"triggerType" : "PUSH"
}, {
"hash" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 66412988a588056dd7e2e42508604a1b7806a7f4 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748)
* 455dbd2dce231b59b951dc2aaec955b23de86e8c 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
[GitHub] [flink] leonardBang commented on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
leonardBang commented on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-646420096
Hi, @zentol , Could you help take a look it when you have time?
----------------------------------------------------------------
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
[GitHub] [flink] leonardBang commented on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
leonardBang commented on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-646482119
azure pipeline passed, failed test is not related to this PR
https://dev.azure.com/xbjtdcq/653a52d3-f743-4023-8e3e-4843eafbc953/_apis/build/builds/99/logs/26
----------------------------------------------------------------
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
[GitHub] [flink] leonardBang commented on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
leonardBang commented on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-646129439
@flinkbot run azure
----------------------------------------------------------------
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
[GitHub] [flink] leonardBang commented on a change in pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #12701:
URL: https://github.com/apache/flink/pull/12701#discussion_r442091888
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-hbase/src/test/java/org/apache/flink/tests/util/hbase/SQLClientHBaseITCase.java
##########
@@ -0,0 +1,193 @@
+/*
+ * 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.tests.util.hbase;
+
+import org.apache.flink.api.common.time.Deadline;
+import org.apache.flink.tests.util.TestUtils;
+import org.apache.flink.tests.util.cache.DownloadCache;
+import org.apache.flink.tests.util.categories.PreCommit;
+import org.apache.flink.tests.util.categories.TravisGroup1;
+import org.apache.flink.tests.util.flink.ClusterController;
+import org.apache.flink.tests.util.flink.FlinkResource;
+import org.apache.flink.tests.util.flink.FlinkResourceSetup;
+import org.apache.flink.tests.util.flink.LocalStandaloneFlinkResourceFactory;
+import org.apache.flink.tests.util.flink.SQLJobSubmission;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.TestLogger;
+
+import org.hamcrest.CoreMatchers;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Duration;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.tests.util.flink.LocalStandaloneFlinkResourceFactory.loadProjectRootDirectory;
+import static org.hamcrest.Matchers.arrayContainingInAnyOrder;
+import static org.hamcrest.Matchers.containsString;
+import static org.junit.Assert.assertThat;
+
+/**
+ * End-to-end test for the HBase connectors.
+ */
+@Category(value = {TravisGroup1.class, PreCommit.class})
+public class SQLClientHBaseITCase extends TestLogger {
+
+ private static final Logger LOG = LoggerFactory.getLogger(SQLClientHBaseITCase.class);
+
+ private static final String HBASE_E2E_SQL = "hbase_e2e.sql";
+ private static final String YARN_CLASSPATH = "/flink-yarn-tests/target/yarn.classpath";
+
+ @Rule
+ public final HBaseResource hbase;
+
+ @Rule
+ public final FlinkResource flink = new LocalStandaloneFlinkResourceFactory()
+ .create(FlinkResourceSetup.builder().build());
+
+ @Rule
+ public final TemporaryFolder tmp = new TemporaryFolder();
+
+ @ClassRule
+ public static final DownloadCache DOWNLOAD_CACHE = DownloadCache.get();
+
+ private static final Path sqlToolBoxJar = TestUtils.getResourceJar(".*SqlToolbox.jar");
+ private static final Path sqlConnectorHBaseJar = TestUtils.getResourceJar(".*hbase.jar");
+ private List<Path> hadoopClasspathJars;
+
+ public SQLClientHBaseITCase() {
+ this.hbase = HBaseResource.get();
+ }
+
+ @Before
+ public void before() throws Exception {
+ DOWNLOAD_CACHE.before();
+ Path tmpPath = tmp.getRoot().toPath();
+ LOG.info("The current temporary path: {}", tmpPath);
+
+ // Prepare all hadoop jars under HADOOP_CLASSPATH, use yarn.classpath which contains all hadoop jars
+ Path currentModulePath = Paths.get("").toAbsolutePath();
+ Path flinkHomePath = loadProjectRootDirectory(currentModulePath);
+ String hadoopClasspath = Paths.get(flinkHomePath.toString(), YARN_CLASSPATH).toString();
Review comment:
ignore my comments, use maven dependency-plugin works fine ^_^
----------------------------------------------------------------
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
[GitHub] [flink] zentol commented on a change in pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #12701:
URL: https://github.com/apache/flink/pull/12701#discussion_r442031268
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/TestUtils.java
##########
@@ -52,10 +54,11 @@
* @throws RuntimeException if none or multiple jars could be found
*/
public static Path getResourceJar(final String jarNameRegex) {
- String moduleDirProp = System.getProperty("moduleDir");
- Preconditions.checkNotNull(moduleDirProp, "The moduleDir property was not set, You can set it when running maven via -DmoduleDir=<path>");
+ // if the property is not set then we are most likely running in the IDE, where the working directory is the
+ // module of the test that is currently running, which is exactly what we want
+ Path moduleDirectory = MODULE_DIRECTORY.get(Paths.get("").toAbsolutePath());
Review comment:
When you're taking commits from the master branch and backport them to 1.11, then it is customary to retain the authorship.
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-hbase/src/test/java/org/apache/flink/tests/util/hbase/SQLClientHBaseITCase.java
##########
@@ -0,0 +1,193 @@
+/*
+ * 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.tests.util.hbase;
+
+import org.apache.flink.api.common.time.Deadline;
+import org.apache.flink.tests.util.TestUtils;
+import org.apache.flink.tests.util.cache.DownloadCache;
+import org.apache.flink.tests.util.categories.PreCommit;
+import org.apache.flink.tests.util.categories.TravisGroup1;
+import org.apache.flink.tests.util.flink.ClusterController;
+import org.apache.flink.tests.util.flink.FlinkResource;
+import org.apache.flink.tests.util.flink.FlinkResourceSetup;
+import org.apache.flink.tests.util.flink.LocalStandaloneFlinkResourceFactory;
+import org.apache.flink.tests.util.flink.SQLJobSubmission;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.TestLogger;
+
+import org.hamcrest.CoreMatchers;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Duration;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.tests.util.flink.LocalStandaloneFlinkResourceFactory.loadProjectRootDirectory;
+import static org.hamcrest.Matchers.arrayContainingInAnyOrder;
+import static org.hamcrest.Matchers.containsString;
+import static org.junit.Assert.assertThat;
+
+/**
+ * End-to-end test for the HBase connectors.
+ */
+@Category(value = {TravisGroup1.class, PreCommit.class})
+public class SQLClientHBaseITCase extends TestLogger {
+
+ private static final Logger LOG = LoggerFactory.getLogger(SQLClientHBaseITCase.class);
+
+ private static final String HBASE_E2E_SQL = "hbase_e2e.sql";
+ private static final String YARN_CLASSPATH = "/flink-yarn-tests/target/yarn.classpath";
+
+ @Rule
+ public final HBaseResource hbase;
+
+ @Rule
+ public final FlinkResource flink = new LocalStandaloneFlinkResourceFactory()
+ .create(FlinkResourceSetup.builder().build());
+
+ @Rule
+ public final TemporaryFolder tmp = new TemporaryFolder();
+
+ @ClassRule
+ public static final DownloadCache DOWNLOAD_CACHE = DownloadCache.get();
+
+ private static final Path sqlToolBoxJar = TestUtils.getResourceJar(".*SqlToolbox.jar");
+ private static final Path sqlConnectorHBaseJar = TestUtils.getResourceJar(".*hbase.jar");
+ private List<Path> hadoopClasspathJars;
+
+ public SQLClientHBaseITCase() {
+ this.hbase = HBaseResource.get();
+ }
+
+ @Before
+ public void before() throws Exception {
+ DOWNLOAD_CACHE.before();
+ Path tmpPath = tmp.getRoot().toPath();
+ LOG.info("The current temporary path: {}", tmpPath);
+
+ // Prepare all hadoop jars under HADOOP_CLASSPATH, use yarn.classpath which contains all hadoop jars
+ Path currentModulePath = Paths.get("").toAbsolutePath();
+ Path flinkHomePath = loadProjectRootDirectory(currentModulePath);
+ String hadoopClasspath = Paths.get(flinkHomePath.toString(), YARN_CLASSPATH).toString();
Review comment:
Instead of re-using another modules classpath for convenience, please instead declare a set of hadop dependencies that this test required, and use the dependency-plugin to generate a distinct classpath file.
##########
File path: flink-end-to-end-tests/run-nightly-tests.sh
##########
@@ -236,16 +236,16 @@ printf "\n\n====================================================================
printf "Running Java end-to-end tests\n"
printf "==============================================================================\n"
-
-LOG4J_PROPERTIES=${END_TO_END_DIR}/../tools/log4j-travis.properties
+FLINK_PROJECT_ROOT_DIR="`(cd \"$END_TO_END_DIR\"/.. && pwd -P)`" # get flink project root directory
+LOG4J_PROPERTIES=${END_TO_END_DIR}/../tools/ci/log4j.properties
MVN_LOGGING_OPTIONS="-Dlog.dir=${ARTIFACTS_DIR} -DlogBackupDir=${ARTIFACTS_DIR} -Dlog4j.configurationFile=file://$LOG4J_PROPERTIES"
MVN_COMMON_OPTIONS="-Dflink.forkCount=2 -Dflink.forkCountTestPackage=2 -Dfast -Pskip-webui-build"
e2e_modules=$(find flink-end-to-end-tests -mindepth 2 -maxdepth 5 -name 'pom.xml' -printf '%h\n' | sort -u | tr '\n' ',')
e2e_modules="${e2e_modules},$(find flink-walkthroughs -mindepth 2 -maxdepth 2 -name 'pom.xml' -printf '%h\n' | sort -u | tr '\n' ',')"
PROFILE="$PROFILE -Pe2e-travis1 -Pe2e-travis2 -Pe2e-travis3 -Pe2e-travis4 -Pe2e-travis5 -Pe2e-travis6"
-run_mvn ${MVN_COMMON_OPTIONS} ${MVN_LOGGING_OPTIONS} ${PROFILE} verify -pl ${e2e_modules} -DdistDir=$(readlink -e build-target)
+run_mvn ${MVN_COMMON_OPTIONS} ${MVN_LOGGING_OPTIONS} ${PROFILE} verify -pl ${e2e_modules} -DdistDir=$(readlink -e build-target) -DrootDir=${FLINK_PROJECT_ROOT_DIR} -Dcache-dir=$E2E_CACHE_FOLDER -Dcache-ttl=P1M
Review comment:
same story as above in regards to retaining authorship
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-hbase/src/test/java/org/apache/flink/tests/util/hbase/SQLClientHBaseITCase.java
##########
@@ -0,0 +1,193 @@
+/*
+ * 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.tests.util.hbase;
+
+import org.apache.flink.api.common.time.Deadline;
+import org.apache.flink.tests.util.TestUtils;
+import org.apache.flink.tests.util.cache.DownloadCache;
+import org.apache.flink.tests.util.categories.PreCommit;
+import org.apache.flink.tests.util.categories.TravisGroup1;
+import org.apache.flink.tests.util.flink.ClusterController;
+import org.apache.flink.tests.util.flink.FlinkResource;
+import org.apache.flink.tests.util.flink.FlinkResourceSetup;
+import org.apache.flink.tests.util.flink.LocalStandaloneFlinkResourceFactory;
+import org.apache.flink.tests.util.flink.SQLJobSubmission;
+import org.apache.flink.util.FileUtils;
+import org.apache.flink.util.TestLogger;
+
+import org.hamcrest.CoreMatchers;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Duration;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.tests.util.flink.LocalStandaloneFlinkResourceFactory.loadProjectRootDirectory;
+import static org.hamcrest.Matchers.arrayContainingInAnyOrder;
+import static org.hamcrest.Matchers.containsString;
+import static org.junit.Assert.assertThat;
+
+/**
+ * End-to-end test for the HBase connectors.
+ */
+@Category(value = {TravisGroup1.class, PreCommit.class})
+public class SQLClientHBaseITCase extends TestLogger {
+
+ private static final Logger LOG = LoggerFactory.getLogger(SQLClientHBaseITCase.class);
+
+ private static final String HBASE_E2E_SQL = "hbase_e2e.sql";
+ private static final String YARN_CLASSPATH = "/flink-yarn-tests/target/yarn.classpath";
+
+ @Rule
+ public final HBaseResource hbase;
+
+ @Rule
+ public final FlinkResource flink = new LocalStandaloneFlinkResourceFactory()
+ .create(FlinkResourceSetup.builder().build());
+
+ @Rule
+ public final TemporaryFolder tmp = new TemporaryFolder();
+
+ @ClassRule
+ public static final DownloadCache DOWNLOAD_CACHE = DownloadCache.get();
+
+ private static final Path sqlToolBoxJar = TestUtils.getResourceJar(".*SqlToolbox.jar");
+ private static final Path sqlConnectorHBaseJar = TestUtils.getResourceJar(".*hbase.jar");
+ private List<Path> hadoopClasspathJars;
+
+ public SQLClientHBaseITCase() {
+ this.hbase = HBaseResource.get();
+ }
+
+ @Before
+ public void before() throws Exception {
+ DOWNLOAD_CACHE.before();
+ Path tmpPath = tmp.getRoot().toPath();
+ LOG.info("The current temporary path: {}", tmpPath);
+
+ // Prepare all hadoop jars under HADOOP_CLASSPATH, use yarn.classpath which contains all hadoop jars
+ Path currentModulePath = Paths.get("").toAbsolutePath();
+ Path flinkHomePath = loadProjectRootDirectory(currentModulePath);
+ String hadoopClasspath = Paths.get(flinkHomePath.toString(), YARN_CLASSPATH).toString();
+ File hadoopClasspathFile = new File(hadoopClasspath);
+
+ if (!hadoopClasspathFile.exists()) {
+ throw new FileNotFoundException(hadoopClasspath);
Review comment:
we need a better error message
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-hbase/src/main/java/org/apache/flink/tests/util/hbase/LocalStandaloneHBaseResource.java
##########
@@ -0,0 +1,190 @@
+/*
+ * 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.tests.util.hbase;
+
+import org.apache.flink.tests.util.AutoClosableProcess;
+import org.apache.flink.tests.util.CommandLineWrapper;
+import org.apache.flink.tests.util.activation.OperatingSystemRestriction;
+import org.apache.flink.tests.util.cache.DownloadCache;
+import org.apache.flink.util.OperatingSystem;
+
+import org.junit.rules.TemporaryFolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+
+/**
+ * {@link HBaseResource} that downloads hbase and set up a local hbase cluster.
+ */
+public class LocalStandaloneHBaseResource implements HBaseResource {
+
+ private static final Logger LOG = LoggerFactory.getLogger(LocalStandaloneHBaseResource.class);
+
+ private final TemporaryFolder tmp = new TemporaryFolder();
+
+ private final DownloadCache downloadCache = DownloadCache.get();
+ private Path hbaseDir;
+
+ LocalStandaloneHBaseResource() {
+ OperatingSystemRestriction.forbid(
+ String.format("The %s relies on UNIX utils and shell scripts.", getClass().getSimpleName()),
+ OperatingSystem.WINDOWS);
+ }
+
+ private static String getHBaseDownloadUrl() {
+ return "https://archive.apache.org/dist/hbase/1.4.3/hbase-1.4.3-bin.tar.gz";
+ }
+
+ @Override
+ public void before() throws Exception {
+ tmp.create();
+ downloadCache.before();
+
+ this.hbaseDir = tmp.newFolder("hbase").toPath().toAbsolutePath();
+ setupHBaseDist();
+ setupHBaseCluster();
+ }
+
+ private void setupHBaseDist() throws IOException {
+ final Path downloadDirectory = tmp.newFolder("getOrDownload").toPath();
+ final Path hbaseArchive = downloadCache.getOrDownload(getHBaseDownloadUrl(), downloadDirectory);
+
+ LOG.info("HBase localtion: {}", hbaseDir.toAbsolutePath());
Review comment:
```suggestion
LOG.info("HBase location: {}", hbaseDir.toAbsolutePath());
```
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot commented on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645770431
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 66412988a588056dd7e2e42508604a1b7806a7f4 (Thu Jun 18 04:49:53 UTC 2020)
**Warnings:**
* **4 pom.xml files were touched**: Check for build and licensing issues.
* 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
[GitHub] [flink] flinkbot commented on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645774818
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 66412988a588056dd7e2e42508604a1b7806a7f4 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
[GitHub] [flink] flinkbot edited a comment on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645774818
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748",
"triggerID" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"triggerType" : "PUSH"
}, {
"hash" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3753",
"triggerID" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"triggerType" : "PUSH"
}, {
"hash" : "56928bef64674b5c2c40179087dd36e6cbe355ce",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3777",
"triggerID" : "56928bef64674b5c2c40179087dd36e6cbe355ce",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 66412988a588056dd7e2e42508604a1b7806a7f4 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748)
* 455dbd2dce231b59b951dc2aaec955b23de86e8c Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3753)
* 56928bef64674b5c2c40179087dd36e6cbe355ce Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3777)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #12701: [FLINK-17678][hbase] Support fink-sql-connector-hbase
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12701:
URL: https://github.com/apache/flink/pull/12701#issuecomment-645774818
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3748",
"triggerID" : "66412988a588056dd7e2e42508604a1b7806a7f4",
"triggerType" : "PUSH"
}, {
"hash" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3753",
"triggerID" : "455dbd2dce231b59b951dc2aaec955b23de86e8c",
"triggerType" : "PUSH"
}, {
"hash" : "56928bef64674b5c2c40179087dd36e6cbe355ce",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3777",
"triggerID" : "56928bef64674b5c2c40179087dd36e6cbe355ce",
"triggerType" : "PUSH"
}, {
"hash" : "f91b46bbe0d8f099bcd211bdcc873d6d4887e1f1",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3781",
"triggerID" : "f91b46bbe0d8f099bcd211bdcc873d6d4887e1f1",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* f91b46bbe0d8f099bcd211bdcc873d6d4887e1f1 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=3781)
<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