public class ConsistencyChecker extends Object implements Closeable
FileStore
for inconsistency and
reporting that latest consistent revision.Constructor and Description |
---|
ConsistencyChecker(File directory,
long debugInterval)
Create a new consistency checker instance
|
Modifier and Type | Method and Description |
---|---|
String |
check(String revision,
Set<String> paths,
long binLen)
Check whether the nodes and all its properties of all given
paths are consistent at the given revision . |
static String |
checkConsistency(File directory,
String journalFileName,
boolean fullTraversal,
long debugInterval,
long binLen)
Run a consistency check.
|
void |
close() |
String |
traverse(String revision,
long binLen)
Travers the given
revision |
public ConsistencyChecker(File directory, long debugInterval) throws IOException, InvalidFileStoreVersionException
directory
- directory containing the tar filesdebugInterval
- number of seconds between printing progress information to
the console during the full traversal phase.IOException
InvalidFileStoreVersionException
public static String checkConsistency(File directory, String journalFileName, boolean fullTraversal, long debugInterval, long binLen) throws IOException, InvalidFileStoreVersionException
directory
- directory containing the tar filesjournalFileName
- name of the journal file containing the revision historyfullTraversal
- full traversal consistency check if true
. Only try
to access the root node otherwise.debugInterval
- number of seconds between printing progress information to
the console during the full traversal phase.binLen
- number of bytes to read from binary properties. -1 for all.IOException
InvalidFileStoreVersionException
public String check(String revision, Set<String> paths, long binLen)
paths
are consistent at the given revision
.revision
- revision to checkpaths
- paths to checkbinLen
- number of bytes to read from binary properties. -1 for all.null
if none.public String traverse(String revision, long binLen)
revision
revision
- revision to traversbinLen
- number of bytes to read from binary properties. -1 for all.public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2012-2019 The Apache Software Foundation. All Rights Reserved.