use of org.apache.flink.fs.gs.GSFileSystemOptions in project flink by apache.
the class GSRecoverableWriterCommitterTest method before.
@Before
public void before() {
Configuration flinkConfig = new Configuration();
if (temporaryBucketName != null) {
flinkConfig.set(GSFileSystemOptions.WRITER_TEMPORARY_BUCKET_NAME, temporaryBucketName);
}
options = new GSFileSystemOptions(flinkConfig);
random = new Random();
random.setSeed(TestUtils.RANDOM_SEED);
blobStorage = new MockBlobStorage();
blobIdentifier = new GSBlobIdentifier("foo", "bar");
expectedBytes = new ByteArrayOutputStream();
}
use of org.apache.flink.fs.gs.GSFileSystemOptions in project flink by apache.
the class GSRecoverableWriterTest method before.
@Before
public void before() {
MockBlobStorage storage = new MockBlobStorage();
blobIdentifier = new GSBlobIdentifier("foo", "bar");
Configuration flinkConfig = new Configuration();
options = new GSFileSystemOptions(flinkConfig);
writer = new GSRecoverableWriter(storage, options);
componentObjectIds = new ArrayList<UUID>();
for (int i = 0; i < componentCount; i++) {
componentObjectIds.add(UUID.randomUUID());
}
resumeRecoverable = new GSResumeRecoverable(blobIdentifier, componentObjectIds, position, closed);
commitRecoverable = new GSCommitRecoverable(blobIdentifier, componentObjectIds);
}
use of org.apache.flink.fs.gs.GSFileSystemOptions in project flink by apache.
the class BlobUtilsTest method shouldProperlyConstructTemporaryBlobIdentifierWithTemporaryBucket.
@Test
public void shouldProperlyConstructTemporaryBlobIdentifierWithTemporaryBucket() {
Configuration flinkConfig = new Configuration();
flinkConfig.set(GSFileSystemOptions.WRITER_TEMPORARY_BUCKET_NAME, "temp");
GSFileSystemOptions options = new GSFileSystemOptions(flinkConfig);
GSBlobIdentifier identifier = new GSBlobIdentifier("foo", "bar");
UUID temporaryObjectId = UUID.fromString("f09c43e5-ea49-4537-a406-0586f8f09d47");
GSBlobIdentifier temporaryBlobIdentifier = BlobUtils.getTemporaryBlobIdentifier(identifier, temporaryObjectId, options);
assertEquals("temp", temporaryBlobIdentifier.bucketName);
assertEquals(".inprogress/foo/bar/f09c43e5-ea49-4537-a406-0586f8f09d47", temporaryBlobIdentifier.objectName);
}
Aggregations