Search in sources :

Example 6 with MockBlobStorage

use of org.apache.flink.fs.gs.storage.MockBlobStorage 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);
}
Also used : Configuration(org.apache.flink.configuration.Configuration) GSBlobIdentifier(org.apache.flink.fs.gs.storage.GSBlobIdentifier) MockBlobStorage(org.apache.flink.fs.gs.storage.MockBlobStorage) UUID(java.util.UUID) GSFileSystemOptions(org.apache.flink.fs.gs.GSFileSystemOptions) Before(org.junit.Before)

Aggregations

MockBlobStorage (org.apache.flink.fs.gs.storage.MockBlobStorage)6 Configuration (org.apache.flink.configuration.Configuration)4 GSBlobIdentifier (org.apache.flink.fs.gs.storage.GSBlobIdentifier)4 Before (org.junit.Before)4 Random (java.util.Random)3 GSFileSystemOptions (org.apache.flink.fs.gs.GSFileSystemOptions)3 GSBlobStorage (org.apache.flink.fs.gs.storage.GSBlobStorage)2 Test (org.junit.Test)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 UUID (java.util.UUID)1 Path (org.apache.flink.core.fs.Path)1