embulk 0.7.0 → 0.7.1

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: c6b45b793c322d59468c3d388e09313718a55de7
4
- data.tar.gz: d34278276b5b486c18fd365382a817b1227772b9
3
+ metadata.gz: 326eaaf38d4c941202486e516d30384f7e536abb
4
+ data.tar.gz: e017c2ee071139ebd4d1af63021fd08d7bb18226
5
5
  SHA512:
6
- metadata.gz: 103dd7e4b4f913ea106fa0d9161e0876234c6f726e21eaca87994094006876f75990fc84d0350dcf2cf1c73570094e8208ce6db56bb6e249ce341ca4e447e5fd
7
- data.tar.gz: 305595f0a9bf0a887b6f7eba813df88f6950f011afc82915fe9e88e9eb1bac83adf11bfde0dffa054dd59411eaf2c66149fd1eab8c0b8256f9dc22c08b23d786
6
+ metadata.gz: 95581d98106ba22022063f27f1c3a17f682b20bdc9709ea6e315847595634fce0471806d0abf2876f07f9c3e8bc30b60b379db655ceb892cca8c370ec4610ae2
7
+ data.tar.gz: 3e6e89b78cdc595aee32baa570d530c1d0acc45cb6865ed4416254737bf9583d157157cc1ff8e79ac5132c22b6fd25853892e3342eb689217c5144f3d6e08e3d
@@ -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.7.0'
19
+ version = '0.7.1'
20
20
 
21
21
  ext {
22
22
  jrubyVersion = '9.0.0.0'
@@ -2,6 +2,7 @@ package org.embulk.config;
2
2
 
3
3
  public class ConfigException
4
4
  extends RuntimeException
5
+ implements UserDataException
5
6
  {
6
7
  public ConfigException(String message)
7
8
  {
@@ -0,0 +1,4 @@
1
+ package org.embulk.config;
2
+
3
+ public interface UserDataException
4
+ { }
@@ -0,0 +1,17 @@
1
+ package org.embulk.config;
2
+
3
+ public class UserDataExceptions
4
+ {
5
+ private UserDataExceptions() { }
6
+
7
+ public boolean isUserDataException(Throwable exception)
8
+ {
9
+ while (exception != null) {
10
+ if (exception instanceof UserDataException) {
11
+ return true;
12
+ }
13
+ exception = exception.getCause();
14
+ }
15
+ return false;
16
+ }
17
+ }
@@ -0,0 +1,23 @@
1
+ package org.embulk.spi;
2
+
3
+ import org.embulk.config.UserDataException;
4
+
5
+ public class DataException
6
+ extends RuntimeException
7
+ implements UserDataException
8
+ {
9
+ public DataException(String message)
10
+ {
11
+ super(message);
12
+ }
13
+
14
+ public DataException(Throwable cause)
15
+ {
16
+ super(cause);
17
+ }
18
+
19
+ public DataException(String message, Throwable cause)
20
+ {
21
+ super(message, cause);
22
+ }
23
+ }
@@ -1,7 +1,10 @@
1
1
  package org.embulk.spi.time;
2
2
 
3
+ import org.embulk.config.UserDataException;
4
+
3
5
  public class TimestampParseException
4
6
  extends Exception
7
+ implements UserDataException
5
8
  {
6
9
  public TimestampParseException(String message)
7
10
  {
@@ -4,6 +4,7 @@ Release Notes
4
4
  .. toctree::
5
5
  :maxdepth: 1
6
6
 
7
+ release/release-0.7.1
7
8
  release/release-0.7.0
8
9
  release/release-0.6.25
9
10
  release/release-0.6.24
@@ -0,0 +1,22 @@
1
+ Release 0.7.1
2
+ ==================================
3
+
4
+ General Changes
5
+ ------------------
6
+
7
+ * Fixed ``no such file to load`` error when embulk is installed as a single jar file.
8
+
9
+ Java API
10
+ ------------------
11
+
12
+ * Added exception class ``DataException`` and exception tag interface ``UserDataExceptoin``. If those exceptions are thrown, applications are suggested not to retry this bulk load because retried bulk import will fail again unless user's input data is fixed.
13
+
14
+ Ruby API
15
+ ------------------
16
+
17
+ * ``ConfigError`` includes org.embulk.config.UserDataExceptoin interface.
18
+
19
+
20
+ Release Date
21
+ ------------------
22
+ 2015-08-18
@@ -22,6 +22,7 @@ import org.embulk.spi.ParserPlugin;
22
22
  import org.embulk.spi.Exec;
23
23
  import org.embulk.spi.FileInput;
24
24
  import org.embulk.spi.PageOutput;
25
+ import org.embulk.spi.DataException;
25
26
  import org.embulk.spi.util.LineDecoder;
26
27
  import org.embulk.spi.util.Timestamps;
27
28
  import org.slf4j.Logger;
@@ -369,7 +370,7 @@ public class CsvParserPlugin
369
370
  }
370
371
 
371
372
  static class CsvRecordValidateException
372
- extends RuntimeException
373
+ extends DataException
373
374
  {
374
375
  CsvRecordValidateException(Throwable cause)
375
376
  {
@@ -5,6 +5,7 @@ import java.util.List;
5
5
  import java.util.ArrayList;
6
6
  import java.util.Deque;
7
7
  import java.util.ArrayDeque;
8
+ import org.embulk.spi.DataException;
8
9
  import org.embulk.spi.util.LineDecoder;
9
10
 
10
11
  public class CsvTokenizer
@@ -365,7 +366,7 @@ public class CsvTokenizer
365
366
  }
366
367
 
367
368
  public static class InvalidFormatException
368
- extends RuntimeException
369
+ extends DataException
369
370
  {
370
371
  public InvalidFormatException(String message)
371
372
  {
@@ -374,7 +375,7 @@ public class CsvTokenizer
374
375
  }
375
376
 
376
377
  public static class InvalidValueException
377
- extends RuntimeException
378
+ extends DataException
378
379
  {
379
380
  public InvalidValueException(String message)
380
381
  {
@@ -31,7 +31,11 @@ module Embulk
31
31
  if __FILE__.include?("!")
32
32
  # single jar
33
33
  jar, resource = __FILE__.split("!", 2)
34
- require jar
34
+ begin
35
+ require File.expand_path(jar)
36
+ rescue LoadError
37
+ # TODO fails if jar doesn't end with ".rb" or ".jar" but ignorable
38
+ end
35
39
 
36
40
  elsif __FILE__ =~ /^classpath:/
37
41
  # already in classpath
@@ -1,6 +1,15 @@
1
1
 
2
2
  module Embulk
3
+ module UserDataError
4
+ include Java::Config::UserDataException
5
+ end
6
+
3
7
  class ConfigError < StandardError
8
+ include UserDataError
9
+ end
10
+
11
+ class DataError < StandardError
12
+ include UserDataError
4
13
  end
5
14
 
6
15
  class PluginLoadError < StandardError
@@ -1,3 +1,3 @@
1
1
  module Embulk
2
- VERSION = '0.7.0'
2
+ VERSION = '0.7.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
@@ -121,8 +121,8 @@ files:
121
121
  - classpath/bval-jsr303-0.5.jar
122
122
  - classpath/commons-beanutils-core-1.8.3.jar
123
123
  - classpath/commons-lang3-3.1.jar
124
- - classpath/embulk-core-0.7.0.jar
125
- - classpath/embulk-standards-0.7.0.jar
124
+ - classpath/embulk-core-0.7.1.jar
125
+ - classpath/embulk-standards-0.7.1.jar
126
126
  - classpath/guava-18.0.jar
127
127
  - classpath/guice-4.0.jar
128
128
  - classpath/guice-multibindings-4.0.jar
@@ -174,6 +174,8 @@ files:
174
174
  - embulk-core/src/main/java/org/embulk/config/TaskSource.java
175
175
  - embulk-core/src/main/java/org/embulk/config/TaskValidationException.java
176
176
  - embulk-core/src/main/java/org/embulk/config/TaskValidator.java
177
+ - embulk-core/src/main/java/org/embulk/config/UserDataException.java
178
+ - embulk-core/src/main/java/org/embulk/config/UserDataExceptions.java
177
179
  - embulk-core/src/main/java/org/embulk/exec/BulkLoader.java
178
180
  - embulk-core/src/main/java/org/embulk/exec/ExecModule.java
179
181
  - embulk-core/src/main/java/org/embulk/exec/ExecutionInterruptedException.java
@@ -226,6 +228,7 @@ files:
226
228
  - embulk-core/src/main/java/org/embulk/spi/Column.java
227
229
  - embulk-core/src/main/java/org/embulk/spi/ColumnConfig.java
228
230
  - embulk-core/src/main/java/org/embulk/spi/ColumnVisitor.java
231
+ - embulk-core/src/main/java/org/embulk/spi/DataException.java
229
232
  - embulk-core/src/main/java/org/embulk/spi/DecoderPlugin.java
230
233
  - embulk-core/src/main/java/org/embulk/spi/EncoderPlugin.java
231
234
  - embulk-core/src/main/java/org/embulk/spi/Exec.java
@@ -414,6 +417,7 @@ files:
414
417
  - embulk-docs/src/release/release-0.6.8.rst
415
418
  - embulk-docs/src/release/release-0.6.9.rst
416
419
  - embulk-docs/src/release/release-0.7.0.rst
420
+ - embulk-docs/src/release/release-0.7.1.rst
417
421
  - embulk-standards/build.gradle
418
422
  - embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java
419
423
  - embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java