embulk-output-elasticsearch 0.2.1 → 0.3.0

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: 775d2c8e4628c2c21f2cfcf707ed138fbc2ab55b
4
- data.tar.gz: 7956e4ddf4ec168484598f50f3a31f8305cf7780
3
+ metadata.gz: 4e69eededaa3567e928cfb6edd1879607ba8b7f3
4
+ data.tar.gz: 014e076a87a6c6adde4b8d6fa2177f0f0966e81d
5
5
  SHA512:
6
- metadata.gz: f4283bed7a28688b10d1577d0f601c9102f02b49a0d2c79df25a4a5e3ff8b83fa03300cbd6f8a251f8c65da287df6ec2ae6e81a3797958477ae86d1f37af028b
7
- data.tar.gz: 4db5b4ca8f467f0c3ae77ed6fdeeea579fca25252885eea99d4fce818c61bad3a8fe7659f7fea29cdd0e1f90836ea39197a3a0f561364fbd1bd5652f1bb0bee5
6
+ metadata.gz: 8e9fbcd1b6632993a74896d35609df6d6153ab2369292d26e90496d475d30a5530a88478f4ea964dba50f483bdd47f30f58a3ccac02f850bf543ff21cfe0c544
7
+ data.tar.gz: a9d9b764357a8d11693c0d93f745a57aecce0a68e5265bd82a2ee79b9ce89ac0a3df2c2b344a846018a2ecf6f24fb9bf0549c92e6bafc0fb58a045a22c52400c
@@ -1,3 +1,7 @@
1
+ ## 0.3.0 - 2016-02-22
2
+
3
+ * [maintenance] Upgrade Embulk v08 [#21](https://github.com/muga/embulk-output-elasticsearch/pull/21)
4
+
1
5
  ## 0.2.1 - 2016-02-05
2
6
 
3
7
  * [maintenance] Fix bug. Force to fail jobs if nodes down while executing [#19](https://github.com/muga/embulk-output-elasticsearch/pull/19)
@@ -40,4 +44,4 @@
40
44
 
41
45
  ## 0.1.1 - 2015-02-16
42
46
 
43
- ## 0.1.0 - 2015-02-16
47
+ ## 0.1.0 - 2015-02-16
@@ -14,20 +14,20 @@ configurations {
14
14
  provided
15
15
  }
16
16
 
17
- version = "0.2.1"
17
+ version = "0.3.0"
18
18
 
19
19
  compileJava.options.encoding = 'UTF-8' // source encoding
20
20
  sourceCompatibility = 1.7
21
21
  targetCompatibility = 1.7
22
22
 
23
23
  dependencies {
24
- compile "org.embulk:embulk-core:0.7.7"
25
- provided "org.embulk:embulk-core:0.7.7"
24
+ compile "org.embulk:embulk-core:0.8.5"
25
+ provided "org.embulk:embulk-core:0.8.5"
26
26
  compile 'org.elasticsearch:elasticsearch:2.0.0'
27
27
 
28
28
  testCompile "junit:junit:4.+"
29
- testCompile "org.embulk:embulk-core:0.7.7:tests"
30
- testCompile "org.embulk:embulk-standards:0.7.7"
29
+ testCompile "org.embulk:embulk-core:0.8.5:tests"
30
+ testCompile "org.embulk:embulk-standards:0.8.5"
31
31
  }
32
32
 
33
33
  task classpath(type: Copy, dependsOn: ["jar"]) {
@@ -363,6 +363,23 @@ public class ElasticsearchOutputPlugin
363
363
  }
364
364
  }
365
365
 
366
+ @Override
367
+ public void jsonColumn(Column column) {
368
+ try {
369
+ if (pageReader.isNull(column)) {
370
+ contextBuilder.nullField(column.getName());
371
+ } else {
372
+ contextBuilder.field(column.getName(), pageReader.getJson(column).toJson());
373
+ }
374
+ } catch (IOException e) {
375
+ try {
376
+ contextBuilder.nullField(column.getName());
377
+ } catch (IOException ex) {
378
+ throw Throwables.propagate(ex);
379
+ }
380
+ }
381
+ }
382
+
366
383
  @Override
367
384
  public void timestampColumn(Column column) {
368
385
  try {
@@ -406,6 +423,8 @@ public class ElasticsearchOutputPlugin
406
423
  idValue = pageReader.getDouble(inputColumn) + "";
407
424
  } else if (Types.LONG.equals(inputColumn.getType())) {
408
425
  idValue = pageReader.getLong(inputColumn) + "";
426
+ } else if (Types.JSON.equals(inputColumn.getType())) {
427
+ idValue = pageReader.getJson(inputColumn).toJson();
409
428
  } else if (Types.TIMESTAMP.equals(inputColumn.getType())) {
410
429
  idValue = pageReader.getTimestamp(inputColumn).toString();
411
430
  } else {
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.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muga Nishizawa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-05 00:00:00.000000000 Z
11
+ date: 2016-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -75,7 +75,7 @@ files:
75
75
  - classpath/commons-cli-1.3.1.jar
76
76
  - classpath/compress-lzf-1.0.2.jar
77
77
  - classpath/elasticsearch-2.0.0.jar
78
- - classpath/embulk-output-elasticsearch-0.2.1.jar
78
+ - classpath/embulk-output-elasticsearch-0.3.0.jar
79
79
  - classpath/HdrHistogram-2.1.6.jar
80
80
  - classpath/hppc-0.7.1.jar
81
81
  - classpath/jackson-dataformat-cbor-2.5.3.jar