Skip to content

Conversation

JingGe
Copy link
Contributor

@JingGe JingGe commented Apr 4, 2022

What is the purpose of the change

With this PR, Elasticsearch connectors will be coped to the external repo. Please refer to the previous draft PR #2 for more information.

Brief change log

  • create a new maven project and migrate the most part of the Flink maven pom.
  • migrate flink-connector-elasticsearch-base, flink-connector-elasticsearch6, flink-connector-elasticsearch7
  • migrate uber for SQL: flink-sql-connector-elasticsearch6, flink-sql-connector-elasticsearch7
  • some dependency bugs fix to make the compile and test passed

Verifying this change

It can be verified by checking if "mvn clean install" works successfully.

tzulitai and others added 30 commits April 4, 2022 12:16
…rors.

Covered exceptions are: Timeouts, No Master, UnavailableShardsException, bulk queue on node full
…csearchSink

This commit fixes both FLINK-5353 and FLINK-5122. It allows users to implement a
failure handler to control how failed action requests are dealt with.

The commit also includes general improvements to FLINK-5122:
1. Use the built-in backoff functionality in the Elasticsearch BulkProcessor (not
available for Elasticsearch 1.x)
2. Migrate the `checkErrorAndRetryBulk` functionality to the new failure handler
…a-version.sh

Use scala.binary.version as defined in the parent POM and remove the
script to swap scala version identifiers.

This closes #3800
These ASM dependencies where shaded into the elasticsearch-base module
which where then clashing with our newer (also shaded) ASM dependency.
…lasticSearch connector

 - Removes Serializable from the RequestIndexer, because they are neither required to be
   serializable (they are created in open()) nor is the main implementation
   (BulkProcessorIndexer) actually serializable.

 - Makes BulkFlushBackoffPolicy a static inner class, which avoids adding outer class during
   serialization and clears various warnings about raw reference to outer class

This closes #4298
This commit changes the behaviour of the WebRuntimeMonitor to not longer block serving
threads by waiting on the result of futures. Instead the RequestHandler now returns a
CompletableFuture<FullHttpResponse> which is written out to the Netty channel upon
completion. This will improve the performance of our WebRuntimeMonitor.

This closes #4527.
Fix typos from the IntelliJ "Typos" inspection.

This closes #5242
…tBase

The AbstractTestBase fully subsumes the functionality of the
StreamingMultipleProgramsTestBase since it now is the most general test base
for streaming and batch jobs. As a consequence, we can safely remove the
StreamingMultipleProgramsTestBase and let all corresponding tests extend from
AbstractTestBase.

This closes #4896.
This closes #5378.
This closes #4847.
This closes #5305.
This closes #5208.
This closes #2192.
This closes #2422.
This closes #3478.
…ng with Elasticsearch 5.3+

This closes #6043.
…ncompatibility

This commit fixes the binary incompatibility for UpdateRequests in Elasticsearch. This
is due to a binary compatibility issue between the base module (which is compiled
against a very old ES version and the current Elasticsearch version).
It lets the API call bridge also provide the RequestIndexer version-specific.

This closes #6682.
…csearch

This commit adds full support for Elasticsearch to be used with Table & SQL API as well as SQL Client.

It includes:
- Elasticsearch 6 upsert table sink (for append-only and updating queries)
- Elasticsearch 6 table factory
- Elasticsearch table descriptors & validators
- Unit tests, SQL Client end-to-end test
- Website documentation

This closes #6611.
…-table-common

This commit makes the flink-formats module Scala free by introducing a
flink-table-common module that is implemented in Java. This module contains
all classes that are required across different Maven modules.

Additionally, all classes in this module have been annotated with @internal
and @PublicEvolving accordingly.

Since the methods in Descriptor were declared with private[flink] visibility,
they have been migrated to a new toProperties() method that is public.

This closes #6958.
Set the system property jna.nosys=true to avoid ElasticsearchSinkITCase test failures
due a wrong JNA version.
snuyanzin and others added 26 commits April 4, 2022 12:16
…on(now() and current_timestamp) in index pattern
flink-connector-base was previously inconsistently used in connectors (directly shaded in some and transitively pulled in via flink-connector-files which was itself shaded in the table uber jar). FLINK-24687 moved flink-connector-files out from the flink-table uber jar. This commit implements a combined approach for ensuring a smooth transition for both Flink users and for external connector developers, as outlined in this:
- all internal Flink connectors that depend on flink-connector-base now shade and relocate it
- for compatibility, until external developers implement the same change, flink-connector-base is also included into flink-dist
Since `TableConfig` is a `WritableConfig`, callers should directly call
`TableConfig.set()` and avoid going throught `#getConfiguration()` which
is there only for advanced internal configuration read value purposes.
… Elasticsearch 6/7 connectors (tests only)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Copy link
Contributor

@MartijnVisser MartijnVisser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've verified that this works locally for both JDK8 and JDK11. The Github Actions build pipeline also works. LGTM

@MartijnVisser MartijnVisser merged commit dddb211 into apache:main Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.