public class RenamingSnapshotCommit extends Object implements SnapshotCommit
SnapshotCommit
using file renaming to commit.
Note that when the file system is local or HDFS, rename is atomic. But if the file system is object storage, we need additional lock protection.
Modifier and Type | Class and Description |
---|---|
static class |
RenamingSnapshotCommit.Factory
Factory to create
RenamingSnapshotCommit . |
Constructor and Description |
---|
RenamingSnapshotCommit(SnapshotManager snapshotManager,
Lock lock) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
commit(Snapshot snapshot,
String branch) |
public RenamingSnapshotCommit(SnapshotManager snapshotManager, Lock lock)
public boolean commit(Snapshot snapshot, String branch) throws Exception
commit
in interface SnapshotCommit
Exception
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.