embulk-output-elasticsearch 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/build.gradle +3 -3
- data/src/main/java/org/embulk/output/ElasticsearchOutputPlugin.java +25 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 510fbb704be75a8aeeaaca10a60caa831aa689da
|
4
|
+
data.tar.gz: 6699f475139a298090741cd623d72e2203f982a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd0f98ab62836955aa033c84e35079452c36b6749635222febbcc99fd6c847303a2f0c688967bfc7991c78cf04f122f576024d91ba99e6dfe0b34eec9f3a5042
|
7
|
+
data.tar.gz: 387d6199e4e35523279b10b3dc0a1bb1314d9076c708bf410439e9b2b02d1b58fe5d8ba2b3a3b80208bbb257937795591bc1439bc65e101aa3f2812c73f469d4
|
data/build.gradle
CHANGED
@@ -13,15 +13,15 @@ configurations {
|
|
13
13
|
provided
|
14
14
|
}
|
15
15
|
|
16
|
-
version = "0.1.
|
16
|
+
version = "0.1.7"
|
17
17
|
|
18
18
|
compileJava.options.encoding = 'UTF-8' // source encoding
|
19
19
|
sourceCompatibility = 1.7
|
20
20
|
targetCompatibility = 1.7
|
21
21
|
|
22
22
|
dependencies {
|
23
|
-
compile "org.embulk:embulk-core:0.
|
24
|
-
provided "org.embulk:embulk-core:0.
|
23
|
+
compile "org.embulk:embulk-core:0.6.7"
|
24
|
+
provided "org.embulk:embulk-core:0.6.7"
|
25
25
|
compile 'org.elasticsearch:elasticsearch:1.4.2'
|
26
26
|
testCompile "junit:junit:4.+"
|
27
27
|
testCompile "org.mockito:mockito-core:1.+"
|
@@ -258,7 +258,11 @@ public class ElasticsearchOutputPlugin
|
|
258
258
|
@Override
|
259
259
|
public void booleanColumn(Column column) {
|
260
260
|
try {
|
261
|
-
|
261
|
+
if (pageReader.isNull(column)) {
|
262
|
+
contextBuilder.nullField(column.getName());
|
263
|
+
} else {
|
264
|
+
contextBuilder.field(column.getName(), pageReader.getBoolean(column));
|
265
|
+
}
|
262
266
|
} catch (IOException e) {
|
263
267
|
try {
|
264
268
|
contextBuilder.nullField(column.getName());
|
@@ -271,7 +275,11 @@ public class ElasticsearchOutputPlugin
|
|
271
275
|
@Override
|
272
276
|
public void longColumn(Column column) {
|
273
277
|
try {
|
274
|
-
|
278
|
+
if (pageReader.isNull(column)) {
|
279
|
+
contextBuilder.nullField(column.getName());
|
280
|
+
} else {
|
281
|
+
contextBuilder.field(column.getName(), pageReader.getLong(column));
|
282
|
+
}
|
275
283
|
} catch (IOException e) {
|
276
284
|
try {
|
277
285
|
contextBuilder.nullField(column.getName());
|
@@ -284,7 +292,11 @@ public class ElasticsearchOutputPlugin
|
|
284
292
|
@Override
|
285
293
|
public void doubleColumn(Column column) {
|
286
294
|
try {
|
287
|
-
|
295
|
+
if (pageReader.isNull(column)) {
|
296
|
+
contextBuilder.nullField(column.getName());
|
297
|
+
} else {
|
298
|
+
contextBuilder.field(column.getName(), pageReader.getDouble(column));
|
299
|
+
}
|
288
300
|
} catch (IOException e) {
|
289
301
|
try {
|
290
302
|
contextBuilder.nullField(column.getName());
|
@@ -297,7 +309,11 @@ public class ElasticsearchOutputPlugin
|
|
297
309
|
@Override
|
298
310
|
public void stringColumn(Column column) {
|
299
311
|
try {
|
300
|
-
|
312
|
+
if (pageReader.isNull(column)) {
|
313
|
+
contextBuilder.nullField(column.getName());
|
314
|
+
} else {
|
315
|
+
contextBuilder.field(column.getName(), pageReader.getString(column));
|
316
|
+
}
|
301
317
|
} catch (IOException e) {
|
302
318
|
try {
|
303
319
|
contextBuilder.nullField(column.getName());
|
@@ -310,7 +326,11 @@ public class ElasticsearchOutputPlugin
|
|
310
326
|
@Override
|
311
327
|
public void timestampColumn(Column column) {
|
312
328
|
try {
|
313
|
-
|
329
|
+
if (pageReader.isNull(column)) {
|
330
|
+
contextBuilder.nullField(column.getName());
|
331
|
+
} else {
|
332
|
+
contextBuilder.field(column.getName(), new Date(pageReader.getTimestamp(column).toEpochMilli()));
|
333
|
+
}
|
314
334
|
} catch (IOException e) {
|
315
335
|
try {
|
316
336
|
contextBuilder.nullField(column.getName());
|
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.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Muga Nishizawa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,7 +72,7 @@ files:
|
|
72
72
|
- src/main/resources/META-INF/services/org.embulk.spi.Extension
|
73
73
|
- src/test/java/org/embulk/output/TestElasticsearchOutputPlugin.java
|
74
74
|
- classpath/elasticsearch-1.4.2.jar
|
75
|
-
- classpath/embulk-output-elasticsearch-0.1.
|
75
|
+
- classpath/embulk-output-elasticsearch-0.1.7.jar
|
76
76
|
- classpath/lucene-analyzers-common-4.10.2.jar
|
77
77
|
- classpath/lucene-core-4.10.2.jar
|
78
78
|
- classpath/lucene-grouping-4.10.2.jar
|