Package com.cloudera.flume.conf

Examples of com.cloudera.flume.conf.FlumeConfigData


  LogicalNode setupAgent(long count, String agentSink) throws IOException,
      RuntimeException, FlumeSpecException {
    LogicalNode agent = new LogicalNode(
        new LogicalNodeContext("phys", "agent"), "agent");
    FlumeConfigData fcd = new FlumeConfigData(0, "asciisynth(" + count + ")",
        agentSink, 1, 1, "flow");
    agent.loadConfig(fcd);
    return agent;
  }
View Full Code Here


  LogicalNode setupColl(long port, String name, String acc) throws IOException,
      RuntimeException, FlumeSpecException {
    Context ctx = new LogicalNodeContext(new ReportTestingContext(), "phys",
        name);
    LogicalNode coll = new LogicalNode(ctx, name);
    FlumeConfigData fcd2 = new FlumeConfigData(0, "rpcSource(" + port + ")",
        "accumulator(\"" + acc + "\")", 1, 1, "flow");
    coll.loadConfig(fcd2);
    return coll;
  }
View Full Code Here

      LOG.info("creating new logical node " + name);
      nd = new LogicalNode(ctx, name);
      threads.put(nd.getName(), nd);
    }
    long ver = Clock.unixTime();
    FlumeConfigData fcd = new FlumeConfigData(ver, src, snk, ver, ver,
        FlumeConfiguration.get().getDefaultFlowName());
    nd.loadConfig(fcd);

  }
View Full Code Here

    assertEquals("one", logicalNodes.get(0));
    assertEquals("two", logicalNodes.get(1));
    assertEquals("three", logicalNodes.get(2));
    assertEquals("four", logicalNodes.get(3));

    FlumeConfigData data = masterRPC.getConfig(new LogicalNode(null, ""));
    assertEquals("flowID", data.flowID);
    assertEquals("sinkConfig", data.sinkConfig);
    assertEquals(112233, data.sinkVersion);
    assertEquals("sourceConfig", data.sourceConfig);
    assertEquals(445566, data.sourceVersion);
View Full Code Here

    @Override
    public AvroFlumeConfigData getConfig(CharSequence sourceId)
        throws AvroRemoteException {
      Log.info("getConfig called at server on " + this.server.getPort());
      FlumeConfigData out = new FlumeConfigData();
      out.flowID = "flowID";
      out.sinkConfig = "sinkConfig";
      out.sinkVersion = 112233;
      out.sourceConfig = "sourceConfig";
      out.sourceVersion = 445566;
View Full Code Here

    }

    @Override
    public ThriftFlumeConfigData getConfig(String sourceId) throws TException {
      Log.info("getConfig called at server on " + this.port);
      FlumeConfigData out = new FlumeConfigData();
      out.flowID = "flowID";
      out.sinkConfig = "sinkConfig";
      out.sinkVersion = 112233;
      out.sourceConfig = "sourceConfig";
      out.sourceVersion = 445566;
View Full Code Here

      throw new TException("Throwing an exception");
    }

    @Override
    public ThriftFlumeConfigData getConfig(String sourceId) throws TException {
      return MasterClientServerThrift.configToThrift(new FlumeConfigData());
    }
View Full Code Here

        return set;
      }
    });

    // 0 is the first cfg version
    FlumeConfigData cfg = new FlumeConfigData(0, "null", "null", 0, 0,
        "my-test-flow");
    node.loadConfig(cfg); // this will load the NextExnSource and a NullSink

    Map<String, ReportEvent> reports = new HashMap<String, ReportEvent>();
    node.getReports(reports);
View Full Code Here

    retval = sh.executeLine("exec load '" + saveFile.getAbsolutePath() + "'");
    assertEquals(0, retval);

    ConfigurationManager manager = flumeMaster.getSpecMan();
    FlumeConfigData data = manager.getConfig("foo");
    assertEquals(data.getSinkConfig(), "console");
    assertEquals(data.getSourceConfig(), "null");
  }
View Full Code Here

    sh.executeLine("connect localhost: "
        + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    sh
        .executeLine("exec config foo 'synth(100)' '{delay(100) => accumulator(\"count\") }' ");

    FlumeConfigData fcd = flumeMaster.getSpecMan().getConfig("foo");
    assertEquals("{delay(100) => accumulator(\"count\") }", fcd.sinkConfig);
    assertEquals("synth(100)", fcd.sourceConfig);
    assertTrue(0 != fcd.timestamp);

    sh.executeLine("waitForNodesDone 0 foo");
View Full Code Here

TOP

Related Classes of com.cloudera.flume.conf.FlumeConfigData

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.