public class TableMetadataParser
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TableMetadataParser.Codec |
Modifier and Type | Method and Description |
---|---|
static TableMetadata |
fromJson(FileIO io,
java.lang.String json)
Read TableMetadata from a JSON string.
|
static TableMetadata |
fromJson(FileIO io,
java.lang.String metadataLocation,
java.lang.String json)
Read TableMetadata from a JSON string.
|
static java.lang.String |
getFileExtension(java.lang.String codecName) |
static java.lang.String |
getFileExtension(TableMetadataParser.Codec codec) |
static java.lang.String |
getOldFileExtension(TableMetadataParser.Codec codec) |
static void |
internalWrite(TableMetadata metadata,
OutputFile outputFile,
boolean overwrite) |
static void |
overwrite(TableMetadata metadata,
OutputFile outputFile) |
static TableMetadata |
read(FileIO io,
InputFile file) |
static TableMetadata |
read(FileIO io,
java.lang.String path) |
static java.lang.String |
toJson(TableMetadata metadata) |
static void |
write(TableMetadata metadata,
OutputFile outputFile) |
public static void overwrite(TableMetadata metadata, OutputFile outputFile)
public static void write(TableMetadata metadata, OutputFile outputFile)
public static void internalWrite(TableMetadata metadata, OutputFile outputFile, boolean overwrite)
public static java.lang.String getFileExtension(java.lang.String codecName)
public static java.lang.String getFileExtension(TableMetadataParser.Codec codec)
public static java.lang.String getOldFileExtension(TableMetadataParser.Codec codec)
public static java.lang.String toJson(TableMetadata metadata)
public static TableMetadata read(FileIO io, java.lang.String path)
public static TableMetadata read(FileIO io, InputFile file)
public static TableMetadata fromJson(FileIO io, java.lang.String json)
The TableMetadata's metadata file location will be unset.
io
- a FileIO used by Snapshot
instancesjson
- a JSON string of table metadatapublic static TableMetadata fromJson(FileIO io, java.lang.String metadataLocation, java.lang.String json)
io
- a FileIO used by Snapshot
instancesmetadataLocation
- metadata location for the returned TableMetadata
json
- a JSON string of table metadata