Example usage for org.apache.hadoop.fs.s3a S3AUtils translateException

List of usage examples for org.apache.hadoop.fs.s3a S3AUtils translateException

Introduction

In this page you can find the example usage for org.apache.hadoop.fs.s3a S3AUtils translateException.

Prototype

@SuppressWarnings("ThrowableInstanceNeverThrown")
public static IOException translateException(@Nullable String operation, String path,
        SdkBaseException exception) 

Source Link

Document

Translate an exception raised in an operation into an IOException.

Usage

From source file:org.apache.flink.fs.s3hadoop.HadoopS3AccessHelper.java

License:Apache License

@Override
public ObjectMetadata getObjectMetadata(String key) throws IOException {
    try {/*from   w w  w .  j  a va 2s.c  o m*/
        return s3a.getObjectMetadata(new Path('/' + key));
    } catch (SdkBaseException e) {
        throw S3AUtils.translateException("getObjectMetadata", key, e);
    }
}