embulk-output-azure_blob_storage 0.1.5 → 0.1.6

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: 45c7205b0ee914070c15b48038ec9afd82134136
4
- data.tar.gz: 1173936e3234bd114085b28545f1fc6df1e1cec3
3
+ metadata.gz: ccdaca1700220ec52d0b259d437f287606fa6d92
4
+ data.tar.gz: da45aa15412af0702c12c1ffb8dbc01039f81137
5
5
  SHA512:
6
- metadata.gz: 8d19051e9154907145766a16215242996ca51abf3a968d2cfea6861c278f5bcfa6730d9e12fccaa9b97d90d7542bf08a75a8f408889b47c5e7f913c087d26f6f
7
- data.tar.gz: db41bfb30ec06404c9d3d6691f0d2b12cb080f227ca37b2559db10dc4fa0dd2544474b0da7ff65756164c5d65adda6a14889bbd0a54f14280ea128ee4837d65f
6
+ metadata.gz: d97b14a501714e14e7783d1df01930b2a47b465b4ef3a0ed96da435054062a0ca4d4249b65551e57124203aec81bd2ec8c54e41845da781ffb3f6e46caf4a98a
7
+ data.tar.gz: 441367911e739ec536725211a55bc6b776ff27b7a2dec694138dd87f3c74c42a983a447238a31fbd4f9786cbdc2f65d03c48e489298ef3dc4b0a6f893a6901c8
data/.travis.yml CHANGED
@@ -1,5 +1,16 @@
1
1
  language: java
2
+
2
3
  jdk:
3
- - oraclejdk7
4
+ - oraclejdk8
5
+
6
+ env:
7
+ global:
8
+ - AZURE_ACCOUNT_NAME=sakamatest
9
+ - AZURE_CONTAINER=blobcontainers
10
+ - AZURE_CONTAINER_DIRECTORY=unittests
11
+ - secure: "Fi2RdoSEHzTieSs3+Bw6pJ/K3nM3Hwnhdd9qQaXbhVEjTh9ZQ7lEzJj8eJqbItH1Fwh7AlFnZoF587rtHGXRPRjLANSvisiBBXQrPx6knGUq0iK/i0PEia2X3Ki1M6mNLuDzcDex7gWwjDXBVIFW43mM8TJkR/awuJHG/8/Xj7iplxKB6B1lwDVjIdAoMwTeauy3Jcnpute4FwwizxWPqHlPlsRJBEDbyBLsxOVePXT6pxS6o8TJEGN9gP5LVdh62v+9X4cB9+VsQv2imP932wj9UONQBqdjn0kwuvtVEOwCqtGOFVDDxXGozNwz0PWd6FphUB1UNWMg+PrWnvnXnTVC5P+y9YlE/bTnF8aKkRAn4WcRZXQ/vVnLZibisuKCmHV/kswVmMXX+FazYrxUMZmfsyDlPEVsE/l3Bjfhvq9lxAQUjhc17aKDBhrwSs5ZSWlWgBzL0IYumky8S9os+hnZYINXLD7q7QqqBIA7QozCim2S2dPlWDzIBVVY8mQ6zqkr3y4iA/fKPvL7ugwU4l35y+6FcC5TRRN8+RjuCnVrCqU+bBqpHtu8cqVefYeIwaIInRsFCE0fXCA9xO3AfFiB0KDStp3SNi6gYn+IlBcRXqbeQPx/2AtmtTjpf4grT4xJ0YVArF2Fd6Ecl3ZkJ7gZeERGNzwq8hyeLEyYPtE="
12
+
4
13
  script:
5
- - ./gradlew --info check jacocoTestReport
14
+ - ./gradlew gem
15
+ - ./gradlew --info check jacocoTestReport
16
+
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.1.6 - 2018-10-18
2
+ * [maintenance] Fix bug that happens while deleting temporary files on Windows [#12](https://github.com/sakama/embulk-output-azure_blob_storage/pull/12)
3
+
1
4
  ## 0.1.5 - 2016-04-06
2
5
 
3
6
  * [maintenance] Refactoring codes [#8](https://github.com/sakama/embulk-output-azure_blob_storage/pull/8)
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Azure Blob Storage file output plugin for Embulk
2
+ [![Build Status](https://travis-ci.org/embulk/embulk-output-azure_blob_storage.svg?branch=master)](https://travis-ci.org/embulk/embulk-output-azure_blob_storage)
2
3
 
3
4
  [Embulk](http://www.embulk.org/) file output plugin stores files on [Microsoft Azure](https://azure.microsoft.com/) [Blob Storage](https://azure.microsoft.com/en-us/documentation/articles/storage-introduction/#blob-storage)
4
5
 
data/appveyor.yml ADDED
@@ -0,0 +1,25 @@
1
+ version: "{branch} {build}"
2
+
3
+ build:
4
+ verbosity: detailed
5
+
6
+ # To avoid call-selfrun.bat FileNotFound exception, it installs and uses handle.exe as workaround provided by AppVeyor support.
7
+ # see http://help.appveyor.com/discussions/problems/5975-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process
8
+ build_script:
9
+ - gradlew.bat --info --no-daemon check
10
+
11
+ cache:
12
+ - C:\Users\appveyor\.gradle
13
+
14
+ environment:
15
+ matrix:
16
+ - JAVA_HOME: C:\Program Files\Java\jdk1.8.0
17
+ AZURE_ACCOUNT_NAME: sakamatest
18
+ AZURE_CONTAINER: blobcontainers
19
+ AZURE_CONTAINER_DIRECTORY: unittests_appveyor
20
+ # Encrypted value created on AppVeyor console https://ci.appveyor.com/tools/encrypt
21
+ AZURE_ACCOUNT_KEY:
22
+ secure: jrgzEWXOp3+c6r1clT8fRH9ck/aIdnBdVpqQWAwEH/t6w6mGzvBxIt2p0O7dMOowntuIEQBZZ3sIZXT1WzcgGLr11lShl73Y5c93NZJ9oZ7NK1vT4FXaWkRdT4jnAeIn
23
+
24
+ matrix:
25
+ fast_finish: true
data/build.gradle CHANGED
@@ -14,20 +14,20 @@ configurations {
14
14
  provided
15
15
  }
16
16
 
17
- sourceCompatibility = 1.7
18
- targetCompatibility = 1.7
17
+ sourceCompatibility = 1.8
18
+ targetCompatibility = 1.8
19
19
 
20
- version = "0.1.5"
20
+ version = "0.1.6"
21
21
 
22
22
  dependencies {
23
- compile "org.embulk:embulk-core:0.8.2"
24
- provided "org.embulk:embulk-core:0.8.2"
23
+ compile "org.embulk:embulk-core:0.9.8"
24
+ provided "org.embulk:embulk-core:0.9.8"
25
25
 
26
- compile "com.microsoft.azure:azure-storage:4.0.0"
26
+ compile "com.microsoft.azure:azure-storage:8.0.0"
27
27
 
28
28
  testCompile "junit:junit:4.12"
29
- testCompile "org.embulk:embulk-core:0.8.2:tests"
30
- testCompile "org.embulk:embulk-standards:0.8.2"
29
+ testCompile "org.embulk:embulk-core:0.9.8:tests"
30
+ testCompile "org.embulk:embulk-standards:0.9.8"
31
31
  }
32
32
 
33
33
  task classpath(type: Copy, dependsOn: ["jar"]) {
Binary file
@@ -1,6 +1,6 @@
1
- #Wed Jan 13 12:41:02 JST 2016
1
+ #Sun Jan 08 00:35:58 PST 2017
2
2
  distributionBase=GRADLE_USER_HOME
3
3
  distributionPath=wrapper/dists
4
4
  zipStoreBase=GRADLE_USER_HOME
5
5
  zipStorePath=wrapper/dists
6
- distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip
6
+ distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip
data/gradlew.bat CHANGED
@@ -1,90 +1,90 @@
1
- @if "%DEBUG%" == "" @echo off
2
- @rem ##########################################################################
3
- @rem
4
- @rem Gradle startup script for Windows
5
- @rem
6
- @rem ##########################################################################
7
-
8
- @rem Set local scope for the variables with windows NT shell
9
- if "%OS%"=="Windows_NT" setlocal
10
-
11
- @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12
- set DEFAULT_JVM_OPTS=
13
-
14
- set DIRNAME=%~dp0
15
- if "%DIRNAME%" == "" set DIRNAME=.
16
- set APP_BASE_NAME=%~n0
17
- set APP_HOME=%DIRNAME%
18
-
19
- @rem Find java.exe
20
- if defined JAVA_HOME goto findJavaFromJavaHome
21
-
22
- set JAVA_EXE=java.exe
23
- %JAVA_EXE% -version >NUL 2>&1
24
- if "%ERRORLEVEL%" == "0" goto init
25
-
26
- echo.
27
- echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28
- echo.
29
- echo Please set the JAVA_HOME variable in your environment to match the
30
- echo location of your Java installation.
31
-
32
- goto fail
33
-
34
- :findJavaFromJavaHome
35
- set JAVA_HOME=%JAVA_HOME:"=%
36
- set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37
-
38
- if exist "%JAVA_EXE%" goto init
39
-
40
- echo.
41
- echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42
- echo.
43
- echo Please set the JAVA_HOME variable in your environment to match the
44
- echo location of your Java installation.
45
-
46
- goto fail
47
-
48
- :init
49
- @rem Get command-line arguments, handling Windowz variants
50
-
51
- if not "%OS%" == "Windows_NT" goto win9xME_args
52
- if "%@eval[2+2]" == "4" goto 4NT_args
53
-
54
- :win9xME_args
55
- @rem Slurp the command line arguments.
56
- set CMD_LINE_ARGS=
57
- set _SKIP=2
58
-
59
- :win9xME_args_slurp
60
- if "x%~1" == "x" goto execute
61
-
62
- set CMD_LINE_ARGS=%*
63
- goto execute
64
-
65
- :4NT_args
66
- @rem Get arguments from the 4NT Shell from JP Software
67
- set CMD_LINE_ARGS=%$
68
-
69
- :execute
70
- @rem Setup the command line
71
-
72
- set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73
-
74
- @rem Execute Gradle
75
- "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76
-
77
- :end
78
- @rem End local scope for the variables with windows NT shell
79
- if "%ERRORLEVEL%"=="0" goto mainEnd
80
-
81
- :fail
82
- rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83
- rem the _cmd.exe /c_ return code!
84
- if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85
- exit /b 1
86
-
87
- :mainEnd
88
- if "%OS%"=="Windows_NT" endlocal
89
-
90
- :omega
1
+ @if "%DEBUG%" == "" @echo off
2
+ @rem ##########################################################################
3
+ @rem
4
+ @rem Gradle startup script for Windows
5
+ @rem
6
+ @rem ##########################################################################
7
+
8
+ @rem Set local scope for the variables with windows NT shell
9
+ if "%OS%"=="Windows_NT" setlocal
10
+
11
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12
+ set DEFAULT_JVM_OPTS=
13
+
14
+ set DIRNAME=%~dp0
15
+ if "%DIRNAME%" == "" set DIRNAME=.
16
+ set APP_BASE_NAME=%~n0
17
+ set APP_HOME=%DIRNAME%
18
+
19
+ @rem Find java.exe
20
+ if defined JAVA_HOME goto findJavaFromJavaHome
21
+
22
+ set JAVA_EXE=java.exe
23
+ %JAVA_EXE% -version >NUL 2>&1
24
+ if "%ERRORLEVEL%" == "0" goto init
25
+
26
+ echo.
27
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28
+ echo.
29
+ echo Please set the JAVA_HOME variable in your environment to match the
30
+ echo location of your Java installation.
31
+
32
+ goto fail
33
+
34
+ :findJavaFromJavaHome
35
+ set JAVA_HOME=%JAVA_HOME:"=%
36
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37
+
38
+ if exist "%JAVA_EXE%" goto init
39
+
40
+ echo.
41
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42
+ echo.
43
+ echo Please set the JAVA_HOME variable in your environment to match the
44
+ echo location of your Java installation.
45
+
46
+ goto fail
47
+
48
+ :init
49
+ @rem Get command-line arguments, handling Windowz variants
50
+
51
+ if not "%OS%" == "Windows_NT" goto win9xME_args
52
+ if "%@eval[2+2]" == "4" goto 4NT_args
53
+
54
+ :win9xME_args
55
+ @rem Slurp the command line arguments.
56
+ set CMD_LINE_ARGS=
57
+ set _SKIP=2
58
+
59
+ :win9xME_args_slurp
60
+ if "x%~1" == "x" goto execute
61
+
62
+ set CMD_LINE_ARGS=%*
63
+ goto execute
64
+
65
+ :4NT_args
66
+ @rem Get arguments from the 4NT Shell from JP Software
67
+ set CMD_LINE_ARGS=%$
68
+
69
+ :execute
70
+ @rem Setup the command line
71
+
72
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73
+
74
+ @rem Execute Gradle
75
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76
+
77
+ :end
78
+ @rem End local scope for the variables with windows NT shell
79
+ if "%ERRORLEVEL%"=="0" goto mainEnd
80
+
81
+ :fail
82
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83
+ rem the _cmd.exe /c_ return code!
84
+ if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85
+ exit /b 1
86
+
87
+ :mainEnd
88
+ if "%OS%"=="Windows_NT" endlocal
89
+
90
+ :omega
@@ -162,7 +162,7 @@ public class AzureBlobStorageFileOutputPlugin
162
162
  suffix = "." + suffix;
163
163
  }
164
164
  filePath = pathPrefix + String.format(sequenceFormat, taskIndex, fileIndex) + suffix;
165
- file = File.createTempFile(filePath, ".tmp");
165
+ file = Exec.getTempFileSpace().createTempFile(filePath, ".tmp");
166
166
  log.info("Writing local file {}", file.getAbsolutePath());
167
167
  output = new BufferedOutputStream(new FileOutputStream(file));
168
168
  }
@@ -222,9 +222,8 @@ public class AzureBlobStorageFileOutputPlugin
222
222
  log.info("Upload start {} to {}", file.getAbsolutePath(), filePath);
223
223
  blob.upload(new BufferedInputStream(new FileInputStream(file)), file.length());
224
224
  log.info("Upload completed {} to {}", file.getAbsolutePath(), filePath);
225
- log.info("Delete completed local file {}", file.getAbsolutePath());
226
- if (!file.delete()) {
227
- throw new ConfigException("Couldn't delete local file " + file.getAbsolutePath());
225
+ if (file.exists() && !file.delete()) {
226
+ log.warn("Couldn't delete local file " + file.getAbsolutePath());
228
227
  }
229
228
  return null;
230
229
  }
@@ -129,7 +129,8 @@ public class TestAzureBlobStorageFileOutputPlugin
129
129
  @Test
130
130
  public void testTransactionCreateNonexistsContainer() throws Exception
131
131
  {
132
- String container = "non-exists-container";
132
+ // Azure Container can't be created 30 seconds after deletion.
133
+ String container = "non-exists-container-" + System.currentTimeMillis();
133
134
  deleteContainerIfExists(container);
134
135
 
135
136
  assertEquals(false, isExistsContainer(container));
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-azure_blob_storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Satoshi Akama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-06 00:00:00.000000000 Z
11
+ date: 2018-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -49,6 +49,7 @@ files:
49
49
  - .travis.yml
50
50
  - CHANGELOG.md
51
51
  - README.md
52
+ - appveyor.yml
52
53
  - build.gradle
53
54
  - config/checkstyle/checkstyle.xml
54
55
  - config/checkstyle/default.xml
@@ -61,10 +62,11 @@ files:
61
62
  - src/test/java/org/embulk/output/azure_blob_storage/TestAzureBlobStorageFileOutputPlugin.java
62
63
  - src/test/resources/sample_01.csv
63
64
  - src/test/resources/sample_02.csv
64
- - classpath/azure-storage-4.0.0.jar
65
- - classpath/commons-lang3-3.4.jar
66
- - classpath/embulk-output-azure_blob_storage-0.1.5.jar
67
- - classpath/jackson-core-2.6.0.jar
65
+ - classpath/azure-storage-8.0.0.jar
66
+ - classpath/guava-20.0.jar
67
+ - classpath/azure-keyvault-core-1.0.0.jar
68
+ - classpath/jackson-core-2.9.4.jar
69
+ - classpath/embulk-output-azure_blob_storage-0.1.6.jar
68
70
  homepage: https://github.com/embulk/embulk-output-azure_blob_storage
69
71
  licenses:
70
72
  - Apache-2.0