Examples of SourceBuilder


Examples of com.cloudera.flume.conf.SourceFactory.SourceBuilder

    return new Pair<String, DelimMode>(delimRegex, delimMode);

  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {

      @Override
      public EventSource build(Context ctx, String... argv) {
        if (argv.length != 1 && argv.length != 2) {
          throw new IllegalArgumentException(
View Full Code Here

Examples of com.cloudera.flume.conf.SourceFactory.SourceBuilder

      }
    };
  }

  public static SourceBuilder multiTailBuilder() {
    return new SourceBuilder() {

      @Override
      public EventSource build(Context ctx, String... argv) {
        Preconditions.checkArgument(argv.length >= 1,
            "usage: multitail(file1[, file2[, ...]]) ");
View Full Code Here

Examples of com.cloudera.flume.conf.SourceFactory.SourceBuilder

          + e.getMessage(), e);
    }
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {
      @Override
      public EventSource build(Context ctx, String... argv) {
        Preconditions.checkArgument(argv.length == 1,
            "usage: avroSource(port{," + C_TRUNCATE + "=false})");
        int port = Integer.parseInt(argv[0]);
View Full Code Here

Examples of com.cloudera.flume.conf.SourceFactory.SourceBuilder

   */
  @Test
  public void testFailOpenSource() throws IOException, RuntimeException,
      FlumeSpecException, InterruptedException {
    SourceFactoryImpl srcfact = new SourceFactoryImpl();
    srcfact.setSource("failOpen", new SourceBuilder() {
      @Override
      public EventSource build(Context ctx, String... argv) {
        return new EventSource.Base() {
          @Override
          public void open() throws IOException {
View Full Code Here

Examples of com.cloudera.flume.conf.SourceFactory.SourceBuilder

  @Test
  public void testFailNextSource() throws IOException, RuntimeException,
      FlumeSpecException, InterruptedException {
    SourceFactoryImpl srcfact = new SourceFactoryImpl();
    srcfact.setSource("failNext", new SourceBuilder() {
      @Override
      public EventSource build(Context ctx, String... argv) {
        return new EventSource.Base() {
          @Override
          public Event next() throws IOException {
View Full Code Here

Examples of com.cloudera.flume.conf.SourceFactory.SourceBuilder

  @Test
  public void testFailCloseSource() throws IOException, RuntimeException,
      FlumeSpecException, InterruptedException {
    SourceFactoryImpl srcfact = new SourceFactoryImpl();
    srcfact.setSource("failClose", new SourceBuilder() {
      @Override
      public EventSource build(Context ctx, String... argv) {
        return new EventSource.Base() {
          @Override
          public void close() throws IOException {
View Full Code Here

Examples of com.cloudera.flume.conf.SourceFactory.SourceBuilder

  public String toString() {
    return "SeqfileEventSource name=" + fname;
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {

      @Override
      public EventSource build(Context ctx, String... argv) {
        if (argv.length != 1) {
          throw new IllegalArgumentException("usage: seqfile(filename)");
View Full Code Here

Examples of com.cloudera.flume.conf.SourceFactory.SourceBuilder

  /**
   * Builder takes one optional argument: the port to start on
   */
  public static SourceBuilder builder() {
    return new SourceBuilder() {
      @Override
      public EventSource build(Context ctx, String... argv) {
        Preconditions.checkArgument(argv.length <= 1, "usage: scribe[(port={"
            + FlumeConfiguration.DEFAULT_SCRIBE_SOURCE_PORT + "})]");
        int port = FlumeConfiguration.get().getScribeSourcePort();
View Full Code Here

Examples of com.cloudera.flume.conf.SourceFactory.SourceBuilder

          + e.getMessage(), e);
    }
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {
      @Override
      public EventSource build(Context ctx, String... argv) {
        Preconditions.checkArgument(argv.length == 1,
            "usage: thriftSource(port{, " + C_TRUNCATE + "=false)");
View Full Code Here

Examples of org.apache.synapse.util.jaxp.SourceBuilder

            }
           
            SynapseEnvironment synEnv = synCtx.getEnvironment();
            ResultBuilder resultBuilder =
                    resultBuilderFactory.createResultBuilder(synEnv, output);
            SourceBuilder sourceBuilder = sourceBuilderFactory.createSourceBuilder(synEnv);
           
            if (synLog.isTraceOrDebugEnabled()) {
                synLog.traceOrDebug("Using " + sourceBuilder.getClass().getName());
                synLog.traceOrDebug("Using " + resultBuilder.getClass().getName());
            }
           
            try {
                transformer.transform(sourceBuilder.getSource((OMElement)sourceNode),
                                      resultBuilder.getResult());
            } finally {
                sourceBuilder.release();
            }

            synLog.traceOrDebug("Transformation completed - processing result");

            // get the result OMElement
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.