Package com.cloudera.flume.conf.FlumeBuilder

Examples of com.cloudera.flume.conf.FlumeBuilder.ASTNODE


* used to regenerated the code as a string so it can be sent to the nodes.
*/
public class FlumeSpecGen {

  static String genArg(CommonTree t) throws FlumeSpecException {
    ASTNODE type = ASTNODE.valueOf(t.getText()); // convert to enum
    switch (type) {
    case HEX:
    case DEC:
    case BOOL:
    case OCT:
View Full Code Here


    return b.toString();
  }

  @SuppressWarnings("unchecked")
  public static String genEventSource(CommonTree t) throws FlumeSpecException {
    ASTNODE type = ASTNODE.valueOf(t.getText()); // convert to enum
    switch (type) {
    case SOURCE:
      List<CommonTree> children = new ArrayList<CommonTree>(
          (List<CommonTree>) t.getChildren());
      String sourceType = children.remove(0).getText();
View Full Code Here

  @SuppressWarnings("unchecked")
  public static String genEventSink(CommonTree t) throws FlumeSpecException {
    if (t == null) {
      throw new FlumeSpecException("Tree is null");
    }
    ASTNODE type = ASTNODE.valueOf(t.getText()); // convert to enum
    switch (type) {
    case SINK:
      // copy so we don't modify original
      List<CommonTree> children = (List<CommonTree>) new ArrayList<CommonTree>(
          t.getChildren());
View Full Code Here

* used to regenerated the code as a string so it can be sent to the nodes.
*/
public class FlumeSpecGen {

  static String genArg(CommonTree t) throws FlumeSpecException {
    ASTNODE type = ASTNODE.valueOf(t.getText()); // convert to enum
    switch (type) {
    case HEX:
    case DEC:
    case BOOL:
    case OCT:
View Full Code Here

    return b.toString();
  }

  @SuppressWarnings("unchecked")
  public static String genEventSource(CommonTree t) throws FlumeSpecException {
    ASTNODE type = ASTNODE.valueOf(t.getText()); // convert to enum
    switch (type) {
    case SOURCE:
      List<CommonTree> children = new ArrayList<CommonTree>(
          (List<CommonTree>) t.getChildren());
      String sourceType = children.remove(0).getText();
View Full Code Here

  @SuppressWarnings("unchecked")
  public static String genEventSink(CommonTree t) throws FlumeSpecException {
    if (t == null) {
      throw new FlumeSpecException("Tree is null");
    }
    ASTNODE type = ASTNODE.valueOf(t.getText()); // convert to enum
    switch (type) {
    case SINK:
      // copy so we don't modify original
      List<CommonTree> children = (List<CommonTree>) new ArrayList<CommonTree>(
          t.getChildren());
View Full Code Here

TOP

Related Classes of com.cloudera.flume.conf.FlumeBuilder.ASTNODE

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.