embulk-output-dynamodb 0.1.1 → 0.1.2

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: e66af28e6496f009130c40476f4b3ca099290a78
4
- data.tar.gz: 82ddcf4c42bbaf759abe827545fbc54469616ebc
3
+ metadata.gz: f96ba155f4fbef98fcbaf6160538d6602b0fec15
4
+ data.tar.gz: 32bbb567f67c2c74d1ced286d83a36244b96bcd0
5
5
  SHA512:
6
- metadata.gz: 2f13b2fee493844489cbaa3f66719989688b640dbc43c4a23a209d2231a53142cfbe600e3985b0a7bb3caf1e5fa031c7b8e29058019c48eff622cce0397fcea9
7
- data.tar.gz: a5a6067389d16393c33043f0190d1870fe319609c5a2606e3b10ddf2eee8f1bcbfee6e4ea1d95c519d8ba5392ff21bb543b0f1a9c01f69caae827409b4a0713c
6
+ metadata.gz: 1b16cacfd4f8c4832ba3bee7eb4c83d422fe0d924e02bcaf4e47c70b1af840cba27113ea6ca3a9d53341508ad06883fe6ac8753934f298244fd702466f0d9e15
7
+ data.tar.gz: 1b58e87bb2daf8763a8770d36f2f6e9a98a9a7c2a4126511ee44aa28f7bf05c2525024b4c1f085c4fd7b68830c9bbb3b0210392d3716e00b7621755e3b0b6587
@@ -1 +1 @@
1
- ## 0.1.1 - 2016-05-16
1
+ ## 0.1.2 - 2016-05-24
@@ -14,7 +14,7 @@ configurations {
14
14
  provided
15
15
  }
16
16
 
17
- version = "0.1.1"
17
+ version = "0.1.2"
18
18
 
19
19
  sourceCompatibility = 1.7
20
20
  targetCompatibility = 1.7
@@ -78,7 +78,7 @@ Gem::Specification.new do |spec|
78
78
  spec.description = %[Dumps records to AWS DynamoDB.]
79
79
  spec.email = ["satoshiakama@gmail.com"]
80
80
  spec.licenses = ["Apache-2.0"]
81
- # TODO set this: spec.homepage = "https://github.com/sakama/embulk-output-dynamodb"
81
+ spec.homepage = "https://github.com/sakama/embulk-output-dynamodb"
82
82
 
83
83
  spec.files = `git ls-files`.split("\n") + Dir["classpath/*.jar"]
84
84
  spec.test_files = spec.files.grep(%r"^(test|spec)/")
@@ -125,12 +125,7 @@ public class DynamodbOutputPlugin
125
125
  log.info(String.format("Executing plugin with '%s' mode", task.getMode()));
126
126
  task.setTable(dynamoDbUtils.generateTableName(task.getTable()));
127
127
  if (task.getAutoCreateTable()) {
128
- if (task.getPrimaryKey().isPresent() && task.getPrimaryKeyType().isPresent()) {
129
- dynamoDbUtils.createTable(dynamoDB, task);
130
- }
131
- else {
132
- throw new ConfigException("If auto_create_table is true, both primary_key and primary_key_type is necessary");
133
- }
128
+ dynamoDbUtils.createTable(dynamoDB, task);
134
129
  }
135
130
  // Up to raised provisioned value
136
131
  dynamoDbUtils.updateTableProvision(dynamoDB, task, true);
@@ -106,6 +106,12 @@ public class DynamodbUtils
106
106
  throw new ConfigException("'update_expression' is required when update mode");
107
107
  }
108
108
  }
109
+
110
+ if (task.getAutoCreateTable()) {
111
+ if (!task.getPrimaryKey().isPresent() || !task.getPrimaryKeyType().isPresent()) {
112
+ throw new ConfigException("If auto_create_table is true, both primary_key and primary_key_type is necessary");
113
+ }
114
+ }
109
115
  }
110
116
 
111
117
  protected void batchWriteItem(DynamoDB dynamoDB, TableWriteItems items)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-dynamodb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Satoshi Akama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-16 00:00:00.000000000 Z
11
+ date: 2016-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -70,10 +70,10 @@ files:
70
70
  - classpath/aws-java-sdk-s3-1.10.50.jar
71
71
  - classpath/commons-codec-1.6.jar
72
72
  - classpath/commons-logging-1.1.3.jar
73
- - classpath/embulk-output-dynamodb-0.1.1.jar
73
+ - classpath/embulk-output-dynamodb-0.1.2.jar
74
74
  - classpath/httpclient-4.3.6.jar
75
75
  - classpath/httpcore-4.3.3.jar
76
- homepage:
76
+ homepage: https://github.com/sakama/embulk-output-dynamodb
77
77
  licenses:
78
78
  - Apache-2.0
79
79
  metadata: {}