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<org.apache.hadoop.hive.metastore.api.SQLForeignKey> fks)
Factory method for building add foreign key message
|
abstract AddNotNullConstraintMessage |
buildAddNotNullConstraintMessage(List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> nns)
Factory method for building add not null constraint message
|
abstract AddPartitionMessage |
buildAddPartitionMessage(org.apache.hadoop.hive.metastore.api.Table table,
Iterator<org.apache.hadoop.hive.metastore.api.Partition> partitions,
Iterator<PartitionFiles> partitionFiles)
Factory method for AddPartitionMessage.
|
abstract AddPrimaryKeyMessage |
buildAddPrimaryKeyMessage(List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> pks)
Factory method for building add primary key message
|
abstract AddUniqueConstraintMessage |
buildAddUniqueConstraintMessage(List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> uks)
Factory method for building add unique constraint message
|
abstract AllocWriteIdMessage |
buildAllocWriteIdMessage(List<org.apache.hadoop.hive.metastore.api.TxnToWriteId> txnToWriteIdList,
String dbName,
String tableName)
Factory method for building alloc write id message
|
abstract AlterCatalogMessage |
buildAlterCatalogMessage(org.apache.hadoop.hive.metastore.api.Catalog oldCat,
org.apache.hadoop.hive.metastore.api.Catalog newCat) |
abstract AlterDatabaseMessage |
buildAlterDatabaseMessage(org.apache.hadoop.hive.metastore.api.Database beforeDb,
org.apache.hadoop.hive.metastore.api.Database afterDb)
Factory method for AlterDatabaseMessage.
|
abstract AlterPartitionMessage |
buildAlterPartitionMessage(org.apache.hadoop.hive.metastore.api.Table table,
org.apache.hadoop.hive.metastore.api.Partition before,
org.apache.hadoop.hive.metastore.api.Partition after,
boolean isTruncateOp)
Factory method for building AlterPartitionMessage
|
abstract AlterTableMessage |
buildAlterTableMessage(org.apache.hadoop.hive.metastore.api.Table before,
org.apache.hadoop.hive.metastore.api.Table after,
boolean isTruncateOp)
Factory method for AlterTableMessage.
|
abstract CommitTxnMessage |
buildCommitTxnMessage(Long txnId)
Factory method for building commit txn message
|
abstract CreateCatalogMessage |
buildCreateCatalogMessage(org.apache.hadoop.hive.metastore.api.Catalog catalog) |
abstract CreateDatabaseMessage |
buildCreateDatabaseMessage(org.apache.hadoop.hive.metastore.api.Database db)
Factory method for CreateDatabaseMessage.
|
abstract CreateFunctionMessage |
buildCreateFunctionMessage(org.apache.hadoop.hive.metastore.api.Function fn)
Factory method for CreateFunctionMessage.
|
abstract CreateTableMessage |
buildCreateTableMessage(org.apache.hadoop.hive.metastore.api.Table table,
Iterator<String> files)
Factory method for CreateTableMessage.
|
abstract DropCatalogMessage |
buildDropCatalogMessage(org.apache.hadoop.hive.metastore.api.Catalog catalog) |
abstract DropConstraintMessage |
buildDropConstraintMessage(String dbName,
String tableName,
String constraintName)
Factory method for building drop constraint message
|
abstract DropDatabaseMessage |
buildDropDatabaseMessage(org.apache.hadoop.hive.metastore.api.Database db)
Factory method for DropDatabaseMessage.
|
abstract DropFunctionMessage |
buildDropFunctionMessage(org.apache.hadoop.hive.metastore.api.Function fn)
Factory method for DropFunctionMessage.
|
abstract DropPartitionMessage |
buildDropPartitionMessage(org.apache.hadoop.hive.metastore.api.Table table,
Iterator<org.apache.hadoop.hive.metastore.api.Partition> partitions)
Factory method for DropPartitionMessage.
|
abstract DropTableMessage |
buildDropTableMessage(org.apache.hadoop.hive.metastore.api.Table table)
Factory method for DropTableMessage.
|
abstract InsertMessage |
buildInsertMessage(org.apache.hadoop.hive.metastore.api.Table tableObj,
org.apache.hadoop.hive.metastore.api.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(org.apache.hadoop.hive.metastore.api.Database db)
db - The Database being added.public abstract AlterDatabaseMessage buildAlterDatabaseMessage(org.apache.hadoop.hive.metastore.api.Database beforeDb, org.apache.hadoop.hive.metastore.api.Database afterDb)
beforeDb - The Database before alter.afterDb - The Database after alter.public abstract DropDatabaseMessage buildDropDatabaseMessage(org.apache.hadoop.hive.metastore.api.Database db)
db - The Database being dropped.public abstract CreateTableMessage buildCreateTableMessage(org.apache.hadoop.hive.metastore.api.Table table, Iterator<String> files)
table - The Table being created.files - Iterator of filespublic abstract AlterTableMessage buildAlterTableMessage(org.apache.hadoop.hive.metastore.api.Table before, org.apache.hadoop.hive.metastore.api.Table after, boolean isTruncateOp)
before - The table before the alterafter - The table after the alterisTruncateOp - Flag to denote truncate tablepublic abstract DropTableMessage buildDropTableMessage(org.apache.hadoop.hive.metastore.api.Table table)
table - The Table being dropped.public abstract AddPartitionMessage buildAddPartitionMessage(org.apache.hadoop.hive.metastore.api.Table table, Iterator<org.apache.hadoop.hive.metastore.api.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(org.apache.hadoop.hive.metastore.api.Table table, org.apache.hadoop.hive.metastore.api.Partition before, org.apache.hadoop.hive.metastore.api.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(org.apache.hadoop.hive.metastore.api.Table table, Iterator<org.apache.hadoop.hive.metastore.api.Partition> partitions)
table - The Table from which the partition is dropped.partitions - The set of partitions being dropped.public abstract CreateFunctionMessage buildCreateFunctionMessage(org.apache.hadoop.hive.metastore.api.Function fn)
fn - The Function being added.public abstract DropFunctionMessage buildDropFunctionMessage(org.apache.hadoop.hive.metastore.api.Function fn)
fn - The Function being dropped.public abstract InsertMessage buildInsertMessage(org.apache.hadoop.hive.metastore.api.Table tableObj, org.apache.hadoop.hive.metastore.api.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<org.apache.hadoop.hive.metastore.api.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<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> pks)
pks - list of primary keyspublic abstract AddForeignKeyMessage buildAddForeignKeyMessage(List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> fks)
fks - list of foreign keyspublic abstract AddUniqueConstraintMessage buildAddUniqueConstraintMessage(List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> uks)
uks - list of unique constraintspublic abstract AddNotNullConstraintMessage buildAddNotNullConstraintMessage(List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> nns)
nns - list of not null constraintspublic abstract DropConstraintMessage buildDropConstraintMessage(String dbName, String tableName, String constraintName)
dbName - tableName - constraintName - public abstract CreateCatalogMessage buildCreateCatalogMessage(org.apache.hadoop.hive.metastore.api.Catalog catalog)
public abstract DropCatalogMessage buildDropCatalogMessage(org.apache.hadoop.hive.metastore.api.Catalog catalog)
public abstract AlterCatalogMessage buildAlterCatalogMessage(org.apache.hadoop.hive.metastore.api.Catalog oldCat, org.apache.hadoop.hive.metastore.api.Catalog newCat)
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.