embulk-input-bigquery_extract_files 0.0.11 → 0.0.12
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/build.gradle +1 -1
- data/src/main/java/org/embulk/input/bigquery_export_gcs/BigqueryExportGcsFileInputPlugin.java +5 -10
- data/src/main/java/org/embulk/input/bigquery_export_gcs/BigqueryExportUtils.java +0 -2
- data/src/test/java/org/embulk/input/bigquery_export_gcs/TestGoogleCloudAccessData.java +2 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: debc8d2786db90b41c8e777dc32665299aa3200b
|
4
|
+
data.tar.gz: e14e906f62b553b73f1beaad28a615ae96f9ce76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfa41fc406217af65e6d99009013d1c6d0f367ea1f8639fef7160449f6e54a1312b5ce6ef5fbc76dabf7735e5ea0b5937445cb51255940a1184338f9bc9a9265
|
7
|
+
data.tar.gz: 40b6ea3bb6bfad97302efac14e435698113bc6c463221aac50d6c3a991203ae53e0b0cbd731c9a9d21bb6916179f504c0dc108fa3cc4519eaa3226806a5cd524
|
data/build.gradle
CHANGED
data/src/main/java/org/embulk/input/bigquery_export_gcs/BigqueryExportGcsFileInputPlugin.java
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
package org.embulk.input.bigquery_export_gcs;
|
2
2
|
|
3
|
-
import java.io
|
4
|
-
import java.io.FileNotFoundException;
|
5
|
-
import java.io.IOException;
|
6
|
-
import java.io.InputStream;
|
3
|
+
import java.io.*;
|
7
4
|
import java.nio.file.Path;
|
8
5
|
import java.util.List;
|
9
6
|
|
@@ -29,8 +26,6 @@ import org.slf4j.Logger;
|
|
29
26
|
import com.google.api.services.bigquery.Bigquery;
|
30
27
|
import com.google.common.base.Optional;
|
31
28
|
|
32
|
-
import io.airlift.slice.RuntimeIOException;
|
33
|
-
|
34
29
|
/**
|
35
30
|
*
|
36
31
|
*
|
@@ -202,7 +197,7 @@ public class BigqueryExportGcsFileInputPlugin implements FileInputPlugin
|
|
202
197
|
log.info("create local downlaod path : {}", localPath);
|
203
198
|
boolean ok = localPath.mkdirs();
|
204
199
|
if(!ok){
|
205
|
-
throw new
|
200
|
+
throw new UncheckedIOException (new IOException("local path create fail : " + localPath));
|
206
201
|
}
|
207
202
|
}
|
208
203
|
}
|
@@ -254,7 +249,7 @@ public class BigqueryExportGcsFileInputPlugin implements FileInputPlugin
|
|
254
249
|
BigqueryExportUtils.executeQueryToDestinationWorkTable(bigquery, task);
|
255
250
|
} catch (IOException e) {
|
256
251
|
log.error("bigquery io error",e);
|
257
|
-
throw new
|
252
|
+
throw new UncheckedIOException(e);
|
258
253
|
} catch (InterruptedException e) {
|
259
254
|
log.error("bigquery job error",e);
|
260
255
|
throw new RuntimeException(e);
|
@@ -268,7 +263,7 @@ public class BigqueryExportGcsFileInputPlugin implements FileInputPlugin
|
|
268
263
|
return schema;
|
269
264
|
} catch (IOException e) {
|
270
265
|
log.error("bigquery io error",e);
|
271
|
-
throw new
|
266
|
+
throw new UncheckedIOException (e);
|
272
267
|
} catch (InterruptedException e) {
|
273
268
|
log.error("bigquery job error",e);
|
274
269
|
throw new RuntimeException(e);
|
@@ -284,7 +279,7 @@ public class BigqueryExportGcsFileInputPlugin implements FileInputPlugin
|
|
284
279
|
return BigqueryExportUtils.getFileListFromGcs(task);
|
285
280
|
} catch (IOException e) {
|
286
281
|
log.error("GCS api call error");
|
287
|
-
throw new
|
282
|
+
throw new UncheckedIOException (e);
|
288
283
|
}
|
289
284
|
|
290
285
|
}
|
@@ -20,10 +20,8 @@ public class TestGoogleCloudAccessData extends UnitTestInitializer
|
|
20
20
|
plugin.executeBigqueryApi(task);
|
21
21
|
|
22
22
|
InputStream ins = BigqueryExportUtils.openInputStream(task, task.getFiles().get(0));
|
23
|
-
|
24
|
-
|
25
|
-
log.info("file size : {}",b.length);
|
26
|
-
log.info("file cont : {}",new String(b));
|
23
|
+
|
24
|
+
log.info("file size : {}",org.apache.commons.compress.utils.IOUtils.toByteArray(ins).length);
|
27
25
|
}
|
28
26
|
|
29
27
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-bigquery_extract_files
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jo8937
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -65,7 +65,7 @@ files:
|
|
65
65
|
- src/test/java/org/embulk/input/bigquery_export_gcs/UnitTestInitializer.java
|
66
66
|
- classpath/animal-sniffer-annotations-1.14.jar
|
67
67
|
- classpath/checker-compat-qual-2.5.2.jar
|
68
|
-
- classpath/embulk-input-bigquery_extract_files-0.0.
|
68
|
+
- classpath/embulk-input-bigquery_extract_files-0.0.12.jar
|
69
69
|
- classpath/error_prone_annotations-2.1.3.jar
|
70
70
|
- classpath/google-api-client-1.25.0.jar
|
71
71
|
- classpath/google-api-services-bigquery-v2-rev429-1.25.0.jar
|