public abstract class MessageFactory extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
HCAT_SERVER_URL |
protected static String |
HCAT_SERVICE_PRINCIPAL |
protected static HiveConf |
hiveConf |
Constructor and Description |
---|
MessageFactory() |
Modifier and Type | Method and Description |
---|---|
abstract AddPartitionMessage |
buildAddPartitionMessage(Table table,
Iterator<Partition> partitions)
Factory method for AddPartitionMessage.
|
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 CreateTableMessage |
buildCreateTableMessage(Table table)
Factory method for CreateTableMessage.
|
abstract DropDatabaseMessage |
buildDropDatabaseMessage(Database db)
Factory method for DropDatabaseMessage.
|
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,
List<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.
|
abstract String |
getVersion()
Getter for version-string, corresponding to all constructed messages.
|
protected static final HiveConf hiveConf
protected static final String HCAT_SERVER_URL
protected static final String HCAT_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 getVersion()
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)
table
- The Table being created.public 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)
table
- The Table to which the partitions are added.partitions
- The iterator to set of Partitions being added.public 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 InsertMessage buildInsertMessage(String db, String table, Map<String,String> partVals, List<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
- List of files created as a result of the insert, may be null.Copyright © 2017 The Apache Software Foundation. All rights reserved.