Package org.apache.druid.catalog.model
Class TableMetadata
java.lang.Object
org.apache.druid.catalog.model.TableMetadata
REST API level description of a table. Tables have multiple types
as described by subclasses. Stores the operational aspects of a
table, such as its name, creation time, state and spec.
Doubles as a "holder" of partial collections of table metadata internally. For example, in the "edit" operation, the id and a partial spec will be available, the other fields are implicitly unset. The set of provided fields is implicit in the code that uses the object. (Providing partial information avoids the need to query the DB for information that won't actually be used.)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumState of the metadata table entry (not necessarily of the underlying datasource.) A table entry will be Active normally. -
Constructor Summary
ConstructorsConstructorDescriptionTableMetadata(TableId tableId, long creationTime, long updateTime, TableMetadata.TableState state, TableSpec spec) -
Method Summary
Modifier and TypeMethodDescriptionasUpdate(long updateTime) longstatic TableMetadatabooleanstatic TableMetadatafromInsert(long updateTime) inthashCode()id()static TableMetadatastatic TableMetadataspec()sqlName()state()toString()longvoidvalidate()Syntactic validation of a table object.withColumns(TableMetadata update) withProperties(Map<String, Object> props) withProperties(TableMetadata update)
-
Constructor Details
-
TableMetadata
public TableMetadata(TableId tableId, long creationTime, long updateTime, TableMetadata.TableState state, TableSpec spec)
-
-
Method Details
-
newTable
-
of
-
forUpdate
-
empty
-
fromInsert
-
asUpdate
-
withSpec
-
withColumns
-
withProperties
-
withProperties
-
id
-
sqlName
-
state
-
creationTime
public long creationTime() -
updateTime
public long updateTime() -
spec
-
validate
public void validate()Syntactic validation of a table object. Validates only that which can be checked from this table object. -
toString
-
equals
-
hashCode
public int hashCode()
-