Tabnine Logo
HCatEventMessage$EventType
Code IndexAdd Tabnine to your IDE (free)

How to use
HCatEventMessage$EventType
in
org.apache.hive.hcatalog.messaging

Best Java code snippets using org.apache.hive.hcatalog.messaging.HCatEventMessage$EventType (Showing top 12 results out of 315)

origin: apache/hive

Message msg = session.get().createTextMessage(hCatEventMessage.toString());
msg.setStringProperty(HCatConstants.HCAT_EVENT, hCatEventMessage.getEventType().toString());
msg.setStringProperty(HCatConstants.HCAT_MESSAGE_VERSION, messageFactory.getVersion());
msg.setStringProperty(HCatConstants.HCAT_MESSAGE_FORMAT, messageFactory.getMessageFormat());
origin: apache/hive

switch (HCatEventMessage.EventType.valueOf(eventTypeString)) {
case CREATE_DATABASE:
 return getCreateDatabaseMessage(messageBody);
origin: apache/oozie

    dep1.getTable(), partitionsList, System.currentTimeMillis());
Message msg = session.createTextMessage(jsonMsg.toString());
msg.setStringProperty(HCatConstants.HCAT_EVENT, HCatEventMessage.EventType.ADD_PARTITION.toString());
    dep1.getTable(), partitionsList, System.currentTimeMillis());
msg = session.createTextMessage(jsonMsg.toString());
msg.setStringProperty(HCatConstants.HCAT_EVENT, HCatEventMessage.EventType.ADD_PARTITION.toString());
HCatAccessorService hcatService = Services.get().get(HCatAccessorService.class);
hcatService.registerForNotification(dep1, "hcat.topic1", hcatHandler);
origin: org.spark-project.hive.hcatalog/hive-hcatalog-server-extensions

Message msg = session.get().createTextMessage(hCatEventMessage.toString());
msg.setStringProperty(HCatConstants.HCAT_EVENT, hCatEventMessage.getEventType().toString());
msg.setStringProperty(HCatConstants.HCAT_MESSAGE_VERSION, messageFactory.getVersion());
msg.setStringProperty(HCatConstants.HCAT_MESSAGE_FORMAT, messageFactory.getMessageFormat());
origin: org.apache.hive.hcatalog/hive-hcatalog-server-extensions

switch (HCatEventMessage.EventType.valueOf(eventTypeString)) {
case CREATE_DATABASE:
 return getCreateDatabaseMessage(messageBody);
origin: org.apache.hive.hcatalog/hive-hcatalog-server-extensions

Message msg = session.get().createTextMessage(hCatEventMessage.toString());
msg.setStringProperty(HCatConstants.HCAT_EVENT, hCatEventMessage.getEventType().toString());
msg.setStringProperty(HCatConstants.HCAT_MESSAGE_VERSION, messageFactory.getVersion());
msg.setStringProperty(HCatConstants.HCAT_MESSAGE_FORMAT, messageFactory.getMessageFormat());
origin: com.github.hyukjinkwon.hcatalog/hive-hcatalog-server-extensions

Message msg = session.get().createTextMessage(hCatEventMessage.toString());
msg.setStringProperty(HCatConstants.HCAT_EVENT, hCatEventMessage.getEventType().toString());
msg.setStringProperty(HCatConstants.HCAT_MESSAGE_VERSION, messageFactory.getVersion());
msg.setStringProperty(HCatConstants.HCAT_MESSAGE_FORMAT, messageFactory.getMessageFormat());
origin: apache/oozie

  "\"partitions\" : [{ \"dt\" : \"2012_01_01\", \"grid\" : \"AB\" }]" +
  "}");
msg.setStringProperty(HCatConstants.HCAT_EVENT, HCatEventMessage.EventType.DROP_PARTITION.toString());
assertTrue(logMsg.contains(HCatEventMessage.EventType.DROP_PARTITION.toString()));
msg.setStringProperty(HCatConstants.HCAT_EVENT, HCatEventMessage.EventType.DROP_TABLE.toString());
hcatHandler.process(msg);
assertTrue(logMsg.contains(HCatEventMessage.EventType.DROP_TABLE.toString()));
origin: org.spark-project.hive.hcatalog/hive-hcatalog-server-extensions

/**
 * Method to construct HCatEventMessage from string.
 */
public HCatEventMessage getHCatEventMessage(String eventTypeString, String messageBody) {
 switch (HCatEventMessage.EventType.valueOf(eventTypeString)) {
 case CREATE_DATABASE:
  return getCreateDatabaseMessage(messageBody);
 case DROP_DATABASE:
  return getDropDatabaseMessage(messageBody);
 case CREATE_TABLE:
  return getCreateTableMessage(messageBody);
 case ALTER_TABLE:
  return getAlterTableMessage(messageBody);
 case DROP_TABLE:
  return getDropTableMessage(messageBody);
 case ADD_PARTITION:
  return getAddPartitionMessage(messageBody);
 case ALTER_PARTITION:
  return getAlterPartitionMessage(messageBody);
 case DROP_PARTITION:
  return getDropPartitionMessage(messageBody);
 case INSERT:
  return getInsertMessage(messageBody);
 default:
  throw new IllegalArgumentException("Unsupported event-type: " + eventTypeString);
 }
}
origin: org.apache.oozie/oozie-core

/**
 * Process JMS message produced by HCat.
 *
 * @param msg : to be processed
 */
@Override
public void process(Message msg) {
  try {
    HCatEventMessage hcatMsg = MessagingUtils.getMessage(msg);
    if (hcatMsg.getEventType().equals(HCatEventMessage.EventType.ADD_PARTITION)) {
      // Parse msg components
      AddPartitionMessage partMsg = (AddPartitionMessage) hcatMsg;
      String db = partMsg.getDB();
      String table = partMsg.getTable();
      LOG.info("Partition available event: db [{0}]  table [{1}] partitions [{2}]", db, table,
          partMsg.getPartitions());
      List<Map<String, String>> partitions = partMsg.getPartitions();
      for (int i = 0; i < partitions.size(); i++) {
        pdmService.partitionAvailable(this.server, db, table, partitions.get(i));
      }
    }
    else {
      LOG.debug("Ignoring message of event type [{0}] ", hcatMsg.getEventType());
    }
  }
  catch (Exception e) {
    LOG.warn("Error processing JMS message", e);
  }
}
origin: apache/oozie

/**
 * Process JMS message produced by HCat.
 *
 * @param msg : to be processed
 */
@Override
public void process(Message msg) {
  try {
    HCatEventMessage hcatMsg = MessagingUtils.getMessage(msg);
    if (hcatMsg.getEventType().equals(HCatEventMessage.EventType.ADD_PARTITION)) {
      // Parse msg components
      AddPartitionMessage partMsg = (AddPartitionMessage) hcatMsg;
      String db = partMsg.getDB();
      String table = partMsg.getTable();
      LOG.info("Partition available event: db [{0}]  table [{1}] partitions [{2}]", db, table,
          partMsg.getPartitions());
      List<Map<String, String>> partitions = partMsg.getPartitions();
      for (int i = 0; i < partitions.size(); i++) {
        pdmService.partitionAvailable(this.server, db, table, partitions.get(i));
      }
    }
    else {
      LOG.debug("Ignoring message of event type [{0}] ", hcatMsg.getEventType());
    }
  }
  catch (Exception e) {
    LOG.warn("Error processing JMS message", e);
  }
}
origin: com.github.hyukjinkwon.hcatalog/hive-hcatalog-server-extensions

/**
 * Method to construct HCatEventMessage from string.
 */
public HCatEventMessage getHCatEventMessage(String eventTypeString, String messageBody) {
 switch (HCatEventMessage.EventType.valueOf(eventTypeString)) {
 case CREATE_DATABASE:
  return getCreateDatabaseMessage(messageBody);
 case DROP_DATABASE:
  return getDropDatabaseMessage(messageBody);
 case CREATE_TABLE:
  return getCreateTableMessage(messageBody);
 case ALTER_TABLE:
  return getAlterTableMessage(messageBody);
 case DROP_TABLE:
  return getDropTableMessage(messageBody);
 case ADD_PARTITION:
  return getAddPartitionMessage(messageBody);
 case ALTER_PARTITION:
  return getAlterPartitionMessage(messageBody);
 case DROP_PARTITION:
  return getDropPartitionMessage(messageBody);
 case INSERT:
  return getInsertMessage(messageBody);
 default:
  throw new IllegalArgumentException("Unsupported event-type: " + eventTypeString);
 }
}
org.apache.hive.hcatalog.messagingHCatEventMessage$EventType

Javadoc

Enumeration of all supported types of Metastore operations.

Most used methods

  • toString
  • valueOf
  • equals

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • IsNull (org.hamcrest.core)
    Is the value null?
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now