embulk 0.8.2 → 0.8.3

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: e49862e13c81831477cfed94aea2db310b8bc51c
4
- data.tar.gz: 9b59130a3b0ceca8d4980a7c32e979d84f7b5ab1
3
+ metadata.gz: 4548bdb9a7472a0a1f86ef346f85a0229a433111
4
+ data.tar.gz: bc5e863271a2fb217584a76618a7c9eac6706c05
5
5
  SHA512:
6
- metadata.gz: e8d58a7659d4445c83534859d5cf8043099877b03e1544be8f531b6a644ebfd116de970ac38d92558310ed19991aa476e1a4f96a829382a0692ac57b506b1fb1
7
- data.tar.gz: 52e734f97666ea28f4a3f6564f7f74001d35f85e59a0b4cf3c6f9aa3c77902ac06438184b13ee44b906ecd5760b01361f799d967167617d2a7c19f1020ce7cb2
6
+ metadata.gz: b47331b6a147ac624727a0e3da414c8e95cc7d74a022bdd174426572386349ecd76c2ef38ad8bdb3bf1e51e6c58967a87e4e67bb7db4f498bc4143f39799f6ee
7
+ data.tar.gz: 98ce9c0581f425d516d057124ee1ea435726a1447e37e8416f36635801cca3fef32d50f719cbe1e95803e7229fd950b835290dace22cbcdb6f87b3327c332cd7
data/build.gradle CHANGED
@@ -16,7 +16,7 @@ def release_projects = [project(":embulk-core"), project(":embulk-standards")]
16
16
 
17
17
  allprojects {
18
18
  group = 'org.embulk'
19
- version = '0.8.2'
19
+ version = '0.8.3'
20
20
 
21
21
  ext {
22
22
  jrubyVersion = '9.0.4.0'
@@ -1,5 +1,7 @@
1
1
  package org.embulk.exec;
2
2
 
3
+ import static java.util.Locale.ENGLISH;
4
+
3
5
  public class SetCurrentThreadName
4
6
  implements AutoCloseable
5
7
  {
@@ -8,7 +10,8 @@ public class SetCurrentThreadName
8
10
  public SetCurrentThreadName(String name)
9
11
  {
10
12
  this.original = Thread.currentThread().getName();
11
- Thread.currentThread().setName(name);
13
+ Thread thread = Thread.currentThread();
14
+ thread.setName(String.format(ENGLISH, "%04d:", thread.getId()) + name);
12
15
  }
13
16
 
14
17
  @Override
@@ -134,7 +134,6 @@ public class InputStreamFileInput
134
134
 
135
135
  public Buffer poll()
136
136
  {
137
- // TODO check current != null and throw Illegal State - file is not opened
138
137
  if (current == null) {
139
138
  throw new IllegalStateException("nextFile() must be called before poll()");
140
139
  }
@@ -410,14 +410,14 @@ Example
410
410
  ...
411
411
  formatter:
412
412
  type: csv
413
- delimiter: '\t'
413
+ delimiter: "\t"
414
414
  newline: CRLF
415
415
  newline_in_field: LF
416
416
  charset: UTF-8
417
417
  quote_policy: MINIMAL
418
418
  quote: '"'
419
- escape: '\\'
420
- null_string: '\\N'
419
+ escape: "\\"
420
+ null_string: "\\N"
421
421
  default_timezone: 'UTC'
422
422
  column_options:
423
423
  mycol1: {format: '%Y-%m-%d %H:%M:%S'}
@@ -4,9 +4,11 @@ Release Notes
4
4
  .. toctree::
5
5
  :maxdepth: 1
6
6
 
7
+ release/release-0.8.3
7
8
  release/release-0.8.2
8
9
  release/release-0.8.1
9
10
  release/release-0.8.0
11
+ release/release-0.7.11
10
12
  release/release-0.7.10
11
13
  release/release-0.7.9
12
14
  release/release-0.7.8
@@ -0,0 +1,12 @@
1
+ Release 0.7.11
2
+ ==================================
3
+
4
+ General Changes
5
+ ------------------
6
+
7
+ * Added a workaround for https://github.com/jruby/jruby/issues/3652
8
+
9
+
10
+ Release Date
11
+ ------------------
12
+ 2016-02-08
@@ -0,0 +1,15 @@
1
+ Release 0.8.3
2
+ ==================================
3
+
4
+ General Changes
5
+ ------------------
6
+
7
+ * Fixed unexpected error when ``-c`` option is set and file doesn't exist yet (@hiroyuki-sato++)
8
+ * Added a workaround for https://github.com/jruby/jruby/issues/3652
9
+ * Adds thread ID to thread name so that stacktrace shown by SIGQUIT can distinguish multiple threads running the same stage (transaction, guess, preview).
10
+ * Embulk::Guess::SchemaGuess returns ``"json"`` type if a given value is a Hash or Array.
11
+
12
+
13
+ Release Date
14
+ ------------------
15
+ 2016-02-08
@@ -37,7 +37,7 @@ module Embulk::Guess
37
37
  def types_from_array_records(samples)
38
38
  columnar_types = []
39
39
  samples.each do |record|
40
- record.each_with_index {|value,i| (columnar_types[i] ||= []) << guess_type(value.to_s) }
40
+ record.each_with_index {|value,i| (columnar_types[i] ||= []) << guess_type(value) }
41
41
  end
42
42
  columnar_types.map {|types| merge_types(types) }
43
43
  end
@@ -45,6 +45,11 @@ module Embulk::Guess
45
45
  private
46
46
 
47
47
  def guess_type(str)
48
+ if str.is_a?(Hash) || str.is_a?(Array)
49
+ return "json"
50
+ end
51
+ str = str.to_s
52
+
48
53
  if TRUE_STRINGS[str] || FALSE_STRINGS[str]
49
54
  return "boolean"
50
55
  end
@@ -58,8 +58,10 @@ module Embulk
58
58
 
59
59
  # search gems
60
60
  if defined?(::Gem::Specification) && ::Gem::Specification.respond_to?(:find_all)
61
- specs = Gem::Specification.find_all do |spec|
62
- spec.contains_requirable_file? name
61
+ specs = Kernel::RUBYGEMS_ACTIVATION_MONITOR.synchronize do # this lock is added as a workaround of https://github.com/jruby/jruby/issues/3652
62
+ Gem::Specification.find_all do |spec|
63
+ spec.contains_requirable_file? name
64
+ end
63
65
  end
64
66
 
65
67
  # prefer newer version
@@ -78,10 +80,12 @@ module Embulk
78
80
  def require_and_show(path, spec=nil)
79
81
  require path
80
82
  unless spec
81
- name, spec = Gem.loaded_specs.find {|name,spec|
82
- #spec.files.include?(path)
83
- spec.contains_requirable_file?(path)
84
- }
83
+ name, spec = Kernel::RUBYGEMS_ACTIVATION_MONITOR.synchronize do # this lock is added as a workaround of https://github.com/jruby/jruby/issues/3652
84
+ Gem.loaded_specs.find {|name,spec|
85
+ #spec.files.include?(path)
86
+ spec.contains_requirable_file?(path)
87
+ }
88
+ end
85
89
  end
86
90
  if spec
87
91
  unless @loaded_gems[spec.name]
data/lib/embulk/runner.rb CHANGED
@@ -61,7 +61,7 @@ module Embulk
61
61
  check_file_writable(config_diff_path)
62
62
  check_file_writable(resume_state_path)
63
63
 
64
- if config_diff_path
64
+ if config_diff_path && File.size(config_diff_path) > 0
65
65
  lastConfigDiff = read_config(config_diff_path, options)
66
66
  configSource = configSource.merge(lastConfigDiff)
67
67
  end
@@ -1,3 +1,3 @@
1
1
  module Embulk
2
- VERSION = '0.8.2'
2
+ VERSION = '0.8.3'
3
3
  end
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.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-01 00:00:00.000000000 Z
11
+ date: 2016-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jruby-jars
@@ -107,8 +107,8 @@ files:
107
107
  - classpath/bval-jsr303-0.5.jar
108
108
  - classpath/commons-beanutils-core-1.8.3.jar
109
109
  - classpath/commons-lang3-3.1.jar
110
- - classpath/embulk-core-0.8.2.jar
111
- - classpath/embulk-standards-0.8.2.jar
110
+ - classpath/embulk-core-0.8.3.jar
111
+ - classpath/embulk-standards-0.8.3.jar
112
112
  - classpath/guava-18.0.jar
113
113
  - classpath/guice-4.0.jar
114
114
  - classpath/guice-bootstrap-0.1.1.jar
@@ -409,6 +409,7 @@ files:
409
409
  - embulk-docs/src/release/release-0.7.0.rst
410
410
  - embulk-docs/src/release/release-0.7.1.rst
411
411
  - embulk-docs/src/release/release-0.7.10.rst
412
+ - embulk-docs/src/release/release-0.7.11.rst
412
413
  - embulk-docs/src/release/release-0.7.2.rst
413
414
  - embulk-docs/src/release/release-0.7.3.rst
414
415
  - embulk-docs/src/release/release-0.7.4.rst
@@ -420,6 +421,7 @@ files:
420
421
  - embulk-docs/src/release/release-0.8.0.rst
421
422
  - embulk-docs/src/release/release-0.8.1.rst
422
423
  - embulk-docs/src/release/release-0.8.2.rst
424
+ - embulk-docs/src/release/release-0.8.3.rst
423
425
  - embulk-standards/build.gradle
424
426
  - embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java
425
427
  - embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java