embulk 0.6.18 → 0.6.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/build.gradle +1 -1
- data/embulk-core/src/main/java/org/embulk/EmbulkService.java +39 -11
- data/embulk-core/src/main/java/org/embulk/command/Runner.java +1 -1
- data/embulk-core/src/main/java/org/embulk/spi/unit/ToString.java +54 -0
- data/embulk-core/src/main/java/org/embulk/spi/unit/ToStringMap.java +35 -0
- data/embulk-docs/src/release.rst +1 -0
- data/embulk-docs/src/release/release-0.6.19.rst +18 -0
- data/lib/embulk/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0525d84746ae3f0cbd2839f3b6447063fc8f72ed
|
4
|
+
data.tar.gz: ea6a6a7c3a2a74b05466b5c1170239a6f32d0fa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5972147aab6f9e81cbdd13eb536ffbbdee7dfcff9ee32122b90a76e3e41756fd144f709f6bbbd22d603a57c613e86c671f135903528f0c94beccea70066d0a1
|
7
|
+
data.tar.gz: 10383e3a6a6362decade2631ad9b365455be007e9600c97e4564f3a7df2a9556f7356985ea45975a37bbc2c612a3255c79a1ae11657084fa78a643b345625722
|
data/README.md
CHANGED
@@ -121,6 +121,14 @@ embulk run -b ./embulk_bundle ...
|
|
121
121
|
|
122
122
|
For further details, visit [Embulk documentation](http://www.embulk.org/docs/).
|
123
123
|
|
124
|
+
## Upgrading to the latest version
|
125
|
+
|
126
|
+
Following command updates embulk itself to the latest released version.
|
127
|
+
|
128
|
+
```sh
|
129
|
+
embulk selfupdate
|
130
|
+
```
|
131
|
+
|
124
132
|
## Embulk Development
|
125
133
|
|
126
134
|
### Build
|
data/build.gradle
CHANGED
@@ -11,22 +11,18 @@ import org.embulk.exec.ExtensionServiceLoaderModule;
|
|
11
11
|
import org.embulk.plugin.PluginClassLoaderModule;
|
12
12
|
import org.embulk.plugin.BuiltinPluginSourceModule;
|
13
13
|
import org.embulk.jruby.JRubyScriptingModule;
|
14
|
+
import static com.google.common.base.Preconditions.checkState;
|
14
15
|
|
15
16
|
public class EmbulkService
|
16
17
|
{
|
17
|
-
|
18
|
+
private final ConfigSource systemConfig;
|
19
|
+
|
20
|
+
protected Injector injector;
|
21
|
+
private boolean initialized;
|
18
22
|
|
19
23
|
public EmbulkService(ConfigSource systemConfig)
|
20
24
|
{
|
21
|
-
|
22
|
-
modules.add(new SystemConfigModule(systemConfig));
|
23
|
-
modules.add(new ExecModule());
|
24
|
-
modules.add(new ExtensionServiceLoaderModule(systemConfig));
|
25
|
-
modules.add(new PluginClassLoaderModule(systemConfig));
|
26
|
-
modules.add(new BuiltinPluginSourceModule());
|
27
|
-
modules.add(new JRubyScriptingModule(systemConfig));
|
28
|
-
modules.addAll(getAdditionalModules(systemConfig));
|
29
|
-
injector = Guice.createInjector(modules.build());
|
25
|
+
this.systemConfig = systemConfig;
|
30
26
|
}
|
31
27
|
|
32
28
|
protected Iterable<? extends Module> getAdditionalModules(ConfigSource systemConfig)
|
@@ -34,8 +30,40 @@ public class EmbulkService
|
|
34
30
|
return ImmutableList.of();
|
35
31
|
}
|
36
32
|
|
37
|
-
|
33
|
+
protected Iterable<? extends Module> overrideModules(Iterable<? extends Module> modules, ConfigSource systemConfig)
|
34
|
+
{
|
35
|
+
return modules;
|
36
|
+
}
|
37
|
+
|
38
|
+
public Injector initialize()
|
38
39
|
{
|
40
|
+
checkState(!initialized, "Already initialized");
|
41
|
+
|
42
|
+
ImmutableList.Builder<Module> builder = ImmutableList.builder();
|
43
|
+
builder.add(new SystemConfigModule(systemConfig));
|
44
|
+
builder.add(new ExecModule());
|
45
|
+
builder.add(new ExtensionServiceLoaderModule(systemConfig));
|
46
|
+
builder.add(new PluginClassLoaderModule(systemConfig));
|
47
|
+
builder.add(new BuiltinPluginSourceModule());
|
48
|
+
builder.add(new JRubyScriptingModule(systemConfig));
|
49
|
+
|
50
|
+
builder.addAll(getAdditionalModules(systemConfig));
|
51
|
+
|
52
|
+
Iterable<? extends Module> modules = builder.build();
|
53
|
+
modules = overrideModules(modules, systemConfig);
|
54
|
+
|
55
|
+
injector = Guice.createInjector(modules);
|
56
|
+
initialized = true;
|
57
|
+
|
39
58
|
return injector;
|
40
59
|
}
|
60
|
+
|
61
|
+
@Deprecated
|
62
|
+
public synchronized Injector getInjector()
|
63
|
+
{
|
64
|
+
if (initialized) {
|
65
|
+
return injector;
|
66
|
+
}
|
67
|
+
return initialize();
|
68
|
+
}
|
41
69
|
}
|
@@ -67,7 +67,7 @@ public class Runner
|
|
67
67
|
this.systemConfig = new ConfigLoader(bootstrapModelManager).fromPropertiesYamlLiteral(System.getProperties(), "embulk.");
|
68
68
|
mergeOptionsToSystemConfig(options, systemConfig);
|
69
69
|
this.service = new EmbulkService(systemConfig);
|
70
|
-
this.injector = service.
|
70
|
+
this.injector = service.initialize();
|
71
71
|
}
|
72
72
|
|
73
73
|
@SuppressWarnings("unchecked")
|
@@ -0,0 +1,54 @@
|
|
1
|
+
package org.embulk.spi.unit;
|
2
|
+
|
3
|
+
import com.google.common.base.Optional;
|
4
|
+
import com.fasterxml.jackson.databind.JsonNode;
|
5
|
+
import com.fasterxml.jackson.databind.JsonMappingException;
|
6
|
+
import com.fasterxml.jackson.databind.node.NullNode;
|
7
|
+
import com.fasterxml.jackson.annotation.JsonCreator;
|
8
|
+
import com.fasterxml.jackson.annotation.JsonValue;
|
9
|
+
|
10
|
+
public class ToString
|
11
|
+
{
|
12
|
+
private final String string;
|
13
|
+
|
14
|
+
public ToString(String string)
|
15
|
+
{
|
16
|
+
this.string = string;
|
17
|
+
}
|
18
|
+
|
19
|
+
@JsonCreator
|
20
|
+
public ToString(Optional<JsonNode> option) throws JsonMappingException
|
21
|
+
{
|
22
|
+
JsonNode node = option.or(NullNode.getInstance());
|
23
|
+
if (node.isTextual()) {
|
24
|
+
this.string = node.textValue();
|
25
|
+
} else if (node.isValueNode()) {
|
26
|
+
this.string = node.toString();
|
27
|
+
} else {
|
28
|
+
throw new JsonMappingException(String.format("Arrays and objects are invalid: '%s'", node));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
@Override
|
33
|
+
public boolean equals(Object obj)
|
34
|
+
{
|
35
|
+
if (!(obj instanceof ToString)) {
|
36
|
+
return false;
|
37
|
+
}
|
38
|
+
ToString o = (ToString) obj;
|
39
|
+
return string.equals(o.string);
|
40
|
+
}
|
41
|
+
|
42
|
+
@Override
|
43
|
+
public int hashCode()
|
44
|
+
{
|
45
|
+
return string.hashCode();
|
46
|
+
}
|
47
|
+
|
48
|
+
@JsonValue
|
49
|
+
@Override
|
50
|
+
public String toString()
|
51
|
+
{
|
52
|
+
return string;
|
53
|
+
}
|
54
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
package org.embulk.spi.unit;
|
2
|
+
|
3
|
+
import java.util.Map;
|
4
|
+
import java.util.HashMap;
|
5
|
+
import java.util.Properties;
|
6
|
+
import com.google.common.base.Function;
|
7
|
+
import com.google.common.collect.Maps;
|
8
|
+
import com.fasterxml.jackson.annotation.JsonCreator;
|
9
|
+
import com.fasterxml.jackson.annotation.JsonValue;
|
10
|
+
|
11
|
+
public class ToStringMap
|
12
|
+
extends HashMap<String, String>
|
13
|
+
{
|
14
|
+
@JsonCreator
|
15
|
+
public ToStringMap(Map<String, ToString> map)
|
16
|
+
{
|
17
|
+
super(Maps.transformValues(map, new Function<ToString, String>() {
|
18
|
+
public String apply(ToString value)
|
19
|
+
{
|
20
|
+
if (value == null) {
|
21
|
+
return "null";
|
22
|
+
} else {
|
23
|
+
return value.toString();
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}));
|
27
|
+
}
|
28
|
+
|
29
|
+
public Properties toProperties()
|
30
|
+
{
|
31
|
+
Properties props = new Properties();
|
32
|
+
props.putAll(this);
|
33
|
+
return props;
|
34
|
+
}
|
35
|
+
}
|
data/embulk-docs/src/release.rst
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
Release 0.6.19
|
2
|
+
==================================
|
3
|
+
|
4
|
+
Java Plugin API
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Added spi.unit.ToStringMap utility class which can be used as a field type of a Task class. ToStringMap is a ``Map<String,String>`` but also accepts non-string values and converts it to string. This fuzzy behavior is useful for options such as ``options``.
|
8
|
+
|
9
|
+
|
10
|
+
Embulk Embed API
|
11
|
+
------------------
|
12
|
+
|
13
|
+
* EmbulkService supports ``overrideModules`` method so that applications can use ``Modules.override`` to override specific injections.
|
14
|
+
|
15
|
+
|
16
|
+
Release Date
|
17
|
+
------------------
|
18
|
+
2015-07-23
|
data/lib/embulk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -222,6 +222,8 @@ files:
|
|
222
222
|
- embulk-core/src/main/java/org/embulk/spi/unit/ByteSize.java
|
223
223
|
- embulk-core/src/main/java/org/embulk/spi/unit/LocalFile.java
|
224
224
|
- embulk-core/src/main/java/org/embulk/spi/unit/LocalFileSerDe.java
|
225
|
+
- embulk-core/src/main/java/org/embulk/spi/unit/ToString.java
|
226
|
+
- embulk-core/src/main/java/org/embulk/spi/unit/ToStringMap.java
|
225
227
|
- embulk-core/src/main/java/org/embulk/spi/util/CharsetSerDe.java
|
226
228
|
- embulk-core/src/main/java/org/embulk/spi/util/Decoders.java
|
227
229
|
- embulk-core/src/main/java/org/embulk/spi/util/DynamicColumnNotFoundException.java
|
@@ -335,6 +337,7 @@ files:
|
|
335
337
|
- embulk-docs/src/release/release-0.6.16.rst
|
336
338
|
- embulk-docs/src/release/release-0.6.17.rst
|
337
339
|
- embulk-docs/src/release/release-0.6.18.rst
|
340
|
+
- embulk-docs/src/release/release-0.6.19.rst
|
338
341
|
- embulk-docs/src/release/release-0.6.2.rst
|
339
342
|
- embulk-docs/src/release/release-0.6.3.rst
|
340
343
|
- embulk-docs/src/release/release-0.6.4.rst
|
@@ -451,8 +454,8 @@ files:
|
|
451
454
|
- classpath/bval-jsr303-0.5.jar
|
452
455
|
- classpath/commons-beanutils-core-1.8.3.jar
|
453
456
|
- classpath/commons-lang3-3.1.jar
|
454
|
-
- classpath/embulk-core-0.6.
|
455
|
-
- classpath/embulk-standards-0.6.
|
457
|
+
- classpath/embulk-core-0.6.19.jar
|
458
|
+
- classpath/embulk-standards-0.6.19.jar
|
456
459
|
- classpath/guava-18.0.jar
|
457
460
|
- classpath/guice-4.0.jar
|
458
461
|
- classpath/guice-multibindings-4.0.jar
|