embulk 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/build.gradle +1 -1
- data/embulk-core/src/main/java/org/embulk/plugin/PluginManager.java +11 -2
- data/embulk-docs/src/conf.py +2 -2
- data/embulk-docs/src/recipe/scheduled-csv-load-to-elasticsearch-kibana4.rst +1 -1
- data/embulk-docs/src/release.rst +1 -0
- data/embulk-docs/src/release/release-0.5.0.rst +8 -0
- data/embulk-docs/src/release/release-0.5.1.rst +13 -0
- data/lib/embulk/command/embulk_run.rb +14 -6
- data/lib/embulk/plugin_registry.rb +5 -8
- data/lib/embulk/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0abe724d59ea2a21922310c9b7a575b612369147
|
4
|
+
data.tar.gz: 753c67c46772c9fd44a7ed46d1deb185a386edba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2632ab7e8c77ffc4d31a4c63c58b2e88cd617dcb2c941e545aa6c51ff75e0909f3bf05faf679b95f176e63a7057c42e07992fcafef8fd5ffc135b5f21008eb3
|
7
|
+
data.tar.gz: 50619880fc999eaa53cf637f5a8fca1f96740b4966280aa83408d55a6b997ab78fc74cfcb213542116f8804bcf20d87b83590ef4dd0e44fdf9309fc9089a8cce
|
data/README.md
CHANGED
@@ -28,7 +28,7 @@ The single-file package is the simplest way to try Embulk. You can download the
|
|
28
28
|
Following 4 commands install embulk to your home directory:
|
29
29
|
|
30
30
|
```
|
31
|
-
curl --create-dirs -o ~/.embulk/bin/embulk -L https://bintray.com/artifact/download/embulk/maven/embulk-0.5.
|
31
|
+
curl --create-dirs -o ~/.embulk/bin/embulk -L https://bintray.com/artifact/download/embulk/maven/embulk-0.5.1.jar
|
32
32
|
chmod +x ~/.embulk/bin/embulk
|
33
33
|
echo 'export PATH="$HOME/.embulk/bin:$PATH"' >> ~/.bashrc
|
34
34
|
source ~/.bashrc
|
@@ -39,7 +39,7 @@ source ~/.bashrc
|
|
39
39
|
You can assume the jar file is a .bat file.
|
40
40
|
|
41
41
|
```
|
42
|
-
|
42
|
+
PowerShell -Command "& {Invoke-WebRequest https://bintray.com/artifact/download/embulk/maven/embulk-0.5.1.jar -OutFile embulk.bat}"
|
43
43
|
```
|
44
44
|
|
45
45
|
### Trying examples
|
data/build.gradle
CHANGED
@@ -35,12 +35,21 @@ public class PluginManager
|
|
35
35
|
} catch (PluginSourceNotMatchException e) {
|
36
36
|
if (e.getCause() != null) {
|
37
37
|
causes.add(e.getCause());
|
38
|
+
} else {
|
39
|
+
causes.add(e);
|
38
40
|
}
|
39
41
|
}
|
40
42
|
}
|
41
43
|
|
42
|
-
|
43
|
-
|
44
|
+
StringBuilder message = new StringBuilder();
|
45
|
+
message.append(String.format("%s '%s' is not found.", iface.getSimpleName(), type.getName()));
|
46
|
+
for (Throwable cause : causes) {
|
47
|
+
if (cause.getMessage() != null) {
|
48
|
+
message.append(String.format("%n"));
|
49
|
+
message.append(cause.getMessage());
|
50
|
+
}
|
51
|
+
}
|
52
|
+
ConfigException e = new ConfigException(message.toString());
|
44
53
|
for (Throwable cause : causes) {
|
45
54
|
e.addSuppressed(cause);
|
46
55
|
}
|
data/embulk-docs/src/conf.py
CHANGED
@@ -53,9 +53,9 @@ copyright = u'2015, Embulk Project'
|
|
53
53
|
# built documents.
|
54
54
|
#
|
55
55
|
# The short X.Y version.
|
56
|
-
version = '0.
|
56
|
+
version = '0.5'
|
57
57
|
# The full version, including alpha/beta/rc tags.
|
58
|
-
release = '0.
|
58
|
+
release = '0.5'
|
59
59
|
|
60
60
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
61
61
|
# for a list of supported languages.
|
@@ -56,7 +56,7 @@ You can find the latest embulk binary from the `releases <https://bintray.com/em
|
|
56
56
|
|
57
57
|
.. code-block:: console
|
58
58
|
|
59
|
-
$ sudo wget https://bintray.com/artifact/download/embulk/maven/embulk-0.5.
|
59
|
+
$ sudo wget https://bintray.com/artifact/download/embulk/maven/embulk-0.5.1.jar -O /usr/local/bin/embulk
|
60
60
|
$ sudo chmod +x /usr/local/bin/embulk
|
61
61
|
|
62
62
|
Step 2. Install Elasticsearch plugin
|
data/embulk-docs/src/release.rst
CHANGED
@@ -18,6 +18,8 @@ Embulk v0.5.0 supports dynamically loadable guess plugins.
|
|
18
18
|
|
19
19
|
* ``guess`` subcommand executes the new guess method and takes the return value of the method.
|
20
20
|
|
21
|
+
Plugins can use new ``Guess::SchemaGuess`` utility class for ease of implementation.
|
22
|
+
|
21
23
|
For example, if you write a parser plugin named ``myparser``, you can use this configuration file first:
|
22
24
|
|
23
25
|
.. code-block:: yaml
|
@@ -51,6 +53,12 @@ The ``embulk guess`` command finds the ``InputPlugin.guess`` of the input plugin
|
|
51
53
|
$ embulk gem install embulk-input-myinput
|
52
54
|
$ embulk guess config.yml -o guessed.yml
|
53
55
|
|
56
|
+
Plugin API
|
57
|
+
------------------
|
58
|
+
|
59
|
+
* Added ``Guess::SchemaGuess`` class. This utility class inputs array of hash objects or array of array objects and returns schema.
|
60
|
+
|
61
|
+
|
54
62
|
Plugin SPI
|
55
63
|
------------------
|
56
64
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Release 0.5.1
|
2
|
+
==================================
|
3
|
+
|
4
|
+
General Changes
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Fixed a problem where embulk wrongly shows "unknown plugin" when a plugin is found but caused LoadError.
|
8
|
+
* Preview, guess and run subcommands show causes of the exception and suppressed exceptions in addition to the stacktrace.
|
9
|
+
* PluginManager includes messages of exceptions from all plugin sources.
|
10
|
+
|
11
|
+
Release Date
|
12
|
+
------------------
|
13
|
+
2015-03-04
|
@@ -135,8 +135,8 @@ categories:
|
|
135
135
|
ruby-filter Ruby record filter plugin (like "add-hostname")
|
136
136
|
#ruby-file-input Ruby file input plugin (like "ftp") # not implemented yet [#21]
|
137
137
|
#ruby-file-output Ruby file output plugin (like "ftp") # not implemented yet [#22]
|
138
|
-
ruby-parser Ruby file parser plugin (like "csv")
|
139
|
-
ruby-formatter Ruby file formatter plugin (like "csv")
|
138
|
+
ruby-parser Ruby file parser plugin (like "csv")
|
139
|
+
ruby-formatter Ruby file formatter plugin (like "csv")
|
140
140
|
#ruby-decoder Ruby file decoder plugin (like "gzip") # not implemented yet [#31]
|
141
141
|
#ruby-encoder Ruby file encoder plugin (like "gzip") # not implemented yet [#32]
|
142
142
|
java-input Java record input plugin (like "mysql")
|
@@ -298,10 +298,7 @@ examples:
|
|
298
298
|
begin
|
299
299
|
org.embulk.command.Runner.new(options.to_json).main(subcmd, argv.to_java(:string))
|
300
300
|
rescue => ex
|
301
|
-
|
302
|
-
ex.backtrace.each do |bt|
|
303
|
-
puts " #{bt}"
|
304
|
-
end
|
301
|
+
print_exception(ex)
|
305
302
|
puts ""
|
306
303
|
puts "Error: #{ex}"
|
307
304
|
raise SystemExit.new(1, ex.to_s)
|
@@ -377,4 +374,15 @@ examples:
|
|
377
374
|
end
|
378
375
|
exit 1
|
379
376
|
end
|
377
|
+
|
378
|
+
def self.print_exception(ex)
|
379
|
+
if ex.respond_to?(:to_java)
|
380
|
+
ex.to_java.printStackTrace(java.lang.System.out)
|
381
|
+
else
|
382
|
+
puts "#{ex.to_s}"
|
383
|
+
ex.backtrace.each do |bt|
|
384
|
+
puts " #{bt}"
|
385
|
+
end
|
386
|
+
end
|
387
|
+
end
|
380
388
|
end
|
@@ -41,22 +41,19 @@ module Embulk
|
|
41
41
|
# TODO: the best code here is to raise exception only if
|
42
42
|
# `name` file is not in $LOAD_PATH.
|
43
43
|
raise e if e.to_s =~ /java.lang.ClassNotFoundException/
|
44
|
+
raise e if $LOAD_PATH.any? {|dir| File.exists? File.join(dir, "#{name}.rb") }
|
44
45
|
end
|
45
46
|
|
46
47
|
# search from $LOAD_PATH
|
47
|
-
|
48
|
+
load_path_files = $LOAD_PATH.map do |lp|
|
48
49
|
lpath = File.expand_path(File.join(lp, "#{name}.rb"))
|
49
50
|
File.exist?(lpath) ? lpath : nil
|
50
51
|
end
|
51
52
|
|
52
|
-
paths =
|
53
|
+
paths = load_path_files.compact.sort # sort to prefer newer version
|
53
54
|
paths.each do |path|
|
54
|
-
|
55
|
-
|
56
|
-
return true
|
57
|
-
rescue LoadError => e
|
58
|
-
raise e if e.to_s =~ /java.lang.ClassNotFoundException/
|
59
|
-
end
|
55
|
+
require path
|
56
|
+
return true
|
60
57
|
end
|
61
58
|
|
62
59
|
# search gems
|
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.5.
|
4
|
+
version: 0.5.1
|
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-03-
|
11
|
+
date: 2015-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -272,6 +272,7 @@ files:
|
|
272
272
|
- embulk-docs/src/release/release-0.4.8.rst
|
273
273
|
- embulk-docs/src/release/release-0.4.9.rst
|
274
274
|
- embulk-docs/src/release/release-0.5.0.rst
|
275
|
+
- embulk-docs/src/release/release-0.5.1.rst
|
275
276
|
- embulk-standards/build.gradle
|
276
277
|
- embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java
|
277
278
|
- embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java
|
@@ -376,8 +377,8 @@ files:
|
|
376
377
|
- classpath/bval-jsr303-0.5.jar
|
377
378
|
- classpath/commons-beanutils-core-1.8.3.jar
|
378
379
|
- classpath/commons-lang3-3.1.jar
|
379
|
-
- classpath/embulk-core-0.5.
|
380
|
-
- classpath/embulk-standards-0.5.
|
380
|
+
- classpath/embulk-core-0.5.1.jar
|
381
|
+
- classpath/embulk-standards-0.5.1.jar
|
381
382
|
- classpath/guava-18.0.jar
|
382
383
|
- classpath/guice-3.0.jar
|
383
384
|
- classpath/guice-multibindings-3.0.jar
|