Package org.apache.iceberg
Class TableMetadataParser
- java.lang.Object
-
- org.apache.iceberg.TableMetadataParser
-
public class TableMetadataParser extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TableMetadataParser.Codec
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TableMetadata
fromJson(com.fasterxml.jackson.databind.JsonNode node)
static TableMetadata
fromJson(java.lang.String json)
Read TableMetadata from a JSON string.static TableMetadata
fromJson(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, java.lang.String path)
static TableMetadata
read(FileIO io, InputFile file)
static java.lang.String
toJson(TableMetadata metadata)
static void
toJson(TableMetadata metadata, com.fasterxml.jackson.core.JsonGenerator generator)
static void
write(TableMetadata metadata, OutputFile outputFile)
-
-
-
Method Detail
-
overwrite
public static void overwrite(TableMetadata metadata, OutputFile outputFile)
-
write
public static void write(TableMetadata metadata, OutputFile outputFile)
-
internalWrite
public static void internalWrite(TableMetadata metadata, OutputFile outputFile, boolean overwrite)
-
getFileExtension
public static java.lang.String getFileExtension(java.lang.String codecName)
-
getFileExtension
public static java.lang.String getFileExtension(TableMetadataParser.Codec codec)
-
getOldFileExtension
public static java.lang.String getOldFileExtension(TableMetadataParser.Codec codec)
-
toJson
public static java.lang.String toJson(TableMetadata metadata)
-
toJson
public static void toJson(TableMetadata metadata, com.fasterxml.jackson.core.JsonGenerator generator) throws java.io.IOException
- Throws:
java.io.IOException
-
read
public static TableMetadata read(FileIO io, java.lang.String path)
-
read
public static TableMetadata read(FileIO io, InputFile file)
-
fromJson
public static TableMetadata fromJson(java.lang.String json)
Read TableMetadata from a JSON string.The TableMetadata's metadata file location will be unset.
- Parameters:
json
- a JSON string of table metadata- Returns:
- a TableMetadata object
-
fromJson
public static TableMetadata fromJson(java.lang.String metadataLocation, java.lang.String json)
Read TableMetadata from a JSON string.- Parameters:
metadataLocation
- metadata location for the returnedTableMetadata
json
- a JSON string of table metadata- Returns:
- a TableMetadata object
-
fromJson
public static TableMetadata fromJson(com.fasterxml.jackson.databind.JsonNode node)
-
-