You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by uc...@apache.org on 2015/03/31 11:36:42 UTC

flink git commit: [FLINK-1806] Improve error message when no S3 access/secret key configured

Repository: flink
Updated Branches:
  refs/heads/master 6b0d40764 -> c0b297573


[FLINK-1806] Improve error message when no S3 access/secret key configured


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

Branch: refs/heads/master
Commit: c0b29757390225d49fccd1f680c87501e7714e32
Parents: 6b0d407
Author: Ufuk Celebi <uc...@apache.org>
Authored: Tue Mar 31 11:33:12 2015 +0200
Committer: Ufuk Celebi <uc...@apache.org>
Committed: Tue Mar 31 11:33:12 2015 +0200

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


http://git-wip-us.apache.org/repos/asf/flink/blob/c0b29757/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 d3eb0e2..522d90e 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
@@ -204,7 +204,9 @@ public final class S3FileSystem extends FileSystem {
 			LOG.debug("Provided URI does not provide an access key to Amazon S3, using configuration...");
 			awsAccessKey = GlobalConfiguration.getString(S3_ACCESS_KEY_KEY, null);
 			if (awsAccessKey == null) {
-				throw new IOException("Cannot determine access key to Amazon S3");
+				throw new IOException("Cannot determine access key to Amazon S3. Please make " +
+						"sure to configure it by setting the configuration key '"
+						+ S3_ACCESS_KEY_KEY + "'.");
 			}
 		}
 
@@ -212,7 +214,9 @@ public final class S3FileSystem extends FileSystem {
 			LOG.debug("Provided URI does not provide a secret key to Amazon S3, using configuration...");
 			awsSecretKey = GlobalConfiguration.getString(S3_SECRET_KEY_KEY, null);
 			if (awsSecretKey == null) {
-				throw new IOException("Cannot determine secret key to Amazon S3");
+				throw new IOException("Cannot determine secret key to Amazon S3. Please make " +
+						"sure to configure it by setting the configuration key '"
+						+ S3_SECRET_KEY_KEY + "'.");
 			}
 		}