embulk-output-td 0.3.8 → 0.3.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bafffe3329257454d4b7d41593bd6b7cb3c2c61f
|
4
|
+
data.tar.gz: 1ce0414e864669fcffc7b4c46c56ed2f3ab937d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd565fe11e81cd25bdf17de7da522f88bf0a2dd80cfbe4c2fa7c5f1f48d964545c114f52f61d5c6b2aa52f812b2eb8c1917ef19e0e017ef59489b6ed8e9fd780
|
7
|
+
data.tar.gz: 00408ba371cbda77388e742111c3e8890d7476951c1c92b55d9936dfbdc5f081fee12c637b0f9a5761c5c3fcf2c90a618064028b67438dd6c8c2d43b0e0f1adf
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 0.3.9 - 2016-10-26
|
2
|
+
|
3
|
+
* [maintenance] Add retry limit and interval configurations [#51](https://github.com/treasure-data/embulk-output-td/pull/51)
|
4
|
+
|
1
5
|
## 0.3.8 - 2016-08-15
|
2
6
|
|
3
7
|
* [maintenance] Change retry configuration [#50](https://github.com/treasure-data/embulk-output-td/pull/50)
|
data/build.gradle
CHANGED
data/embulk-output-td.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
Gem::Specification.new do |spec|
|
3
3
|
spec.name = "embulk-output-td"
|
4
|
-
spec.version = "0.3.
|
4
|
+
spec.version = "0.3.9"
|
5
5
|
spec.authors = ["Muga Nishizawa"]
|
6
6
|
spec.summary = %[TreasureData output plugin for Embulk]
|
7
7
|
spec.description = %[TreasureData output plugin is an Embulk plugin that loads records to TreasureData read by any input plugins. Search the input plugins by 'embulk-output' keyword.]
|
@@ -168,6 +168,18 @@ public class TdOutputPlugin
|
|
168
168
|
@Min(0)
|
169
169
|
int getDisplayedErrorRecordsCountLimit();
|
170
170
|
|
171
|
+
@Config("retry_limit")
|
172
|
+
@ConfigDefault("20")
|
173
|
+
int getRetryLimit();
|
174
|
+
|
175
|
+
@Config("retry_initial_interval_millis")
|
176
|
+
@ConfigDefault("1000")
|
177
|
+
int getRetryInitialIntervalMillis();
|
178
|
+
|
179
|
+
@Config("retry_max_interval_millis")
|
180
|
+
@ConfigDefault("90000")
|
181
|
+
int getRetryMaxIntervalMillis();
|
182
|
+
|
171
183
|
public boolean getDoUpload();
|
172
184
|
public void setDoUpload(boolean doUpload);
|
173
185
|
|
@@ -444,9 +456,9 @@ public class TdOutputPlugin
|
|
444
456
|
builder.setUseSSL(task.getUseSsl());
|
445
457
|
builder.setConnectTimeoutMillis(60000); // default 15000
|
446
458
|
builder.setIdleTimeoutMillis(60000); // default 60000
|
447
|
-
builder.setRetryLimit(
|
448
|
-
builder.setRetryInitialIntervalMillis(
|
449
|
-
builder.setRetryMaxIntervalMillis(
|
459
|
+
builder.setRetryLimit(task.getRetryLimit());
|
460
|
+
builder.setRetryInitialIntervalMillis(task.getRetryInitialIntervalMillis());
|
461
|
+
builder.setRetryMaxIntervalMillis(task.getRetryMaxIntervalMillis());
|
450
462
|
|
451
463
|
Optional<ProxyConfig> proxyConfig = newProxyConfig(task.getHttpProxy());
|
452
464
|
if (proxyConfig.isPresent()) {
|
@@ -47,6 +47,7 @@ import static com.treasuredata.client.model.TDBulkImportSession.ImportStatus.REA
|
|
47
47
|
import static com.treasuredata.client.model.TDBulkImportSession.ImportStatus.UNKNOWN;
|
48
48
|
import static com.treasuredata.client.model.TDBulkImportSession.ImportStatus.UPLOADING;
|
49
49
|
import static org.junit.Assert.assertEquals;
|
50
|
+
import static org.junit.Assert.assertFalse;
|
50
51
|
import static org.junit.Assert.assertTrue;
|
51
52
|
import static org.junit.Assert.fail;
|
52
53
|
import static org.mockito.Matchers.any;
|
@@ -72,6 +73,45 @@ public class TestTdOutputPlugin
|
|
72
73
|
plugin = plugin();
|
73
74
|
}
|
74
75
|
|
76
|
+
@Test
|
77
|
+
public void checkDefaultValues()
|
78
|
+
{
|
79
|
+
ConfigSource config = this.config.deepCopy();
|
80
|
+
PluginTask task = config.loadConfig(PluginTask.class);
|
81
|
+
assertEquals(true, task.getUseSsl());
|
82
|
+
assertFalse(task.getHttpProxy().isPresent());
|
83
|
+
assertEquals(TdOutputPlugin.Mode.APPEND, task.getMode());
|
84
|
+
assertEquals(true, task.getAutoCreateTable());
|
85
|
+
assertFalse(task.getSession().isPresent());
|
86
|
+
assertEquals(TdOutputPlugin.ConvertTimestampType.STRING, task.getConvertTimestampType());
|
87
|
+
assertFalse(task.getTimeColumn().isPresent());
|
88
|
+
assertFalse(task.getTimeValue().isPresent());
|
89
|
+
assertEquals(TdOutputPlugin.UnixTimestampUnit.SEC, task.getUnixTimestampUnit());
|
90
|
+
assertFalse(task.getTempDir().isPresent());
|
91
|
+
assertEquals(2, task.getUploadConcurrency());
|
92
|
+
assertEquals(16384, task.getFileSplitSize());
|
93
|
+
assertEquals("%Y-%m-%d %H:%M:%S.%3N", task.getDefaultTimestampFormat());
|
94
|
+
assertTrue(task.getColumnOptions().isEmpty());
|
95
|
+
assertFalse(task.getStopOnInvalidRecord());
|
96
|
+
assertEquals(10, task.getDisplayedErrorRecordsCountLimit());
|
97
|
+
assertEquals(20, task.getRetryLimit());
|
98
|
+
assertEquals(1000, task.getRetryInitialIntervalMillis());
|
99
|
+
assertEquals(90000, task.getRetryMaxIntervalMillis());
|
100
|
+
}
|
101
|
+
|
102
|
+
@Test
|
103
|
+
public void checkRetryValues()
|
104
|
+
{
|
105
|
+
ConfigSource config = this.config.deepCopy()
|
106
|
+
.set("retry_limit", 17)
|
107
|
+
.set("retry_initial_interval_millis", 4822)
|
108
|
+
.set("retry_max_interval_millis", 19348);
|
109
|
+
PluginTask task = config.loadConfig(PluginTask.class);
|
110
|
+
assertEquals(17, task.getRetryLimit());
|
111
|
+
assertEquals(4822, task.getRetryInitialIntervalMillis());
|
112
|
+
assertEquals(19348, task.getRetryMaxIntervalMillis());
|
113
|
+
}
|
114
|
+
|
75
115
|
@Test
|
76
116
|
public void checkUnixTimestampUnit()
|
77
117
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-td
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.9
|
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-
|
11
|
+
date: 2016-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,7 +82,7 @@ files:
|
|
82
82
|
- src/test/java/org/embulk/output/td/TestTdOutputPlugin.java
|
83
83
|
- src/test/java/org/embulk/output/td/TestTimeValueGenerator.java
|
84
84
|
- src/test/java/org/embulk/output/td/writer/TestFieldWriterSet.java
|
85
|
-
- classpath/embulk-output-td-0.3.
|
85
|
+
- classpath/embulk-output-td-0.3.9.jar
|
86
86
|
- classpath/hamcrest-core-1.1.jar
|
87
87
|
- classpath/jackson-annotations-2.6.7.jar
|
88
88
|
- classpath/jackson-core-2.6.7.jar
|