Class ValidateAndFixPBFile

java.lang.Object
edu.stanford.slac.archiverappliance.plain.utils.ValidateAndFixPBFile

public class ValidateAndFixPBFile extends Object
Validate every line in a PB file by unmarshalling it and accessing the timestamp. If there are any exceptions, then copy only the events that can be unmarshalled correctly and are monotonically sequenced correctly to a temporary file and then replace the original file with the temporary file. If the -b option is specified; then the original file is moved to a new file with a .bak. extension.
Author:
mshankar
  • Constructor Details

    • ValidateAndFixPBFile

      public ValidateAndFixPBFile()
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Parameters:
      args -  
      Throws:
      Exception -  
    • fixPBFile

      public static void fixPBFile(Path path, boolean verboseMode, boolean makeBackups, PlainFileHandler handler)