embulk 0.4.7 → 0.4.8
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 +4 -4
- data/.travis.yml +3 -0
- data/README.md +2 -2
- data/bin/embulk +41 -15
- data/build.gradle +9 -3
- data/embulk-core/src/main/java/org/embulk/command/Runner.java +1 -1
- data/embulk-core/src/main/java/org/embulk/command/VerticalPreviewPrinter.java +2 -2
- data/embulk-core/src/main/java/org/embulk/spi/time/JRubyTimeParserHelper.java +1 -1
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampFormatter.java +1 -1
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampParser.java +5 -3
- data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestampFormatterParser.java +19 -4
- data/embulk-docs/src/index.rst +1 -0
- data/embulk-docs/src/recipe.rst +8 -0
- data/embulk-docs/src/recipe/scheduled-csv-load-to-elasticsearch-kibana4.rst +153 -0
- data/embulk-docs/src/release.rst +1 -0
- data/embulk-docs/src/release/release-0.4.8.rst +15 -0
- data/embulk-standards/src/main/java/org/embulk/standards/LocalFileOutputPlugin.java +8 -1
- data/lib/embulk/java/time_helper.rb +2 -2
- 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: ae306d06b0e181d289d3ff6d1117f0275d53d021
|
4
|
+
data.tar.gz: 5aefdda58d812bf753d41a4133e9b5500a88d9d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ef6c84e52dadc846e6f69e0836aaaf8b18c763be94a178ed597e18d07e6583b4533b16366933a798a7391b40f88b459258b0be0255c43ae2e39e2b3666fdcee
|
7
|
+
data.tar.gz: 1808ce0b33520fc998f5bb023ab1a1d109d87152dcdc1994c32becb770178d749a7fe27dfdc27b956f61a6e9c664baeec188f1ebb9fe6e36e6a82d8f5840177a
|
data/.travis.yml
CHANGED
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.4.
|
31
|
+
curl --create-dirs -o ~/.embulk/bin/embulk -L https://bintray.com/artifact/download/embulk/maven/embulk-0.4.8.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
|
-
curl -o embulk.bat -L https://bintray.com/artifact/download/embulk/maven/embulk-0.4.
|
42
|
+
curl -o embulk.bat -L https://bintray.com/artifact/download/embulk/maven/embulk-0.4.8.jar
|
43
43
|
```
|
44
44
|
|
45
45
|
### Trying examples
|
data/bin/embulk
CHANGED
@@ -1,28 +1,47 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
# TODO cygwin check
|
4
|
-
cygwin = false
|
5
|
-
|
6
3
|
java_args = []
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
jruby_args = []
|
5
|
+
default_optimize = false
|
6
|
+
overwrite_optimize = nil
|
7
|
+
|
8
|
+
until ARGV.empty?
|
9
|
+
v = ARGV[0]
|
10
|
+
case v
|
11
|
+
when "-J+O"
|
12
|
+
overwrite_optimize = true
|
13
|
+
ARGV.shift
|
14
|
+
when "-J-O"
|
15
|
+
overwrite_optimize = false
|
16
|
+
ARGV.shift
|
17
|
+
when "-J"
|
18
|
+
prop_path = ARGV[1]
|
10
19
|
unless prop_path
|
11
|
-
STDERR.puts "-
|
20
|
+
STDERR.puts "-J option requires an option"
|
12
21
|
exit 1
|
13
22
|
end
|
14
|
-
|
23
|
+
props = File.read(prop_path)
|
24
|
+
java_props = props.split("\n").reject {|prop| prop.strip.empty? }
|
25
|
+
java_args = java_props + java_args
|
26
|
+
ARGV.shift
|
27
|
+
ARGV.shift
|
28
|
+
when /-J(.*)/
|
29
|
+
java_args << v[2..-1]
|
30
|
+
ARGV.shift
|
31
|
+
when /-R(.*)/
|
32
|
+
jruby_args << v[2..-1]
|
33
|
+
ARGV.shift
|
34
|
+
when "run"
|
35
|
+
default_optimize = true
|
36
|
+
ARGV.shift
|
37
|
+
break
|
15
38
|
else
|
16
|
-
|
17
|
-
ARGV.slice!(i)
|
39
|
+
break
|
18
40
|
end
|
19
41
|
end
|
20
42
|
|
21
|
-
|
22
|
-
|
23
|
-
java_props = props.split("\n").reject {|prop| prop.strip.empty? }
|
24
|
-
java_args = java_props + java_args
|
25
|
-
end
|
43
|
+
# TODO cygwin check
|
44
|
+
cygwin = false
|
26
45
|
|
27
46
|
java_cmd = ENV['JAVACMD']
|
28
47
|
unless java_cmd
|
@@ -50,10 +69,17 @@ unless jruby_complete
|
|
50
69
|
raise SystemExit.new(1)
|
51
70
|
end
|
52
71
|
|
72
|
+
if overwrite_optimize == true || (default_optimize == true && overwrite_optimize != false)
|
73
|
+
java_args = %w[-XX:+AggressiveOpts -XX:+UseConcMarkSweepGC] + java_args
|
74
|
+
else
|
75
|
+
java_args = %w[-XX:+AggressiveOpts -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xverify:none] + java_args
|
76
|
+
end
|
77
|
+
|
53
78
|
# java ... -jar ruby-complete.jar $EMBULK_HOME/lib/embulk/command/embulk.rb "$@"
|
54
79
|
cmdline = [java_cmd]
|
55
80
|
cmdline.concat java_args
|
56
81
|
cmdline << '-jar' << File.join(classpath_dir, jruby_complete)
|
82
|
+
cmdline.concat jruby_args
|
57
83
|
cmdline << File.join(lib_dir, 'embulk/command/embulk.rb')
|
58
84
|
cmdline.concat ARGV
|
59
85
|
exec *cmdline
|
data/build.gradle
CHANGED
@@ -12,7 +12,7 @@ def release_projects = [project(":embulk-core"), project(":embulk-standards")]
|
|
12
12
|
|
13
13
|
allprojects {
|
14
14
|
group = 'org.embulk'
|
15
|
-
version = '0.4.
|
15
|
+
version = '0.4.8'
|
16
16
|
|
17
17
|
apply plugin: 'java'
|
18
18
|
apply plugin: 'maven-publish'
|
@@ -244,8 +244,14 @@ task set_version << {
|
|
244
244
|
File ruby_ver = file('lib/embulk/version.rb')
|
245
245
|
ruby_ver.write(ruby_ver.getText().replaceFirst("VERSION = '(\\d+)(\\.\\d+){2}'", "VERSION = '${to}'"))
|
246
246
|
|
247
|
-
|
248
|
-
|
247
|
+
List<String> docs = [
|
248
|
+
'README.md',
|
249
|
+
'embulk-docs/src/recipe/scheduled-csv-load-to-elasticsearch-kibana4.rst'
|
250
|
+
]
|
251
|
+
docs.each() { path ->
|
252
|
+
File doc = file(path)
|
253
|
+
doc.write(doc.getText().replaceAll('embulk-(\\d+)(\\.\\d+){2}', "embulk-${to}"))
|
254
|
+
}
|
249
255
|
|
250
256
|
file("embulk-docs/src/release/release-${to}.rst").append("")
|
251
257
|
"git add embulk-docs/src/release/release-${to}.rst".execute().waitFor()
|
@@ -158,7 +158,7 @@ public class Runner
|
|
158
158
|
ConfigSource resumeConfig = loadYamlConfig(resumePath);
|
159
159
|
ResumeState resume = resumeConfig.loadConfig(ResumeState.class);
|
160
160
|
|
161
|
-
ExecSession exec = newExecSession(config);
|
161
|
+
//ExecSession exec = newExecSession(config); // not necessary
|
162
162
|
LocalExecutor local = injector.getInstance(LocalExecutor.class);
|
163
163
|
local.cleanup(config, resume);
|
164
164
|
|
@@ -14,7 +14,7 @@ public class VerticalPreviewPrinter
|
|
14
14
|
public VerticalPreviewPrinter(PrintStream out, ModelManager modelManager, Schema schema)
|
15
15
|
{
|
16
16
|
super(out, modelManager, schema);
|
17
|
-
this.format = "%" + maxColumnNameLength(schema) + "s (%" + maxColumnTypeNameLength(schema)+ "s) : %s
|
17
|
+
this.format = "%" + maxColumnNameLength(schema) + "s (%" + maxColumnTypeNameLength(schema)+ "s) : %s%n";
|
18
18
|
}
|
19
19
|
|
20
20
|
private static int maxColumnNameLength(Schema schema)
|
@@ -39,7 +39,7 @@ public class VerticalPreviewPrinter
|
|
39
39
|
protected void printRecord(String[] values) throws IOException
|
40
40
|
{
|
41
41
|
count++;
|
42
|
-
out.format("*************************** %d
|
42
|
+
out.format("*************************** %d ***************************%n", count);
|
43
43
|
for (int i=0; i < schema.getColumnCount(); i++) {
|
44
44
|
out.format(format, schema.getColumnName(i), schema.getColumnType(i), values[i]);
|
45
45
|
}
|
@@ -48,7 +48,7 @@ public class TimestampFormatter
|
|
48
48
|
public String format(Timestamp value)
|
49
49
|
{
|
50
50
|
// TODO optimize by using reused StringBuilder
|
51
|
-
dateFormat.setDateTime(new DateTime(value.
|
51
|
+
dateFormat.setDateTime(new DateTime(value.getEpochSecond()*1000, timeZone));
|
52
52
|
dateFormat.setNSec(value.getNano());
|
53
53
|
return dateFormat.format(null);
|
54
54
|
}
|
@@ -41,7 +41,7 @@ public class TimestampParser
|
|
41
41
|
|
42
42
|
public Timestamp parse(String text) throws TimestampParseException
|
43
43
|
{
|
44
|
-
long
|
44
|
+
long localUsec = helper.strptimeUsec(text);
|
45
45
|
String zone = helper.getZone();
|
46
46
|
|
47
47
|
DateTimeZone timeZone = defaultTimeZone;
|
@@ -53,8 +53,10 @@ public class TimestampParser
|
|
53
53
|
}
|
54
54
|
}
|
55
55
|
|
56
|
-
long
|
56
|
+
long localSec = localUsec / 1000000;
|
57
|
+
long usec = localUsec % 1000000;
|
58
|
+
long sec = timeZone.convertLocalToUTC(localSec*1000, false) / 1000;
|
57
59
|
|
58
|
-
return Timestamp.
|
60
|
+
return Timestamp.ofEpochSecond(sec, usec * 1000);
|
59
61
|
}
|
60
62
|
}
|
@@ -32,21 +32,36 @@ public class TestTimestampFormatterParser
|
|
32
32
|
public void testSimpleFormat() throws Exception
|
33
33
|
{
|
34
34
|
ConfigSource config = Exec.newConfigSource()
|
35
|
-
.set("time_format", "%Y-%m-%d %H:%M:%S %Z");
|
35
|
+
.set("time_format", "%Y-%m-%d %H:%M:%S.%6N %Z");
|
36
36
|
FormatterTestTask task = config.loadConfig(FormatterTestTask.class);
|
37
37
|
|
38
38
|
TimestampFormatter formatter = task.getTimeFormat().newFormatter(task);
|
39
|
-
assertEquals("2014-11-19 02:46:29 UTC", formatter.format(Timestamp.ofEpochSecond(1416365189)));
|
39
|
+
assertEquals("2014-11-19 02:46:29.123456 UTC", formatter.format(Timestamp.ofEpochSecond(1416365189, 123456*1000)));
|
40
40
|
}
|
41
41
|
|
42
42
|
@Test
|
43
43
|
public void testSimpleParse() throws Exception
|
44
44
|
{
|
45
45
|
ConfigSource config = Exec.newConfigSource()
|
46
|
-
.set("time_format", "%Y-%m-%d %H:%M:%S %Z");
|
46
|
+
.set("time_format", "%Y-%m-%d %H:%M:%S.%N %Z");
|
47
47
|
ParserTestTask task = config.loadConfig(ParserTestTask.class);
|
48
48
|
|
49
49
|
TimestampParser parser = task.getTimeFormat().newParser(task);
|
50
|
-
assertEquals(Timestamp.ofEpochSecond(1416365189), parser.parse("2014-11-19 02:46:29 UTC"));
|
50
|
+
assertEquals(Timestamp.ofEpochSecond(1416365189, 123456*1000), parser.parse("2014-11-19 02:46:29.123456 UTC"));
|
51
|
+
}
|
52
|
+
|
53
|
+
@Test
|
54
|
+
public void testUnixtimeFormat() throws Exception
|
55
|
+
{
|
56
|
+
ConfigSource config = Exec.newConfigSource()
|
57
|
+
.set("time_format", "%s");
|
58
|
+
|
59
|
+
FormatterTestTask ftask = config.loadConfig(FormatterTestTask.class);
|
60
|
+
TimestampFormatter formatter = ftask.getTimeFormat().newFormatter(ftask);
|
61
|
+
assertEquals("1416365189", formatter.format(Timestamp.ofEpochSecond(1416365189)));
|
62
|
+
|
63
|
+
ParserTestTask ptask = config.loadConfig(ParserTestTask.class);
|
64
|
+
TimestampParser parser = ptask.getTimeFormat().newParser(ptask);
|
65
|
+
assertEquals(Timestamp.ofEpochSecond(1416365189), parser.parse("1416365189"));
|
51
66
|
}
|
52
67
|
}
|
data/embulk-docs/src/index.rst
CHANGED
@@ -0,0 +1,153 @@
|
|
1
|
+
Scheduled bulk data loading to Elasticsearch + Kibana 4 from CSV files
|
2
|
+
==================================
|
3
|
+
|
4
|
+
.. contents::
|
5
|
+
:local:
|
6
|
+
:depth: 2
|
7
|
+
|
8
|
+
This article shows how to:
|
9
|
+
|
10
|
+
* Bulk load CSV files to Elasticsearch.
|
11
|
+
* Visualize the data with Kibana interactively.
|
12
|
+
* Schedule the data loading every hour using cron.
|
13
|
+
|
14
|
+
This guide assumes you are using Ubuntu 12.0 Precise or Mac OS X.
|
15
|
+
|
16
|
+
Setup Elasticsearch and Kibana 4
|
17
|
+
------------------
|
18
|
+
|
19
|
+
Step 1. Download and start Elasticsearch.
|
20
|
+
~~~~~~~~~~~~~~~~~~
|
21
|
+
|
22
|
+
You can find releases from the `Elasticsearch website <http://www.elasticsearch.org/download/>`_.
|
23
|
+
For the smallest setup, you can unzip the package and run `./bin/elasticsearch` command:
|
24
|
+
|
25
|
+
.. code-block:: console
|
26
|
+
|
27
|
+
$ wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.4.zip
|
28
|
+
$ unzip elasticsearch-1.4.4.zip
|
29
|
+
$ cd elasticsearch-1.4.4
|
30
|
+
$ ./bin/elasticsearch
|
31
|
+
|
32
|
+
Step 2. Download and unzip Kibana:
|
33
|
+
~~~~~~~~~~~~~~~~~~
|
34
|
+
|
35
|
+
You can find releases from the `Kibana website <http://www.elasticsearch.org/overview/kibana/installation/>`_. Open a new console and run following commands:
|
36
|
+
|
37
|
+
.. code-block:: console
|
38
|
+
|
39
|
+
$ wget https://download.elasticsearch.org/kibana/kibana/kibana-4.0.0-linux-x64.tar.gz
|
40
|
+
$ tar zxvf kibana-4.0.0-linux-x64.tar.gz
|
41
|
+
$ cd kibana-4.0.0-linux-x64
|
42
|
+
$ ./bin/kibana
|
43
|
+
|
44
|
+
Note: If you're using Mac OS X, https://download.elasticsearch.org/kibana/kibana/kibana-4.0.0-darwin-x64.tar.gz is the URL to download.
|
45
|
+
|
46
|
+
Now Elasticsearch and Kibana started. Open http://localhost:5601/ using your browser to see the Kibana's graphical interface.
|
47
|
+
|
48
|
+
|
49
|
+
Setup Embulk
|
50
|
+
------------------
|
51
|
+
|
52
|
+
Step 1. Download Embulk binary:
|
53
|
+
~~~~~~~~~~~~~~~~~~
|
54
|
+
|
55
|
+
You can find the latest embulk binary from the `releases <https://bintray.com/embulk/maven/embulk/view#files>`_. Because Embulk is a single executable binary, you can simply download it to /usr/local/bin directory and set executable flag as following:
|
56
|
+
|
57
|
+
.. code-block:: console
|
58
|
+
|
59
|
+
$ sudo wget https://bintray.com/artifact/download/embulk/maven/embulk-0.4.8.jar -O /usr/local/bin/embulk
|
60
|
+
$ sudo chmod +x /usr/local/bin/embulk
|
61
|
+
|
62
|
+
Step 2. Install Elasticsearch plugin
|
63
|
+
~~~~~~~~~~~~~~~~~~
|
64
|
+
|
65
|
+
You also need Elasticsearch plugin for Embulk. You can install the plugin with this command:
|
66
|
+
|
67
|
+
.. code-block:: console
|
68
|
+
|
69
|
+
$ embulk gem install embulk-output-elasticsearch
|
70
|
+
|
71
|
+
Embulk includes CSV file reader in itself. Now everything is ready to use.
|
72
|
+
|
73
|
+
Loading a CSV file
|
74
|
+
------------------
|
75
|
+
|
76
|
+
Assuming you have a CSV files at ``./mydata/csv/`` directory. If you don't have CSV files, you can create ones using ``embulk example ./mydata`` command.
|
77
|
+
|
78
|
+
Create this configuration file and save as ``config.yml``:
|
79
|
+
|
80
|
+
.. code-block:: yaml
|
81
|
+
|
82
|
+
in:
|
83
|
+
type: file
|
84
|
+
path_prefix: ./mydata/csv/
|
85
|
+
out:
|
86
|
+
type: elasticsearch
|
87
|
+
index_name: embulk
|
88
|
+
index_type: embulk
|
89
|
+
nodes:
|
90
|
+
- host: localhost
|
91
|
+
|
92
|
+
In fact, this configuration lacks some important information. However, embulk guesses the other information. So, next step is to order embulk to guess them:
|
93
|
+
|
94
|
+
.. code-block:: console
|
95
|
+
|
96
|
+
$ embulk guess config.yml -o config-complete.yml
|
97
|
+
|
98
|
+
The generated config-complete.yml file should include complete information as following:
|
99
|
+
|
100
|
+
.. code-block:: yaml
|
101
|
+
|
102
|
+
in:
|
103
|
+
type: file
|
104
|
+
path_prefix: ./mydata/csv/
|
105
|
+
decoders:
|
106
|
+
- {type: gzip}
|
107
|
+
parser:
|
108
|
+
charset: UTF-8
|
109
|
+
newline: CRLF
|
110
|
+
type: csv
|
111
|
+
delimiter: ','
|
112
|
+
quote: '"'
|
113
|
+
escape: ''
|
114
|
+
null_string: 'NULL'
|
115
|
+
header_line: true
|
116
|
+
columns:
|
117
|
+
- {name: id, type: long}
|
118
|
+
- {name: account, type: long}
|
119
|
+
- {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
120
|
+
- {name: purchase, type: timestamp, format: '%Y%m%d'}
|
121
|
+
- {name: comment, type: string}
|
122
|
+
out:
|
123
|
+
type: elasticsearch
|
124
|
+
index_name: embulk
|
125
|
+
index_type: embulk
|
126
|
+
nodes:
|
127
|
+
- {host: localhost}
|
128
|
+
|
129
|
+
Now, you can run the bulk loading:
|
130
|
+
|
131
|
+
.. code-block:: console
|
132
|
+
|
133
|
+
$ embulk run config-complete.yml -o next-config.yml
|
134
|
+
|
135
|
+
Scheduling loading by cron
|
136
|
+
------------------
|
137
|
+
|
138
|
+
At the last step, you ran embulk command with ``-o next-config.yml`` file. The ``next-config.yml`` file should include a parameter named ``last_path``:
|
139
|
+
|
140
|
+
.. code-block:: yaml
|
141
|
+
|
142
|
+
last_path: mydata/csv/sample_01.csv.gz
|
143
|
+
|
144
|
+
With this configuration, embulk loads the files newer than this file in alphabetical order.
|
145
|
+
|
146
|
+
For example, if you create ``./mydata/csv/sample_02.csv.gz`` file, embulk skips ``sample_01.csv.gz`` file and loads ``sample_02.csv.gz`` only next time. And the next next-config.yml file has ``last_path: mydata/csv/sample_02.csv.gz`` for the next next execution.
|
147
|
+
|
148
|
+
So, if you want to loads newly created files every day, you can setup this cron schedule:
|
149
|
+
|
150
|
+
.. code-block:: cron
|
151
|
+
|
152
|
+
0 * * * * embulk run /path/to/next-config.yml -o /path/to/next-config.yml
|
153
|
+
|
data/embulk-docs/src/release.rst
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
Release 0.4.8
|
2
|
+
==================================
|
3
|
+
|
4
|
+
General Changes
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* ``spi.time.TimestampParser`` supports microseconds.
|
8
|
+
* ``spi.time.TimestampFormatter`` supports milliseconds, microseconds and nanoseconds.
|
9
|
+
* Fixed a bug at ``spi.time.TimestampParser`` that returns wrong timestamp if format string is ``%s`` which means epoch seconds (@hiroyuki-sato++)
|
10
|
+
* ``embulk`` command installed by ``gem install embulk`` sets JVM optimization flags. This behavior is same with embulk.jar updated since 0.4.6.
|
11
|
+
* ``preview`` subcommand with ``-G, --vertical`` option uses CRLF on Windows
|
12
|
+
|
13
|
+
Release Date
|
14
|
+
------------------
|
15
|
+
2015-02-24
|
@@ -7,7 +7,10 @@ import java.io.IOException;
|
|
7
7
|
import java.io.OutputStream;
|
8
8
|
import java.util.ArrayList;
|
9
9
|
import java.util.List;
|
10
|
+
import java.util.Locale;
|
11
|
+
import java.util.IllegalFormatException;
|
10
12
|
import org.embulk.config.Config;
|
13
|
+
import org.embulk.config.ConfigException;
|
11
14
|
import org.embulk.config.ConfigDefault;
|
12
15
|
import org.embulk.config.ConfigSource;
|
13
16
|
import org.embulk.config.ConfigDiff;
|
@@ -46,7 +49,11 @@ public class LocalFileOutputPlugin
|
|
46
49
|
PluginTask task = config.loadConfig(PluginTask.class);
|
47
50
|
|
48
51
|
// validate sequence_format
|
49
|
-
|
52
|
+
try {
|
53
|
+
String dontCare = String.format(Locale.ENGLISH, task.getSequenceFormat(), 0, 0);
|
54
|
+
} catch (IllegalFormatException ex) {
|
55
|
+
throw new ConfigException("Invalid sequence_format: parameter for file output plugin", ex);
|
56
|
+
}
|
50
57
|
|
51
58
|
return resume(task.dump(), taskCount, control);
|
52
59
|
}
|
@@ -23,7 +23,7 @@ module Embulk
|
|
23
23
|
end
|
24
24
|
|
25
25
|
# Override
|
26
|
-
def
|
26
|
+
def strptimeUsec(text)
|
27
27
|
hash = Date._strptime(text, @format_string)
|
28
28
|
unless hash
|
29
29
|
raise Java::TimestampParseException.new
|
@@ -64,7 +64,7 @@ module Embulk
|
|
64
64
|
|
65
65
|
@zone = zone
|
66
66
|
time = Time.utc(year, mon, day, hour, min, sec, usec)
|
67
|
-
return time.tv_sec *
|
67
|
+
return time.tv_sec * 1_000_000 + time.tv_usec
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
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.4.
|
4
|
+
version: 0.4.8
|
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-02-
|
11
|
+
date: 2015-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -248,6 +248,8 @@ files:
|
|
248
248
|
- embulk-docs/push-gh-pages.sh
|
249
249
|
- embulk-docs/src/conf.py
|
250
250
|
- embulk-docs/src/index.rst
|
251
|
+
- embulk-docs/src/recipe.rst
|
252
|
+
- embulk-docs/src/recipe/scheduled-csv-load-to-elasticsearch-kibana4.rst
|
251
253
|
- embulk-docs/src/release.rst
|
252
254
|
- embulk-docs/src/release/release-0.1.0.rst
|
253
255
|
- embulk-docs/src/release/release-0.2.0.rst
|
@@ -263,6 +265,7 @@ files:
|
|
263
265
|
- embulk-docs/src/release/release-0.4.5.rst
|
264
266
|
- embulk-docs/src/release/release-0.4.6.rst
|
265
267
|
- embulk-docs/src/release/release-0.4.7.rst
|
268
|
+
- embulk-docs/src/release/release-0.4.8.rst
|
266
269
|
- embulk-standards/build.gradle
|
267
270
|
- embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java
|
268
271
|
- embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java
|
@@ -363,8 +366,8 @@ files:
|
|
363
366
|
- classpath/bval-jsr303-0.5.jar
|
364
367
|
- classpath/commons-beanutils-core-1.8.3.jar
|
365
368
|
- classpath/commons-lang3-3.1.jar
|
366
|
-
- classpath/embulk-core-0.4.
|
367
|
-
- classpath/embulk-standards-0.4.
|
369
|
+
- classpath/embulk-core-0.4.8.jar
|
370
|
+
- classpath/embulk-standards-0.4.8.jar
|
368
371
|
- classpath/guava-18.0.jar
|
369
372
|
- classpath/guice-3.0.jar
|
370
373
|
- classpath/guice-multibindings-3.0.jar
|