Skip to content

Commit

Permalink
Merge pull request #76 from ryannguyen360td/support_embulk-util-retry…
Browse files Browse the repository at this point in the history
…helper-jetty_version_94

Support embulk util retryhelper jetty version 94
  • Loading branch information
dmikurube authored Jul 26, 2024
2 parents fa27b5e + 4aa22bd commit f90a962
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.7.0 - 2024-03-01
* [update] Add jetty94 to support TLS1.3

## 0.6.0 - 2023-02-14
* [maintenance] Support typeless endpoint for ES version 8.x [#71](https://github.com/embulk/embulk-output-elasticsearch/pull/71)

Expand Down
2 changes: 1 addition & 1 deletion NOTICE_GEM
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ They are licensed under the Apache Software License, Version 2.0.
The gem distribution of this product includes JARs of the Jakarta Bean Validation API 1.1 (https://beanvalidation.org/1.1/), as-is.
It is licensed under the Apache Software License, Version 2.0.

The gem distribution of this product includes JARs of the Eclipse Jetty Project (https://www.eclipse.org/jetty/) 9.2, as-is.
The gem distribution of this product includes JARs of the Eclipse Jetty Project (https://www.eclipse.org/jetty/) 9.4, as-is.
They are licensed under dual licenses of the Apache Software License, Version 2.0, and the Eclipse Public License 2.0.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repositories {
}

group = "org.embulk"
version = "0.6.0-SNAPSHOT"
version = "0.7.0-SNAPSHOT"
description = "Elasticsearch output plugin is an Embulk plugin that loads records to Elasticsearch read by any input plugins."

tasks.withType(JavaCompile) {
Expand Down Expand Up @@ -55,7 +55,7 @@ dependencies {
implementation "javax.validation:validation-api:1.1.0.Final"

implementation "org.embulk:embulk-base-restclient:0.10.1"
implementation "org.embulk:embulk-util-retryhelper-jetty92:0.8.2"
implementation "org.embulk:embulk-util-retryhelper-jetty94:0.9.0"

implementation "org.embulk:embulk-util-timestamp:0.2.1"

Expand Down
12 changes: 6 additions & 6 deletions gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ com.fasterxml.jackson.core:jackson-core:2.6.7=compileClasspath,runtimeClasspath
com.fasterxml.jackson.core:jackson-databind:2.6.7=compileClasspath,runtimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.7=compileClasspath,runtimeClasspath
javax.validation:validation-api:1.1.0.Final=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-client:9.2.14.v20151106=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-http:9.2.14.v20151106=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-io:9.2.14.v20151106=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-util:9.2.14.v20151106=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-client:9.4.51.v20230217=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-http:9.4.51.v20230217=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-io:9.4.51.v20230217=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-util:9.4.51.v20230217=compileClasspath,runtimeClasspath
org.embulk:embulk-api:0.10.28=compileClasspath
org.embulk:embulk-base-restclient:0.10.1=compileClasspath,runtimeClasspath
org.embulk:embulk-spi:0.10.28=compileClasspath
org.embulk:embulk-util-config:0.3.2=compileClasspath,runtimeClasspath
org.embulk:embulk-util-json:0.1.1=compileClasspath,runtimeClasspath
org.embulk:embulk-util-retryhelper-jetty92:0.8.2=compileClasspath,runtimeClasspath
org.embulk:embulk-util-retryhelper:0.8.2=compileClasspath,runtimeClasspath
org.embulk:embulk-util-retryhelper-jetty94:0.9.0=compileClasspath,runtimeClasspath
org.embulk:embulk-util-retryhelper:0.9.0=compileClasspath,runtimeClasspath
org.embulk:embulk-util-rubytime:0.3.2=runtimeClasspath
org.embulk:embulk-util-timestamp:0.2.1=compileClasspath,runtimeClasspath
org.msgpack:msgpack-core:0.8.11=compileClasspath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
import org.embulk.spi.DataException;
import org.embulk.spi.Exec;
import org.embulk.spi.time.Timestamp;
import org.embulk.util.retryhelper.jetty92.Jetty92ClientCreator;
import org.embulk.util.retryhelper.jetty92.Jetty92RetryHelper;
import org.embulk.util.retryhelper.jetty92.Jetty92SingleRequester;
import org.embulk.util.retryhelper.jetty92.StringJetty92ResponseEntityReader;
import org.embulk.util.retryhelper.jetty94.Jetty94ClientCreator;
import org.embulk.util.retryhelper.jetty94.Jetty94RetryHelper;
import org.embulk.util.retryhelper.jetty94.Jetty94SingleRequester;
import org.embulk.util.retryhelper.jetty94.StringJetty94ResponseEntityReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -355,10 +355,10 @@ private JsonNode sendRequest(String path, final HttpMethod method, final PluginT
final String uri = createRequestUri(task, path);
final String authorizationHeader = getAuthorizationHeader(task);

try (Jetty92RetryHelper retryHelper = createRetryHelper(task)) {
try (Jetty94RetryHelper retryHelper = createRetryHelper(task)) {
String responseBody = retryHelper.requestWithRetry(
new StringJetty92ResponseEntityReader(task.getTimeoutMills()),
new Jetty92SingleRequester() {
new StringJetty94ResponseEntityReader(task.getTimeoutMills()),
new Jetty94SingleRequester() {
@Override
public void requestOnce(org.eclipse.jetty.client.HttpClient client, org.eclipse.jetty.client.api.Response.Listener responseListener)
{
Expand Down Expand Up @@ -430,13 +430,13 @@ private JsonNode parseJson(final String json) throws DataException
}
}

private Jetty92RetryHelper createRetryHelper(final PluginTask task)
private Jetty94RetryHelper createRetryHelper(final PluginTask task)
{
return new Jetty92RetryHelper(
return new Jetty94RetryHelper(
task.getMaximumRetries(),
task.getInitialRetryIntervalMillis(),
task.getMaximumRetryIntervalMillis(),
new Jetty92ClientCreator() {
new Jetty94ClientCreator() {
@Override
public org.eclipse.jetty.client.HttpClient createAndStart()
{
Expand Down

0 comments on commit f90a962

Please sign in to comment.