embulk-output-aerospike 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9a8d68b769f4e2262aeac270afa0ee5cf391fcf
4
- data.tar.gz: 4f2623d9cca4acc2d5d7b5cce00ab9aa0d510201
3
+ metadata.gz: f4173d9fcd0342b59f281e518d9c46c91eb60351
4
+ data.tar.gz: 2a2a0f35bc076f4598b0380a2621f1a1e3c3d3c8
5
5
  SHA512:
6
- metadata.gz: 7eb1e26ef1098fdb34ace7db8397b16a46dafbcaa77230ff8533ec73fb5c5efb661d6c87d863f53128344235a67e76f668e2d45618a76b826f3c89298b353fa8
7
- data.tar.gz: b25c6bbbe0dd397bd4d01ffc844f2de447c73d00f4b1addd69f5412e2e9dcec300ec7d84c6d7c724de13f4e93767be49d7fe3129347f8a048b4b0a177822b1bd
6
+ metadata.gz: cb1652db1111573fd528ac1cbf17c112c814103f632a1182ca64726a44ed9917d314927d3bcf7227774a00268e38cf06e027798bb8ca9bc0bf5afaa4448b3a7e
7
+ data.tar.gz: 213a8385ece2eeb39a3eda31c75c4f9ed684bb8820ee7675ad001c325aa287cb09ed50ba07e5eb00bac2c1c42016f3fcace06cad78c4423de42ab2232387285c
data/README.md CHANGED
@@ -4,8 +4,6 @@
4
4
 
5
5
  Aerospike output plugins for Embulk loads records to databases using [aerospiker](https://github.com/tkrs/aerospiker).
6
6
 
7
- And it was implemented in Scala :laughing:
8
-
9
7
  ## Overview
10
8
 
11
9
  * **Plugin type**: output
@@ -16,11 +16,11 @@ configurations {
16
16
  provided
17
17
  }
18
18
 
19
- version = "0.3.3"
19
+ version = "0.3.4"
20
20
 
21
21
  dependencies {
22
- compile "org.embulk:embulk-core:0.7.5"
23
- provided "org.embulk:embulk-core:0.7.5"
22
+ compile "org.embulk:embulk-core:0.8.8"
23
+ provided "org.embulk:embulk-core:0.8.8"
24
24
  compile 'org.scala-lang:scala-library:2.11.7'
25
25
  compile 'org.scalaz.stream:scalaz-stream_2.11:0.8'
26
26
  compile 'com.github.tkrs:aerospiker-core_2.11:0.4.0'
@@ -89,16 +89,12 @@ class AerospikePageOutput(taskSource: TaskSource, schema: Schema, taskIndex: Int
89
89
 
90
90
  implicit private[this] val reader: PageReader = new PageReader(schema)
91
91
 
92
- val createRecords: Page => Process[Task, Seq[Seq[Col]]] = { (page) =>
92
+ val createRecords: Page => Process[Task, Seq[Seq[Col]]] = { page =>
93
93
  reader.setPage(page)
94
- Process.eval {
95
- Task.delay {
96
- val records: ListBuffer[Seq[Col]] = ListBuffer.empty
97
- while (reader.nextRecord())
98
- records += (for (col <- schema.getColumns.toStream) yield Col of col).toSeq
99
- records.toSeq
100
- }
101
- }
94
+ val records: ListBuffer[Seq[Col]] = ListBuffer.empty
95
+ while (reader.nextRecord())
96
+ records += (for (col <- schema.getColumns.toStream) yield Col of col)
97
+ Process.eval(Task.now(records))
102
98
  }
103
99
 
104
100
  val toRecords: Seq[Seq[Col]] => Seq[Map[String, Any]] = _ map { row =>
@@ -201,9 +197,9 @@ class AerospikePageOutput(taskSource: TaskSource, schema: Schema, taskIndex: Int
201
197
  def add(page: Page) {
202
198
  tsk.getCommand match {
203
199
  case "put" =>
204
- createRecords(page).takeWhile(_.nonEmpty).map(toRecords).to(updater).runLog.run
200
+ createRecords(page).takeWhile(_.nonEmpty).map(toRecords).to(updater).run.run
205
201
  case "delete" =>
206
- createRecords(page).takeWhile(_.nonEmpty).map(toRecords).to(deleter).runLog.run
202
+ createRecords(page).takeWhile(_.nonEmpty).map(toRecords).to(deleter).run.run
207
203
  }
208
204
  }
209
205
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-aerospike
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takeru Sato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-02 00:00:00.000000000 Z
11
+ date: 2016-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -77,7 +77,7 @@ files:
77
77
  - classpath/circe-jawn_2.11-0.1.1.jar
78
78
  - classpath/commons-math3-3.2.jar
79
79
  - classpath/discipline_2.11-0.3.jar
80
- - classpath/embulk-output-aerospike-0.3.3.jar
80
+ - classpath/embulk-output-aerospike-0.3.4.jar
81
81
  - classpath/gnu-crypto-2.0.1.jar
82
82
  - classpath/jawn-parser_2.11-0.8.0.jar
83
83
  - classpath/jbcrypt-0.3m.jar