Class ConvertFile
java.lang.Object
edu.stanford.slac.archiverappliance.plain.utils.ConvertFile
Utility class to convert a file from one PlainStorageType to another.
This tool is intended for ad-hoc conversions between different storage types (e.g., PB to Parquet).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconvert(Path sourcePath, Path destPath, PlainFileHandler destHandler) Converts a source file to a destination file using the specified destination handler.static voidconvert(Path sourcePath, Path destPath, PlainStorageType destType) Converts a source file to a destination file with the specified storage type.static void
-
Constructor Details
-
ConvertFile
public ConvertFile()
-
-
Method Details
-
main
-
convert
public static void convert(Path sourcePath, Path destPath, PlainStorageType destType) throws Exception Converts a source file to a destination file with the specified storage type.- Parameters:
sourcePath- Path to the source file.destPath- Path to the destination file.destType- The target PlainStorageType.- Throws:
IOException- If an I/O error occurs.Exception
-
convert
public static void convert(Path sourcePath, Path destPath, PlainFileHandler destHandler) throws Exception Converts a source file to a destination file using the specified destination handler.- Parameters:
sourcePath- Path to the source file.destPath- Path to the destination file.destHandler- The handler for the destination file type.- Throws:
Exception- If an error occurs.
-