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

The following examples show how to use org.apache.flink.fs.s3.common.FlinkS3FileSystem. 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 File: PrestoS3FileSystemTest.java    From Flink-CEPplus with 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 File: PrestoS3FileSystemTest.java    From flink with 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 File: PrestoS3FileSystemTest.java    From flink with 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
Source File: PrestoS3RecoverableWriterTest.java    From Flink-CEPplus with 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 #5
Source File: PrestoS3RecoverableWriterTest.java    From flink with 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 File: PrestoS3RecoverableWriterTest.java    From flink with 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();
}