public abstract class MessageFactory extends Object
Constructor and Description |
---|
MessageFactory() |
Modifier and Type | Method and Description |
---|---|
abstract AbortTxnMessage |
buildAbortTxnMessage(Long txnId)
Factory method for building abort txn message
|
abstract AddForeignKeyMessage |
buildAddForeignKeyMessage(List<SQLForeignKey> fks)
Factory method for building add foreign key message
|
abstract AddNotNullConstraintMessage |
buildAddNotNullConstraintMessage(List<SQLNotNullConstraint> nns)
Factory method for building add not null constraint message
|
abstract AddPartitionMessage |
buildAddPartitionMessage(Table table,
Iterator<Partition> partitions,
Iterator<PartitionFiles> partitionFiles)
Factory method for AddPartitionMessage.
|
abstract AddPrimaryKeyMessage |
buildAddPrimaryKeyMessage(List<SQLPrimaryKey> pks)
Factory method for building add primary key message
|
abstract AddUniqueConstraintMessage |
buildAddUniqueConstraintMessage(List<SQLUniqueConstraint> uks)
Factory method for building add unique constraint message
|
abstract AllocWriteIdMessage |
buildAllocWriteIdMessage(List<TxnToWriteId> txnToWriteIdList,
String dbName,
String tableName)
Factory method for building alloc write id message
|
abstract AlterCatalogMessage |
buildAlterCatalogMessage(Catalog oldCat,
Catalog newCat) |
abstract AlterDatabaseMessage |
buildAlterDatabaseMessage(Database beforeDb,
Database afterDb)
Factory method for AlterDatabaseMessage.
|
abstract AlterPartitionMessage |
buildAlterPartitionMessage(Table table,
Partition before,
Partition after,
boolean isTruncateOp)
Factory method for building AlterPartitionMessage
|
abstract AlterTableMessage |
buildAlterTableMessage(Table before,
Table after,
boolean isTruncateOp)
Factory method for AlterTableMessage.
|
abstract CommitTxnMessage |
buildCommitTxnMessage(Long txnId)
Factory method for building commit txn message
|
abstract CreateCatalogMessage |
buildCreateCatalogMessage(Catalog catalog) |
abstract CreateDatabaseMessage |
buildCreateDatabaseMessage(Database db)
Factory method for CreateDatabaseMessage.
|
abstract CreateFunctionMessage |
buildCreateFunctionMessage(Function fn)
Factory method for CreateFunctionMessage.
|
abstract CreateTableMessage |
buildCreateTableMessage(Table table,
Iterator<String> files)
Factory method for CreateTableMessage.
|
abstract DropCatalogMessage |
buildDropCatalogMessage(Catalog catalog) |
abstract DropConstraintMessage |
buildDropConstraintMessage(String dbName,
String tableName,
String constraintName)
Factory method for building drop constraint message
|
abstract DropDatabaseMessage |
buildDropDatabaseMessage(Database db)
Factory method for DropDatabaseMessage.
|
abstract DropFunctionMessage |
buildDropFunctionMessage(Function fn)
Factory method for DropFunctionMessage.
|
abstract DropPartitionMessage |
buildDropPartitionMessage(Table table,
Iterator<Partition> partitions)
Factory method for DropPartitionMessage.
|
abstract DropTableMessage |
buildDropTableMessage(Table table)
Factory method for DropTableMessage.
|
abstract InsertMessage |
buildInsertMessage(Table tableObj,
Partition ptnObj,
boolean replace,
Iterator<String> files)
Factory method for building insert message
|
abstract OpenTxnMessage |
buildOpenTxnMessage(Long fromTxnId,
Long toTxnId)
Factory method for building open txn message using start and end transaction range
|
abstract MessageDeserializer |
getDeserializer() |
static MessageDeserializer |
getDeserializer(String format,
String version)
Getter for MessageDeserializer, corresponding to the specified format and version.
|
static MessageFactory |
getInstance()
Getter for MessageFactory instance.
|
abstract String |
getMessageFormat()
Getter for message-format.
|
public static final String ADD_PARTITION_EVENT
public static final String ALTER_PARTITION_EVENT
public static final String DROP_PARTITION_EVENT
public static final String CREATE_TABLE_EVENT
public static final String ALTER_TABLE_EVENT
public static final String DROP_TABLE_EVENT
public static final String CREATE_DATABASE_EVENT
public static final String ALTER_DATABASE_EVENT
public static final String DROP_DATABASE_EVENT
public static final String INSERT_EVENT
public static final String CREATE_FUNCTION_EVENT
public static final String DROP_FUNCTION_EVENT
public static final String ADD_PRIMARYKEY_EVENT
public static final String ADD_FOREIGNKEY_EVENT
public static final String ADD_UNIQUECONSTRAINT_EVENT
public static final String ADD_NOTNULLCONSTRAINT_EVENT
public static final String DROP_CONSTRAINT_EVENT
public static final String CREATE_ISCHEMA_EVENT
public static final String ALTER_ISCHEMA_EVENT
public static final String DROP_ISCHEMA_EVENT
public static final String ADD_SCHEMA_VERSION_EVENT
public static final String ALTER_SCHEMA_VERSION_EVENT
public static final String DROP_SCHEMA_VERSION_EVENT
public static final String CREATE_CATALOG_EVENT
public static final String DROP_CATALOG_EVENT
public static final String OPEN_TXN_EVENT
public static final String COMMIT_TXN_EVENT
public static final String ABORT_TXN_EVENT
public static final String ALLOC_WRITE_ID_EVENT
public static final String ALTER_CATALOG_EVENT
protected static final org.apache.hadoop.conf.Configuration conf
protected static final String MS_SERVER_URL
protected static final String MS_SERVICE_PRINCIPAL
public static MessageFactory getInstance()
public static MessageDeserializer getDeserializer(String format, String version)
format
- Serialization format for notifications.version
- Version of serialization format (currently ignored.)public abstract MessageDeserializer getDeserializer()
public abstract String getMessageFormat()
public abstract CreateDatabaseMessage buildCreateDatabaseMessage(Database db)
db
- The Database being added.public abstract AlterDatabaseMessage buildAlterDatabaseMessage(Database beforeDb, Database afterDb)
beforeDb
- The Database before alter.afterDb
- The Database after alter.public abstract DropDatabaseMessage buildDropDatabaseMessage(Database db)
db
- The Database being dropped.public abstract CreateTableMessage buildCreateTableMessage(Table table, Iterator<String> files)
table
- The Table being created.files
- Iterator of filespublic abstract AlterTableMessage buildAlterTableMessage(Table before, Table after, boolean isTruncateOp)
before
- The table before the alterafter
- The table after the alterisTruncateOp
- Flag to denote truncate tablepublic abstract DropTableMessage buildDropTableMessage(Table table)
table
- The Table being dropped.public abstract AddPartitionMessage buildAddPartitionMessage(Table table, Iterator<Partition> partitions, Iterator<PartitionFiles> partitionFiles)
table
- The Table to which the partitions are added.partitions
- The iterator to set of Partitions being added.partitionFiles
- The iterator of partition filespublic abstract AlterPartitionMessage buildAlterPartitionMessage(Table table, Partition before, Partition after, boolean isTruncateOp)
table
- The table in which the partition is being alteredbefore
- The partition before it was alteredafter
- The partition after it was alteredisTruncateOp
- Flag to denote truncate partitionpublic abstract DropPartitionMessage buildDropPartitionMessage(Table table, Iterator<Partition> partitions)
table
- The Table from which the partition is dropped.partitions
- The set of partitions being dropped.public abstract CreateFunctionMessage buildCreateFunctionMessage(Function fn)
fn
- The Function being added.public abstract DropFunctionMessage buildDropFunctionMessage(Function fn)
fn
- The Function being dropped.public abstract InsertMessage buildInsertMessage(Table tableObj, Partition ptnObj, boolean replace, Iterator<String> files)
tableObj
- Table object where the insert occurred inptnObj
- Partition object where the insert occurred in, may be null if
the insert was done into a non-partitioned tablereplace
- Flag to represent if INSERT OVERWRITE or INSERT INTOfiles
- Iterator of file createdpublic abstract OpenTxnMessage buildOpenTxnMessage(Long fromTxnId, Long toTxnId)
fromTxnId
- start transaction id (inclusive)toTxnId
- end transaction id (inclusive)public abstract CommitTxnMessage buildCommitTxnMessage(Long txnId)
txnId
- Id of the transaction to be committedpublic abstract AbortTxnMessage buildAbortTxnMessage(Long txnId)
txnId
- Id of the transaction to be abortedpublic abstract AllocWriteIdMessage buildAllocWriteIdMessage(List<TxnToWriteId> txnToWriteIdList, String dbName, String tableName)
txnToWriteIdList
- List of Txn Ids and write id mapdbName
- db for which write ids to be allocatedtableName
- table for which write ids to be allocatedpublic abstract AddPrimaryKeyMessage buildAddPrimaryKeyMessage(List<SQLPrimaryKey> pks)
pks
- list of primary keyspublic abstract AddForeignKeyMessage buildAddForeignKeyMessage(List<SQLForeignKey> fks)
fks
- list of foreign keyspublic abstract AddUniqueConstraintMessage buildAddUniqueConstraintMessage(List<SQLUniqueConstraint> uks)
uks
- list of unique constraintspublic abstract AddNotNullConstraintMessage buildAddNotNullConstraintMessage(List<SQLNotNullConstraint> nns)
nns
- list of not null constraintspublic abstract DropConstraintMessage buildDropConstraintMessage(String dbName, String tableName, String constraintName)
dbName
- tableName
- constraintName
- public abstract CreateCatalogMessage buildCreateCatalogMessage(Catalog catalog)
public abstract DropCatalogMessage buildDropCatalogMessage(Catalog catalog)
public abstract AlterCatalogMessage buildAlterCatalogMessage(Catalog oldCat, Catalog newCat)
Copyright © 2022 The Apache Software Foundation. All rights reserved.