Search in sources :

Example 1 with PrestoS3FileSystem

use of com.facebook.presto.hive.s3.PrestoS3FileSystem in project flink by apache.

the class PrestoS3FileSystemTest method validateBasicCredentials.

// ------------------------------------------------------------------------
// utilities
// ------------------------------------------------------------------------
private static void validateBasicCredentials(FileSystem fs) throws Exception {
    assertTrue(fs instanceof FlinkS3FileSystem);
    org.apache.hadoop.fs.FileSystem hadoopFs = ((FlinkS3FileSystem) fs).getHadoopFileSystem();
    assertTrue(hadoopFs instanceof PrestoS3FileSystem);
    try (PrestoS3FileSystem prestoFs = (PrestoS3FileSystem) hadoopFs) {
        AWSCredentialsProvider provider = getAwsCredentialsProvider(prestoFs);
        assertTrue(provider instanceof AWSStaticCredentialsProvider);
    }
}
Also used : AWSStaticCredentialsProvider(com.amazonaws.auth.AWSStaticCredentialsProvider) FlinkS3FileSystem(org.apache.flink.fs.s3.common.FlinkS3FileSystem) PrestoS3FileSystem(com.facebook.presto.hive.s3.PrestoS3FileSystem) AWSCredentialsProvider(com.amazonaws.auth.AWSCredentialsProvider)

Aggregations

AWSCredentialsProvider (com.amazonaws.auth.AWSCredentialsProvider)1 AWSStaticCredentialsProvider (com.amazonaws.auth.AWSStaticCredentialsProvider)1 PrestoS3FileSystem (com.facebook.presto.hive.s3.PrestoS3FileSystem)1 FlinkS3FileSystem (org.apache.flink.fs.s3.common.FlinkS3FileSystem)1