Package org.apache.flume.conf.sink

Examples of org.apache.flume.conf.sink.SinkType


    Preconditions.checkNotNull(type);
    logger.info("Creating instance of sink: {}, type: {}", name, type);

    String sinkClassName = type;

    SinkType sinkType = SinkType.OTHER;
    try {
      sinkType = SinkType.valueOf(type.toUpperCase());
    } catch (IllegalArgumentException ex) {
      logger.debug("Sink type {} is a custom type", type);
    }

    if (!sinkType.equals(SinkType.OTHER)) {
      sinkClassName = sinkType.getSinkClassName();
    }

    Class<? extends Sink> sinkClass = null;
    try {
      sinkClass = (Class<? extends Sink>) Class.forName(sinkClassName);
View Full Code Here


          errorList.add(new FlumeConfigurationError(agentName, sinkName,
              FlumeConfigurationErrorType.CONFIG_ERROR, ErrorOrWarning.ERROR));
        } else {
          String config = null;
          boolean configSpecified = false;
          SinkType sinkType = getKnownSink(sinkContext.getString(
              BasicConfigurationConstants.CONFIG_TYPE));
          if (sinkType == null) {
            config = sinkContext.getString(
                BasicConfigurationConstants.CONFIG_CONFIG);
            if (config == null || config.isEmpty()) {
              config = "OTHER";
            } else{
              configSpecified = true;
            }
          } else {
            config = sinkType.toString().toUpperCase();
            configSpecified = true;
          }
          try {
            logger.debug("Creating sink: " + sinkName + " using " + config);
View Full Code Here

          errorList.add(new FlumeConfigurationError(agentName, sinkName,
              FlumeConfigurationErrorType.CONFIG_ERROR, ErrorOrWarning.ERROR));
        } else {
          String config = null;
          boolean configSpecified = false;
          SinkType sinkType = getKnownSink(sinkContext.getString(
              BasicConfigurationConstants.CONFIG_TYPE));
          if (sinkType == null) {
            config = sinkContext.getString(
                BasicConfigurationConstants.CONFIG_CONFIG);
            if (config == null || config.isEmpty()) {
              config = "OTHER";
            } else{
              configSpecified = true;
            }
          } else {
            config = sinkType.toString().toUpperCase(Locale.ENGLISH);
            configSpecified = true;
          }
          try {
            logger.debug("Creating sink: " + sinkName + " using " + config);
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public Class<? extends Sink> getClass(String type)
  throws FlumeException {
    String sinkClassName = type;
    SinkType sinkType = SinkType.OTHER;
    try {
      sinkType = SinkType.valueOf(type.toUpperCase(Locale.ENGLISH));
    } catch (IllegalArgumentException ex) {
      logger.debug("Sink type {} is a custom type", type);
    }
    if (!sinkType.equals(SinkType.OTHER)) {
      sinkClassName = sinkType.getSinkClassName();
    }
    try {
      return (Class<? extends Sink>) Class.forName(sinkClassName);
    } catch (Exception ex) {
      throw new FlumeException("Unable to load sink type: " + type
View Full Code Here

          errorList.add(new FlumeConfigurationError(agentName, sinkName,
              FlumeConfigurationErrorType.CONFIG_ERROR, ErrorOrWarning.ERROR));
        } else {
          String config = null;
          boolean configSpecified = false;
          SinkType sinkType = getKnownSink(sinkContext.getString(
              BasicConfigurationConstants.CONFIG_TYPE));
          if (sinkType == null) {
            config = sinkContext.getString(
                BasicConfigurationConstants.CONFIG_CONFIG);
            if (config == null || config.isEmpty()) {
              config = "OTHER";
            } else{
              configSpecified = true;
            }
          } else {
            config = sinkType.toString().toUpperCase();
            configSpecified = true;
          }
          try {
            logger.debug("Creating sink: " + sinkName + " using " + config);
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public Class<? extends Sink> getClass(String type)
  throws FlumeException {
    String sinkClassName = type;
    SinkType sinkType = SinkType.OTHER;
    try {
      sinkType = SinkType.valueOf(type.toUpperCase());
    } catch (IllegalArgumentException ex) {
      logger.debug("Sink type {} is a custom type", type);
    }
    if (!sinkType.equals(SinkType.OTHER)) {
      sinkClassName = sinkType.getSinkClassName();
    }
    try {
      return (Class<? extends Sink>) Class.forName(sinkClassName);
    } catch (Exception ex) {
      throw new FlumeException("Unable to load sink type: " + type
View Full Code Here

          errorList.add(new FlumeConfigurationError(agentName, sinkName,
              FlumeConfigurationErrorType.CONFIG_ERROR, ErrorOrWarning.ERROR));
        } else {
          String config = null;
          boolean configSpecified = false;
          SinkType sinkType = getKnownSink(sinkContext.getString(
              BasicConfigurationConstants.CONFIG_TYPE));
          if (sinkType == null) {
            config = sinkContext.getString(
                BasicConfigurationConstants.CONFIG_CONFIG);
            if (config == null || config.isEmpty()) {
              config = "OTHER";
            } else{
              configSpecified = true;
            }
          } else {
            config = sinkType.toString().toUpperCase();
            configSpecified = true;
          }
          try {
            logger.debug("Creating sink: " + sinkName + " using " + config);
View Full Code Here

    Preconditions.checkNotNull(type);
    logger.info("Creating instance of sink {} type{}", name, type);

    String sinkClassName = type;

    SinkType sinkType = SinkType.OTHER;
    try {
      sinkType = SinkType.valueOf(type.toUpperCase());
    } catch (IllegalArgumentException ex) {
      logger.debug("Sink type {} is a custom type", type);
    }

    if (!sinkType.equals(SinkType.OTHER)) {
      sinkClassName = sinkType.getSinkClassName();
    }

    Class<? extends Sink> sinkClass = null;
    try {
      sinkClass = (Class<? extends Sink>) Class.forName(sinkClassName);
View Full Code Here

TOP

Related Classes of org.apache.flume.conf.sink.SinkType

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.