embulk-output-elasticsearch 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 660287a649d29f3d92435f6b09f48a5db1a7239c
4
- data.tar.gz: 8dcc2256309363657afc86d5b3b3bc2fd1dbaae8
3
+ metadata.gz: 49c889d135818d8057d7770bd00363f07e6dc2a8
4
+ data.tar.gz: c0c110dfcfad6ae0a5d1c65bfd14ab36eb2931c8
5
5
  SHA512:
6
- metadata.gz: 273cbdf5a463a58ac8a4e88bb71b098fe6c08a2365c1b4e98712be703a2875f92401231249817229a9aa0ac22172e3f4e68a1c596a8dd97c509af7890eaa272f
7
- data.tar.gz: b7e7188312a602ca1cdca21b5dbb713166ee59bd328273b55f20f0ca707555ac2f0c6d54f9679aa3fe580f1c5b8c9ecbbefed7b455398689814c5cd583729bd0
6
+ metadata.gz: 43cf761e50854f8322a829c4e646360609e9e15db444bc404ae3137a232ddc4f3dc84704faec733c8edbb9f28826a133e71a11b5450b7e5003aa147d18bf6125
7
+ data.tar.gz: 464f7ff77c6030ac924fcee2f2856ea0fb3e3c6d842e0706c11a5e912438f10a4eb3aaf6172d9702155d4ca2fdc4cbebf0be4a510eda291d31f70b3b7410c17e
@@ -1,10 +1,7 @@
1
- dist: precise
2
1
  language: java
3
2
 
4
3
  jdk:
5
4
  - oraclejdk8
6
- - oraclejdk7
7
- - openjdk7
8
5
 
9
6
  env:
10
7
  global:
@@ -25,7 +22,3 @@ before_script:
25
22
  script:
26
23
  - ./gradlew gem
27
24
  - ./gradlew --info check jacocoTestReport
28
- addons:
29
- hosts:
30
- - example.com
31
- hostname: example.com
@@ -1,3 +1,8 @@
1
+ ## 0.4.6 - 2018-08-01
2
+ * [new feature] Add "connect_timeout_millis" option [#53](https://github.com/embulk/embulk-output-elasticsearch/pull/53)
3
+ * [new feature] Only build with Java8 [#52](https://github.com/embulk/embulk-output-elasticsearch/pull/52)
4
+ * [maintenance] Fix bug: "timeout_millis" option doesn't work as expected [#51](https://github.com/muga/embulk-output-elasticsearch/pull/51)
5
+
1
6
  ## 0.4.5 - 2017-11-29
2
7
  * [new feature] Add "fill_null_for_empty_column" option and allow insert null value when column is empty [#47](https://github.com/embulk/embulk-output-elasticsearch/pull/47) Thanks! @kfitzgerald
3
8
 
data/README.md CHANGED
@@ -31,7 +31,8 @@ This plugin uses HTTP/REST Client and haven't be implemented AWS authentication.
31
31
  - **maximum_retries** Number of maximam retry times (int, optional, default is 7)
32
32
  - **initial_retry_interval_millis** Initial interval between retries in milliseconds (int, optional, default is 1000)
33
33
  - **maximum_retry_interval_millis** Maximum interval between retries in milliseconds (int, optional, default is 120000)
34
- - **timeout_millis** timeout in milliseconds for HTTP client(int, optional, default is 60000)
34
+ - **timeout_millis** timeout in milliseconds for each HTTP request(int, optional, default is 60000)
35
+ - **connect_timeout_millis** connection timeout in milliseconds for HTTP client(int, optional, default is 60000)
35
36
  - **max_snapshot_waiting_secs** maximam waiting time in second when snapshot is just creating before delete index. works when `mode: replace` (int, optional, default is 1800)
36
37
  ### Modes
37
38
 
@@ -20,11 +20,11 @@ configurations {
20
20
  }
21
21
 
22
22
  group = "org.embulk.output.elasticsearch"
23
- version = "0.4.5"
23
+ version = "0.4.6"
24
24
 
25
25
  compileJava.options.encoding = 'UTF-8' // source encoding
26
- sourceCompatibility = 1.7
27
- targetCompatibility = 1.7
26
+ sourceCompatibility = 1.8
27
+ targetCompatibility = 1.8
28
28
 
29
29
  dependencies {
30
30
  compile "org.embulk:embulk-core:0.8.36"
@@ -34,6 +34,7 @@ import java.util.List;
34
34
  import java.util.Locale;
35
35
  import java.util.Map;
36
36
  import java.util.Random;
37
+ import java.util.concurrent.TimeUnit;
37
38
 
38
39
  public class ElasticsearchHttpClient
39
40
  {
@@ -327,6 +328,7 @@ public class ElasticsearchHttpClient
327
328
  org.eclipse.jetty.client.api.Request request = client
328
329
  .newRequest(uri)
329
330
  .accept("application/json")
331
+ .timeout(task.getTimeoutMills(), TimeUnit.MILLISECONDS)
330
332
  .method(method);
331
333
  if (method == HttpMethod.POST) {
332
334
  request.content(new StringContentProvider(content), "application/json");
@@ -391,7 +393,7 @@ public class ElasticsearchHttpClient
391
393
  }
392
394
  }
393
395
 
394
- private Jetty92RetryHelper createRetryHelper(PluginTask task)
396
+ private Jetty92RetryHelper createRetryHelper(final PluginTask task)
395
397
  {
396
398
  return new Jetty92RetryHelper(
397
399
  task.getMaximumRetries(),
@@ -402,6 +404,7 @@ public class ElasticsearchHttpClient
402
404
  public org.eclipse.jetty.client.HttpClient createAndStart()
403
405
  {
404
406
  org.eclipse.jetty.client.HttpClient client = new org.eclipse.jetty.client.HttpClient(new SslContextFactory());
407
+ client.setConnectTimeout(task.getConnectTimeoutMills());
405
408
  try {
406
409
  client.start();
407
410
  return client;
@@ -122,6 +122,10 @@ public class ElasticsearchOutputPluginDelegate
122
122
  @ConfigDefault("60000")
123
123
  int getTimeoutMills();
124
124
 
125
+ @Config("connect_timeout_millis")
126
+ @ConfigDefault("60000")
127
+ int getConnectTimeoutMills();
128
+
125
129
  @Config("max_snapshot_waiting_secs")
126
130
  @ConfigDefault("1800")
127
131
  int getMaxSnapshotWaitingSecs();
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muga Nishizawa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-30 00:00:00.000000000 Z
11
+ date: 2018-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -84,13 +84,13 @@ files:
84
84
  - src/test/java/org/embulk/output/elasticsearch/TestElasticsearchOutputPluginJSON.java
85
85
  - src/test/resources/sample_01.csv
86
86
  - src/test/resources/sample_01.json
87
- - classpath/embulk-base-restclient-0.5.5.jar
88
- - classpath/embulk-output-elasticsearch-0.4.5.jar
89
- - classpath/embulk-util-retryhelper-jetty92-0.5.3.jar
90
- - classpath/jetty-client-9.2.14.v20151106.jar
91
- - classpath/jetty-http-9.2.14.v20151106.jar
92
87
  - classpath/jetty-io-9.2.14.v20151106.jar
93
88
  - classpath/jetty-util-9.2.14.v20151106.jar
89
+ - classpath/jetty-http-9.2.14.v20151106.jar
90
+ - classpath/embulk-base-restclient-0.5.5.jar
91
+ - classpath/jetty-client-9.2.14.v20151106.jar
92
+ - classpath/embulk-util-retryhelper-jetty92-0.5.3.jar
93
+ - classpath/embulk-output-elasticsearch-0.4.6.jar
94
94
  homepage: https://github.com/embulk/embulk-output-elasticsearch
95
95
  licenses:
96
96
  - Apache 2.0