Class TableMetadataParser


  • public class TableMetadataParser
    extends java.lang.Object
    • Method Detail

      • internalWrite

        public static void internalWrite​(TableMetadata metadata,
                                         OutputFile outputFile,
                                         boolean overwrite)
      • getFileExtension

        public static java.lang.String getFileExtension​(java.lang.String codecName)
      • toJson

        public static java.lang.String toJson​(TableMetadata metadata)
      • fromJson

        public static TableMetadata fromJson​(FileIO io,
                                             java.lang.String json)
        Read TableMetadata from a JSON string.

        The TableMetadata's metadata file location will be unset.

        Parameters:
        io - a FileIO used by Snapshot instances
        json - a JSON string of table metadata
        Returns:
        a TableMetadata object
      • fromJson

        public static TableMetadata fromJson​(FileIO io,
                                             java.lang.String metadataLocation,
                                             java.lang.String json)
        Read TableMetadata from a JSON string.
        Parameters:
        io - a FileIO used by Snapshot instances
        metadataLocation - metadata location for the returned TableMetadata
        json - a JSON string of table metadata
        Returns:
        a TableMetadata object