embulk-input-elasticsearch 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -6
- data/embulk-input-elasticsearch.gemspec +1 -1
- data/lib/embulk/input/elasticsearch/connection.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fe4375a3aa307d250dea7ecb85b3205d5bea8f0
|
4
|
+
data.tar.gz: 40122cde69c0ee271ca6f10b1dc06aea45870e27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64c5d668c9edf83b90b72911a12ccb8169cc6eba9d6c8cddc2dc06e3963c970edadcb24ffc04b8ad9b81c9a9f1549e3cc0ceefb88fcfe73862e4067ff6782319
|
7
|
+
data.tar.gz: fbf04ec4f70e7608222150567f88c263118b4db7dc06a469f665dab423844aeb6990348eb480e55850b260d57097af9a60049ddae0e601c2b443e0dffa889f57
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Elasticsearch input plugin for Embulk [![Build Status](https://secure.travis-ci.org/toyama0919/embulk-input-elasticsearch.png?branch=master)](http://travis-ci.org/toyama0919/embulk-input-elasticsearch)
|
1
|
+
# Elasticsearch input plugin for Embulk [![Build Status](https://secure.travis-ci.org/toyama0919/embulk-input-elasticsearch.png?branch=master)](http://travis-ci.org/toyama0919/embulk-input-elasticsearch) [![Gem Version](https://badge.fury.io/rb/embulk-input-elasticsearch.svg)](http://badge.fury.io/rb/embulk-input-elasticsearch)
|
2
2
|
|
3
3
|
## Overview
|
4
4
|
|
@@ -11,18 +11,19 @@
|
|
11
11
|
- **nodes**: nodes (array, required)
|
12
12
|
- **host**: host (string, required)
|
13
13
|
- **port**: port (integer, required)
|
14
|
-
- **queries**: query (array, required)
|
14
|
+
- **queries**: lucene query array. (array, required)
|
15
15
|
- **index**: index (string, required)
|
16
16
|
- **index_type**: index_type (string)
|
17
|
-
- **request_timeout**:
|
18
|
-
- **per_size**:
|
19
|
-
- **limit_size**:
|
17
|
+
- **request_timeout**: request timeout (integer)
|
18
|
+
- **per_size**: per size query. (integer, required, default: `1000`)
|
19
|
+
- **limit_size**: limit size unit query. (integer, default: unlimit)
|
20
20
|
- **num_threads**: number of threads for queries. (integer, default: 1)
|
21
|
+
- **retry_on_failure**: retry on failure. set 0 is retry forever. (integer, default: 5)
|
21
22
|
- **fields**: fields (array, required)
|
22
23
|
- **name**: name (string, required)
|
23
24
|
- **type**: type (string, required)
|
24
25
|
- **metadata**: metadata (boolean, default: false)
|
25
|
-
- **time_format**: time_format (string
|
26
|
+
- **time_format**: time_format (string)
|
26
27
|
|
27
28
|
## Example
|
28
29
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
Gem::Specification.new do |spec|
|
3
3
|
spec.name = "embulk-input-elasticsearch"
|
4
|
-
spec.version = "0.3.
|
4
|
+
spec.version = "0.3.4"
|
5
5
|
spec.authors = ["toyama0919"]
|
6
6
|
spec.summary = "Elasticsearch input plugin for Embulk"
|
7
7
|
spec.description = "Loads records from Elasticsearch. parallel query support."
|
@@ -59,12 +59,14 @@ module Embulk
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
+
private
|
63
|
+
|
62
64
|
def search_with_retry
|
63
65
|
retries = 0
|
64
66
|
begin
|
65
67
|
yield if block_given?
|
66
68
|
rescue => e
|
67
|
-
if retries < @retry_on_failure
|
69
|
+
if (@retry_on_failure == 0 || retries < @retry_on_failure)
|
68
70
|
retries += 1
|
69
71
|
Embulk.logger.warn "Could not search to Elasticsearch, resetting connection and trying again. #{e.message}"
|
70
72
|
sleep 2**retries
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- toyama0919
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|