public class JSONMessageFactory extends MessageFactory
HCAT_SERVER_URL, HCAT_SERVICE_PRINCIPAL, hiveConf
Constructor and Description |
---|
JSONMessageFactory() |
Modifier and Type | Method and Description |
---|---|
AddPartitionMessage |
buildAddPartitionMessage(Table table,
Iterator<Partition> partitionsIterator)
Factory method for AddPartitionMessage.
|
AlterPartitionMessage |
buildAlterPartitionMessage(Table table,
Partition before,
Partition after)
Factory method for building AlterPartitionMessage
|
AlterTableMessage |
buildAlterTableMessage(Table before,
Table after)
Factory method for AlterTableMessage.
|
CreateDatabaseMessage |
buildCreateDatabaseMessage(Database db)
Factory method for CreateDatabaseMessage.
|
CreateTableMessage |
buildCreateTableMessage(Table table)
Factory method for CreateTableMessage.
|
DropDatabaseMessage |
buildDropDatabaseMessage(Database db)
Factory method for DropDatabaseMessage.
|
DropPartitionMessage |
buildDropPartitionMessage(Table table,
Iterator<Partition> partitions)
Factory method for DropPartitionMessage.
|
DropTableMessage |
buildDropTableMessage(Table table)
Factory method for DropTableMessage.
|
InsertMessage |
buildInsertMessage(String db,
String table,
Map<String,String> partKeyVals,
List<String> files)
Factory method for building insert message
|
MessageDeserializer |
getDeserializer() |
String |
getMessageFormat()
Getter for message-format.
|
String |
getVersion()
Getter for version-string, corresponding to all constructed messages.
|
getDeserializer, getInstance
public MessageDeserializer getDeserializer()
getDeserializer
in class MessageFactory
public String getVersion()
MessageFactory
getVersion
in class MessageFactory
public String getMessageFormat()
MessageFactory
getMessageFormat
in class MessageFactory
public CreateDatabaseMessage buildCreateDatabaseMessage(Database db)
MessageFactory
buildCreateDatabaseMessage
in class MessageFactory
db
- The Database being added.public DropDatabaseMessage buildDropDatabaseMessage(Database db)
MessageFactory
buildDropDatabaseMessage
in class MessageFactory
db
- The Database being dropped.public CreateTableMessage buildCreateTableMessage(Table table)
MessageFactory
buildCreateTableMessage
in class MessageFactory
table
- The Table being created.public AlterTableMessage buildAlterTableMessage(Table before, Table after)
MessageFactory
buildAlterTableMessage
in class MessageFactory
before
- The table before the alterafter
- The table after the alterpublic DropTableMessage buildDropTableMessage(Table table)
MessageFactory
buildDropTableMessage
in class MessageFactory
table
- The Table being dropped.public AddPartitionMessage buildAddPartitionMessage(Table table, Iterator<Partition> partitionsIterator)
MessageFactory
buildAddPartitionMessage
in class MessageFactory
table
- The Table to which the partitions are added.partitionsIterator
- The iterator to set of Partitions being added.public AlterPartitionMessage buildAlterPartitionMessage(Table table, Partition before, Partition after)
MessageFactory
buildAlterPartitionMessage
in class MessageFactory
table
- The table in which the partition is being alteredbefore
- The partition before it was alteredafter
- The partition after it was alteredpublic DropPartitionMessage buildDropPartitionMessage(Table table, Iterator<Partition> partitions)
MessageFactory
buildDropPartitionMessage
in class MessageFactory
table
- The Table from which the partition is dropped.partitions
- The set of partitions being dropped.public InsertMessage buildInsertMessage(String db, String table, Map<String,String> partKeyVals, List<String> files)
MessageFactory
buildInsertMessage
in class MessageFactory
db
- Name of the database the insert occurred intable
- Name of the table the insert occurred inpartKeyVals
- 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.