embulk-input-remote 0.1.3 → 0.1.4

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: 16eac682d2976b476c1ecfd472a5b1a5cf466a79
4
- data.tar.gz: 8a35909c67a6698da3c2316a334db2359c7829fc
3
+ metadata.gz: e30d0f99dcb958e08afc14b19630f2eab518c01f
4
+ data.tar.gz: 086290764bf8c788db1b8b2e705f9a1eebacb49e
5
5
  SHA512:
6
- metadata.gz: fcccf3be60c766fbf165e33ee3d69d606c09cfee22eb8c0c96cf80fd72c4201fbeb0ac91c1d7999d7d2e4094fe3f4ffdf2b6b1f4d8f76b690d5a02e4e04ab5e1
7
- data.tar.gz: caa457262c61d56ca484aa48d099c81e6e4577411456f1b7a903b398c2bb1198c3139046aa112566fbddc83eb638ffb01d1c96ad66e12f90d0093ae0f2352bb8
6
+ metadata.gz: 186acc6cf0ff2ef037819d0277f24b03760038515bf377334afcfce89918ab1bb8424a0f726047ad9e79bbef138e71c66b5fac78d17e1df420407cc0213e207c
7
+ data.tar.gz: d1090d03a03e2a4708897989dbda36d60d86fd4226a6b7893cc9bb9f72ef11080b7c69f79280c57374a0bc59f3496e64cb69ddcce9f3085d460b59e15d593f8e
data/README.md CHANGED
@@ -15,7 +15,7 @@ This plugin load data from Remote hosts by SCP
15
15
  - **hosts_separator**: Separator for "hosts_command" result (string, default: " ")
16
16
  - **path**: Path of remote host (File or Directory) (string, default: "")
17
17
  - **path_command**: Command for getting path (Windows not supported). If given the option "path" is overwritten. (string, default: null)
18
- - **ignore_not_found_hosts**: If the option is true, Hosts which file(or directory) is not found is skipped. (Means it's not included in resume target.) (boolean, default: false)
18
+ - **ignore_not_found_hosts**: If the option is true, Hosts which is not found file(or directory) or is occurred SSH error are skipped. (Means it's not included in resume target.) (boolean, default: false)
19
19
  - **auth**: SSH authentication setting (hash, default: {})
20
20
  - **user**: SSH username (string, default: execute user)
21
21
  - **type**: public_key or password (string, default: public_key)
@@ -45,7 +45,7 @@ in:
45
45
 
46
46
  ## Note
47
47
  When this plugin run on Linux, task is sometimes blocked.
48
- The cause is java.security.SecureRandom. Solution is the following.
48
+ The cause is java.security.SecureRandom. Please try one of the followings.
49
49
 
50
50
  ### set JVM_OPTION "-Djava.security.egd"
51
51
 
data/build.gradle CHANGED
@@ -13,7 +13,7 @@ configurations {
13
13
  provided
14
14
  }
15
15
 
16
- version = "0.1.3"
16
+ version = "0.1.4"
17
17
 
18
18
  dependencies {
19
19
  compile "org.embulk:embulk-core:0.6.1"
@@ -85,21 +85,16 @@ public class RemoteFileInputPlugin
85
85
  @Override
86
86
  public ConfigDiff transaction(ConfigSource config, FileInputPlugin.Control control) {
87
87
  PluginTask task = config.loadConfig(PluginTask.class);
88
- try {
89
- List<Target> targets = listTargets(task);
90
- log.info("Loading targets {}", targets);
91
- task.setTargets(targets);
92
-
93
- // number of processors is same with number of targets
94
- int taskCount = targets.size();
95
- return resume(task.dump(), taskCount, control);
88
+ List<Target> targets = listTargets(task);
89
+ log.info("Loading targets {}", targets);
90
+ task.setTargets(targets);
96
91
 
97
- } catch (IOException e) {
98
- throw new RuntimeException(e);
99
- }
92
+ // number of processors is same with number of targets
93
+ int taskCount = targets.size();
94
+ return resume(task.dump(), taskCount, control);
100
95
  }
101
96
 
102
- private List<Target> listTargets(PluginTask task) throws IOException {
97
+ private List<Target> listTargets(PluginTask task) {
103
98
  final List<String> hosts = listHosts(task);
104
99
  final String path = getPath(task);
105
100
 
@@ -110,8 +105,13 @@ public class RemoteFileInputPlugin
110
105
 
111
106
  if (lastTarget == null || target.compareTo(lastTarget) > 0) {
112
107
  if (task.getIgnoreNotFoundHosts()) {
113
- // Check with file existing
114
- if (!exists(target, task)) {
108
+ try {
109
+ final boolean exists = exists(target, task);
110
+ if (!exists) {
111
+ continue;
112
+ }
113
+ } catch (IOException e) {
114
+ log.warn("failed to check the file exists. " + target.toString(), e);
115
115
  continue;
116
116
  }
117
117
  }
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-input-remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinichi ISHIMURA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-16 00:00:00.000000000 Z
11
+ date: 2015-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
14
  requirement: !ruby/object:Gem::Requirement
21
15
  requirements:
22
16
  - - ~>
23
17
  - !ruby/object:Gem::Version
24
18
  version: '1.0'
19
+ name: bundler
25
20
  prerelease: false
26
21
  type: :development
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
22
  version_requirements: !ruby/object:Gem::Requirement
30
23
  requirements:
31
- - - '>='
24
+ - - ~>
32
25
  - !ruby/object:Gem::Version
33
- version: '10.0'
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
34
28
  requirement: !ruby/object:Gem::Requirement
35
29
  requirements:
36
30
  - - '>='
37
31
  - !ruby/object:Gem::Version
38
32
  version: '10.0'
33
+ name: rake
39
34
  prerelease: false
40
35
  type: :development
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
41
  description: Reads files stored on Remote hosts by SCP.
42
42
  email:
43
43
  - shiketaudonko41@gmail.com
@@ -59,7 +59,7 @@ files:
59
59
  - src/test/java/org/embulk/input/TestRemoteFileInputPlugin.java
60
60
  - classpath/bcpkix-jdk15on-1.51.jar
61
61
  - classpath/bcprov-jdk15on-1.51.jar
62
- - classpath/embulk-input-remote-0.1.3.jar
62
+ - classpath/embulk-input-remote-0.1.4.jar
63
63
  - classpath/jzlib-1.1.3.jar
64
64
  - classpath/sshj-0.11.0.jar
65
65
  homepage: https://github.com/kamatama41/embulk-input-remote