[
https://issues.apache.org/jira/browse/FLINK-9996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16563419#comment-16563419
]
ASF GitHub Bot commented on FLINK-9996:
---------------------------------------
zentol closed pull request #6454: [FLINK-9996][fs] Wrap exceptions during FS
creation
URL: https://github.com/apache/flink/pull/6454
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/AbstractFileSystemFactory.java
b/flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/AbstractFileSystemFactory.java
index 201d58049bc..63919bab452 100644
---
a/flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/AbstractFileSystemFactory.java
+++
b/flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/AbstractFileSystemFactory.java
@@ -51,10 +51,16 @@ public void configure(Configuration config) {
public FileSystem create(URI fsUri) throws IOException {
LOG.debug("Creating Hadoop file system (backed by " + name +
")");
LOG.debug("Loading Hadoop configuration for " + name);
- org.apache.hadoop.conf.Configuration hadoopConfig =
hadoopConfigLoader.getOrLoadHadoopConfig();
- org.apache.hadoop.fs.FileSystem fs = createHadoopFileSystem();
- fs.initialize(getInitURI(fsUri, hadoopConfig), hadoopConfig);
- return new HadoopFileSystem(fs);
+ try {
+ org.apache.hadoop.conf.Configuration hadoopConfig =
hadoopConfigLoader.getOrLoadHadoopConfig();
+ org.apache.hadoop.fs.FileSystem fs =
createHadoopFileSystem();
+ fs.initialize(getInitURI(fsUri, hadoopConfig),
hadoopConfig);
+ return new HadoopFileSystem(fs);
+ } catch (IOException ioe) {
+ throw ioe;
+ } catch (Exception e) {
+ throw new IOException(e.getMessage(), e);
+ }
}
protected abstract org.apache.hadoop.fs.FileSystem
createHadoopFileSystem();
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> PrestoS3FileSystemITCase#testConfigKeysForwarding fails on travis
> -----------------------------------------------------------------
>
> Key: FLINK-9996
> URL: https://issues.apache.org/jira/browse/FLINK-9996
> Project: Flink
> Issue Type: Bug
> Components: FileSystem, Tests
> Affects Versions: 1.6.0
> Reporter: Chesnay Schepler
> Assignee: Chesnay Schepler
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.6.0
>
>
> https://travis-ci.org/apache/flink/jobs/409590482
> {code}
> Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.838 sec <<<
> FAILURE! - in org.apache.flink.fs.s3presto.PrestoS3FileSystemITCase
> testConfigKeysForwarding(org.apache.flink.fs.s3presto.PrestoS3FileSystemITCase)
> Time elapsed: 1.613 sec <<< ERROR!
> java.lang.RuntimeException: S3 credentials not configured
> at
> com.facebook.presto.hive.PrestoS3FileSystem.getAwsCredentialsProvider(PrestoS3FileSystem.java:702)
> at
> com.facebook.presto.hive.PrestoS3FileSystem.createAmazonS3Client(PrestoS3FileSystem.java:628)
> at
> com.facebook.presto.hive.PrestoS3FileSystem.initialize(PrestoS3FileSystem.java:212)
> at
> org.apache.flink.runtime.fs.hdfs.AbstractFileSystemFactory.create(AbstractFileSystemFactory.java:56)
> at
> org.apache.flink.core.fs.FileSystem.getUnguardedFileSystem(FileSystem.java:395)
> at org.apache.flink.core.fs.FileSystem.get(FileSystem.java:318)
> at org.apache.flink.core.fs.Path.getFileSystem(Path.java:298)
> at
> org.apache.flink.fs.s3presto.PrestoS3FileSystemITCase.testConfigKeysForwarding(PrestoS3FileSystemITCase.java:84)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)