public abstract class MessageFactory extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ADD_PARTITION_EVENT |
static String |
ALTER_INDEX_EVENT |
static String |
ALTER_PARTITION_EVENT |
static String |
ALTER_TABLE_EVENT |
static String |
CREATE_DATABASE_EVENT |
static String |
CREATE_FUNCTION_EVENT |
static String |
CREATE_INDEX_EVENT |
static String |
CREATE_TABLE_EVENT |
static String |
DROP_DATABASE_EVENT |
static String |
DROP_FUNCTION_EVENT |
static String |
DROP_INDEX_EVENT |
static String |
DROP_PARTITION_EVENT |
static String |
DROP_TABLE_EVENT |
protected static HiveConf |
hiveConf |
static String |
INSERT_EVENT |
protected static String |
MS_SERVER_URL |
protected static String |
MS_SERVICE_PRINCIPAL |
Constructor and Description |
---|
MessageFactory() |
Modifier and Type | Method and Description |
---|---|
abstract AddPartitionMessage |
buildAddPartitionMessage(Table table,
Iterator<Partition> partitions,
Iterator<PartitionFiles> partitionFiles)
Factory method for AddPartitionMessage.
|
abstract AlterIndexMessage |
buildAlterIndexMessage(Index before,
Index after)
Factory method for AlterIndexMessage.
|
abstract AlterPartitionMessage |
buildAlterPartitionMessage(Table table,
Partition before,
Partition after)
Factory method for building AlterPartitionMessage
|
abstract AlterTableMessage |
buildAlterTableMessage(Table before,
Table after)
Factory method for AlterTableMessage.
|
abstract CreateDatabaseMessage |
buildCreateDatabaseMessage(Database db)
Factory method for CreateDatabaseMessage.
|
abstract CreateFunctionMessage |
buildCreateFunctionMessage(Function fn)
Factory method for CreateFunctionMessage.
|
abstract CreateIndexMessage |
buildCreateIndexMessage(Index idx)
Factory method for CreateIndexMessage.
|
abstract CreateTableMessage |
buildCreateTableMessage(Table table,
Iterator<String> files)
Factory method for CreateTableMessage.
|
abstract DropDatabaseMessage |
buildDropDatabaseMessage(Database db)
Factory method for DropDatabaseMessage.
|
abstract DropFunctionMessage |
buildDropFunctionMessage(Function fn)
Factory method for DropFunctionMessage.
|
abstract DropIndexMessage |
buildDropIndexMessage(Index idx)
Factory method for DropIndexMessage.
|
abstract DropPartitionMessage |
buildDropPartitionMessage(Table table,
Iterator<Partition> partitions)
Factory method for DropPartitionMessage.
|
abstract DropTableMessage |
buildDropTableMessage(Table table)
Factory method for DropTableMessage.
|
abstract InsertMessage |
buildInsertMessage(String db,
String table,
Map<String,String> partVals,
Iterator<String> files)
Factory method for building insert message
|
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 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 CREATE_INDEX_EVENT
public static final String DROP_INDEX_EVENT
public static final String ALTER_INDEX_EVENT
protected static final HiveConf hiveConf
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 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)
before
- The table before the alterafter
- The table after the alterpublic 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)
table
- The table in which the partition is being alteredbefore
- The partition before it was alteredafter
- The partition after it was alteredpublic 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 CreateIndexMessage buildCreateIndexMessage(Index idx)
idx
- The Index being added.public abstract DropIndexMessage buildDropIndexMessage(Index idx)
idx
- The Index being dropped.public abstract AlterIndexMessage buildAlterIndexMessage(Index before, Index after)
before
- The index before the alterafter
- The index after the alterpublic abstract InsertMessage buildInsertMessage(String db, String table, Map<String,String> partVals, Iterator<String> files)
db
- Name of the database the insert occurred intable
- Name of the table the insert occurred inpartVals
- Partition values for the partition that the insert occurred in, may be null if
the insert was done into a non-partitioned tablefiles
- Iterator of file createdCopyright © 2017 The Apache Software Foundation. All rights reserved.