embulk-executor-remoteserver 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 471122040cf026eb287627d106e4b7b014bde970
4
- data.tar.gz: cda196374b2e6737d73bbccb3ec5e33826cf8f45
3
+ metadata.gz: c4ea491089752939f80cdb185fbb49c98231bf7b
4
+ data.tar.gz: d548b330992af638341e655560886af6e9e05703
5
5
  SHA512:
6
- metadata.gz: 0bba4418aaf83000aec6cad419e32c28eef1598a2a25441400e165527b5558956df2d28d7bd6a1eb1fb3c19a5d7f961470b7c5fd5a3dc42b5ca6315f5ba50a58
7
- data.tar.gz: 8f28f104c3d2ba6424e5534adc62b95be593433cf77ad3a70bd4703263f6974e3fa72ed8afffed0390b3334b398c9817089efaaab2e9c8851e7f12f8ad7c66ce
6
+ metadata.gz: 6269c634253213e86af20e1803eedf139369704bbcc31e4e86238fa7c1debabe94eac04784267f1074703364a82b746601524d779e4e86fc7898749db0b5d14b
7
+ data.tar.gz: 6d0fd99dc49c4d1ff750fb4987946b5bfe9cfe2ad8c2bced5f6b95c61c79a94b5e5ef4e61882f7b25a8a6545c8c82b6cb7729e343ae75403965065db1751c125
data/README.md CHANGED
@@ -6,6 +6,10 @@ Embulk executor plugin to run plugins on remote server.
6
6
 
7
7
  * **Plugin type**: executor
8
8
 
9
+ ### Notes
10
+ - It's still very experimental version, so might change its spec without notification.
11
+ - It might have performance issues or bugs. I would appreciate it if you use this and give me reports/feedback!
12
+
9
13
  ## Configuration
10
14
 
11
15
  - **hosts**: List of remote servers. If not specified, the executor runs as local mode, which start Embulk server on its own process (array of string)
@@ -22,6 +26,13 @@ exec:
22
26
  timeout_seconds: 86400
23
27
  ```
24
28
 
29
+ ## Running Embulk server as Docker container
30
+ Its image is hosted by [DockerHub](https://cloud.docker.com/repository/docker/kamatama41/embulk-executor-remoteserver)
31
+ You can try running Embulk server by the following command.
32
+
33
+ ```sh
34
+ $ docker run --rm -p 30001:30001 kamatama41/embulk-executor-remoteserver
35
+ ```
25
36
 
26
37
  ## Build
27
38
 
data/gradle.properties CHANGED
@@ -1 +1 @@
1
- version=0.1.0
1
+ version=0.1.1
@@ -79,6 +79,7 @@ class Session implements AutoCloseable {
79
79
  }
80
80
 
81
81
  private void runTask(int taskIndex) throws InterruptedException {
82
+ long startTime = System.currentTimeMillis();
82
83
  bufferMap.putIfAbsent(taskIndex, new LinkedList<>());
83
84
  try {
84
85
  Executors.process(session, processTask, taskIndex, new Executors.ProcessStateCallback() {
@@ -116,7 +117,7 @@ class Session implements AutoCloseable {
116
117
 
117
118
  // Flush buffer if remaining
118
119
  int waitSeconds = 10;
119
- while (!buffer.isEmpty()) {
120
+ while (!buffer.isEmpty() && (System.currentTimeMillis() - startTime) <= pluginTask.getTimeoutSeconds() * 1000) {
120
121
  if (connection.isOpen()) {
121
122
  flushBuffer(taskIndex, connection);
122
123
  return;
@@ -124,6 +125,7 @@ class Session implements AutoCloseable {
124
125
  log.warn("Connection is closed, wait {} seconds until reconnected.", waitSeconds);
125
126
  TimeUnit.SECONDS.sleep(waitSeconds);
126
127
  }
128
+ log.warn("Connection was not able to be available again.");
127
129
  }
128
130
 
129
131
  void updateConnection(Connection connection) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-executor-remoteserver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinichi Ishimura
@@ -51,7 +51,7 @@ files:
51
51
  - LICENSE
52
52
  - README.md
53
53
  - build.gradle
54
- - classpath/embulk-executor-remoteserver-0.1.0.jar
54
+ - classpath/embulk-executor-remoteserver-0.1.1.jar
55
55
  - classpath/msgpack-core-0.8.16.jar
56
56
  - classpath/nsocket-0.2.10.jar
57
57
  - classpath/slf4j-api-1.7.26.jar