Java Code Examples for org.apache.flink.fs.s3.common.FlinkS3FileSystem

The following examples show how to use org.apache.flink.fs.s3.common.FlinkS3FileSystem. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Flink-CEPplus   Source File: PrestoS3FileSystemTest.java    License: Apache License 2.0 5 votes vote down vote up
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);
	}
}
 
Example 2
Source Project: flink   Source File: PrestoS3FileSystemTest.java    License: Apache License 2.0 5 votes vote down vote up
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);
	}
}
 
Example 3
Source Project: flink   Source File: PrestoS3FileSystemTest.java    License: Apache License 2.0 5 votes vote down vote up
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);
	}
}
 
Example 4
@Test(expected = UnsupportedOperationException.class)
public void requestingRecoverableWriterShouldThroughException() throws Exception {
	URI s3Uri = URI.create(S3TestCredentials.getTestBucketUri());
	FlinkS3FileSystem fileSystem = (FlinkS3FileSystem) FileSystem.get(s3Uri);
	fileSystem.createRecoverableWriter();
}
 
Example 5
Source Project: flink   Source File: PrestoS3RecoverableWriterTest.java    License: Apache License 2.0 4 votes vote down vote up
@Test(expected = UnsupportedOperationException.class)
public void requestingRecoverableWriterShouldThroughException() throws Exception {
	URI s3Uri = URI.create(S3TestCredentials.getTestBucketUri());
	FlinkS3FileSystem fileSystem = (FlinkS3FileSystem) FileSystem.get(s3Uri);
	fileSystem.createRecoverableWriter();
}
 
Example 6
Source Project: flink   Source File: PrestoS3RecoverableWriterTest.java    License: Apache License 2.0 4 votes vote down vote up
@Test(expected = UnsupportedOperationException.class)
public void requestingRecoverableWriterShouldThroughException() throws Exception {
	URI s3Uri = URI.create(S3TestCredentials.getTestBucketUri());
	FlinkS3FileSystem fileSystem = (FlinkS3FileSystem) FileSystem.get(s3Uri);
	fileSystem.createRecoverableWriter();
}