Package com.cloudera.flume.conf

Examples of com.cloudera.flume.conf.FlumeConfigData


    f.deleteOnExit();
    cm.saveConfigFile(f.getAbsolutePath());
    assertTrue(f.exists());
    assertTrue(f.length() > 0);

    FlumeConfigData data = cm.getConfig("test1");
    assertEquals(data.sinkConfig, "console");
    assertEquals(data.sourceConfig, "console");

    // overwrite previous config.
    cm.setConfig("test1", "test-flow", "null", "null");
View Full Code Here


   */
  @Test
  public void testMasterNoNode() {
    Map<String, FlumeConfigData> xcfgs = flumeMaster.getSpecMan()
        .getTranslatedConfigs();
    FlumeConfigData agentFcd = xcfgs.get("agent");
    String ans1 = "{ ackedWriteAhead => { stubbornAppend => { insistentOpen => "
        + "< fail( \"logicalSink( \\\"node4\\\" )\" ) ?"
        + " < fail( \"logicalSink( \\\"node2\\\" )\" ) ?"
        + " fail( \"logicalSink( \\\"node1\\\" )\" ) > > } } }";
    assertEquals(agentFcd.sinkConfig, ans1);
View Full Code Here

    // Look, no explicit updates!

    // check new config
    Map<String, FlumeConfigData> xcfgs2 = flumeMaster.getSpecMan()
        .getTranslatedConfigs();
    FlumeConfigData agentFcd2 = xcfgs2.get("agent");
    String ans2 = "{ ackedWriteAhead => { stubbornAppend => { insistentOpen => "
        + "< fail( \"logicalSink( \\\"node4\\\" )\" ) ?"
        + " < fail( \"logicalSink( \\\"node1\\\" )\" ) ?"
        + " fail( \"logicalSink( \\\"node3\\\" )\" ) > > } } }";
    assertEquals(agentFcd2.sinkConfig, ans2);
View Full Code Here

    // Look, no explicit update call!

    // check new config
    Map<String, FlumeConfigData> xcfgs2 = flumeMaster.getSpecMan()
        .getTranslatedConfigs();
    FlumeConfigData agentFcd2 = xcfgs2.get("agent");
    // This is wrong -- there should be a different logicalSink replacing node2
    String ans2 = "{ ackedWriteAhead => { stubbornAppend => { insistentOpen => "
        + "< fail( \"logicalSink( \\\"node4\\\" )\" ) ?"
        + " < fail( \"logicalSink( \\\"node1\\\" )\" ) ?"
        + " fail( \"logicalSink( \\\"node3\\\" )\" ) > > } } }";
View Full Code Here

    // Look, no explicit update call!

    // check new config
    Map<String, FlumeConfigData> xcfgs2 = flumeMaster.getSpecMan()
        .getTranslatedConfigs();
    FlumeConfigData agentFcd2 = xcfgs2.get("agent");
    String ans2 = "{ ackedWriteAhead => { stubbornAppend => { insistentOpen =>"
        + " < fail( \"logicalSink( \\\"nodeNew\\\" )\" ) ?"
        + " < fail( \"logicalSink( \\\"node4\\\" )\" ) ?"
        + " fail( \"logicalSink( \\\"node2\\\" )\" ) > > } } }";
    assertEquals(agentFcd2.sinkConfig, ans2);
View Full Code Here

    // Look, no explicit update call!

    // check new config
    Map<String, FlumeConfigData> xcfgs2 = flumeMaster.getSpecMan()
        .getTranslatedConfigs();
    FlumeConfigData agentFcd2 = xcfgs2.get("agent");
    // This is wrong -- there should be a different logicalSink replacing node2
    String ans2 = "{ ackedWriteAhead => { stubbornAppend => { insistentOpen =>"
        + " < rpcSink( \"" + host + "\", 35856 ) ?" + " < rpcSink( \"" + host
        + "\", 35854 ) ?" + " rpcSink( \"" + host + "\", 35853 ) > > } } }";
    assertEquals(ans2, agentFcd2.sinkConfig);
View Full Code Here

    // Look, no explicit update call!

    // check new config
    Map<String, FlumeConfigData> xcfgs2 = flumeMaster.getSpecMan()
        .getTranslatedConfigs();
    FlumeConfigData agentFcd2 = xcfgs2.get("agent");
    String ans2 = "{ ackedWriteAhead => { stubbornAppend => { insistentOpen =>"
        + " < fail( \"logicalSink( \\\"node4\\\" )\" ) ?"
        + " < fail( \"logicalSink( \\\"node2\\\" )\" ) ?"
        + " fail( \"logicalSink( \\\"node1\\\" )\" ) > > } } }";
View Full Code Here

      currentVersion = zkCounter.incrementAndGet();
    } catch (Exception e) {
      throw new IOException("Could not increment version counter...", e);
    }

    cfgs.put(host, new FlumeConfigData(Clock.unixTime(), source, sink,
        currentVersion, currentVersion, flowid));
    saveConfigs(CFGS_PATH);
  }
View Full Code Here

    } catch (Exception e) {
      throw new IOException("Could not increment version counter...", e);
    }

    for (Entry<String, FlumeConfigData> e : configs.entrySet()) {
      FlumeConfigData f = new FlumeConfigData(Clock.unixTime(), e.getValue()
          .getSourceConfig(), e.getValue().getSinkConfig(), currentVersion,
          currentVersion, e.getValue().getFlowID());
      cfgs.put(e.getKey(), f);
    }
    saveConfigs(CFGS_PATH);
View Full Code Here

   */
  @Test
  public void testMasterNoNode() {
    Map<String, FlumeConfigData> xcfgs = flumeMaster.getSpecMan()
        .getTranslatedConfigs();
    FlumeConfigData agentFcd = xcfgs.get("agent");
    String ans1 = "< { lazyOpen => fail( \"logicalSink( \\\"node4\\\" )\" ) } ?"
        + " < { lazyOpen => fail( \"logicalSink( \\\"node2\\\" )\" ) } ?"
        + " < { lazyOpen => fail( \"logicalSink( \\\"node1\\\" )\" ) } ? null > > >";
    assertEquals(agentFcd.sinkConfig, ans1);
  }
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.