You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by al...@apache.org on 2014/11/10 18:19:44 UTC

incubator-flink git commit: Make sure S3 directory paths are suffixed with '/' on creation

Repository: incubator-flink
Updated Branches:
  refs/heads/master 81c5b2ade -> 65d035939


Make sure S3 directory paths are suffixed with '/' on creation


Project: http://git-wip-us.apache.org/repos/asf/incubator-flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-flink/commit/65d03593
Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/65d03593
Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/65d03593

Branch: refs/heads/master
Commit: 65d035939daea785c5f40cbe10950b4efa9b6b72
Parents: 81c5b2a
Author: Aljoscha Krettek <al...@gmail.com>
Authored: Thu Nov 6 16:16:40 2014 +0100
Committer: Aljoscha Krettek <al...@gmail.com>
Committed: Mon Nov 10 16:56:08 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/flink/runtime/fs/s3/S3FileSystem.java   | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/65d03593/flink-runtime/src/main/java/org/apache/flink/runtime/fs/s3/S3FileSystem.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/fs/s3/S3FileSystem.java b/flink-runtime/src/main/java/org/apache/flink/runtime/fs/s3/S3FileSystem.java
index 60b1e7f..603b53a 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/fs/s3/S3FileSystem.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/fs/s3/S3FileSystem.java
@@ -762,6 +762,15 @@ public final class S3FileSystem extends FileSystem {
 
 		throw new UnsupportedOperationException("This method is not yet implemented");
 	}
+
+	@Override
+	public boolean initOutPathDistFS(Path outPath, WriteMode writeMode, boolean createDirectory) throws IOException {
+		if (createDirectory) {
+			// make sure that the path is terminated with a slash, S3 is very particular about this
+			outPath = outPath.suffix("/");
+		}
+		return super.initOutPathDistFS(outPath, writeMode, createDirectory);
+	}
 	
 	@Override
 	public boolean isDistributedFS() {