Skip to content

Commit

Permalink
[FLINK-23630][tests] Make EventTimeWindowCheckpointingITCase run on W…
Browse files Browse the repository at this point in the history
…indows.

This fixes the creation of Paths to be properly platform independent.
  • Loading branch information
StephanEwen committed Aug 16, 2021
1 parent 31b45fc commit c84ebe8
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ private Configuration getConfiguration() throws Exception {
break;
case FILE:
{
String backups = tempFolder.newFolder().getAbsolutePath();
this.stateBackend = new FsStateBackend("file:https://" + backups);
final File backups = tempFolder.newFolder().getAbsoluteFile();
this.stateBackend = new FsStateBackend(Path.fromLocalFile(backups));
break;
}
case ROCKSDB_FULL:
Expand Down Expand Up @@ -216,14 +216,13 @@ private void setupRocksDB(
TaskManagerOptions.MANAGED_MEMORY_SIZE,
MemorySize.ofMebiBytes(PARALLELISM / NUM_OF_TASK_MANAGERS * 64));

String rocksDb = tempFolder.newFolder().getAbsolutePath();
String backups = tempFolder.newFolder().getAbsolutePath();
final String rocksDb = tempFolder.newFolder().getAbsolutePath();
final File backups = tempFolder.newFolder().getAbsoluteFile();
// we use the fs backend with small threshold here to test the behaviour with file
// references, not self contained byte handles
RocksDBStateBackend rdb =
new RocksDBStateBackend(
new FsStateBackend(
new Path("file:https://" + backups).toUri(), fileSizeThreshold),
new FsStateBackend(Path.fromLocalFile(backups).toUri(), fileSizeThreshold),
incrementalCheckpoints);
rdb.setDbStoragePath(rocksDb);
this.stateBackend = rdb;
Expand Down

0 comments on commit c84ebe8

Please sign in to comment.