Package com.cloudera.flume.handlers.debug

Examples of com.cloudera.flume.handlers.debug.AttrSynthSource


   *
   * @throws InterruptedException
   */
  @Test
  public void checkAttrSynth() throws IOException, InterruptedException {
    EventSource src = new AttrSynthSource(5, 10, 20, 15, 1337);
    Event e = null;
    EventSink snk = new ConsoleEventSink(new AvroJsonOutputFormat());
    MemorySinkSource mem = new MemorySinkSource();
    while ((e = src.next()) != null) {
      snk.append(e); // visual inspection
      mem.append(e); // testing
    }

    mem.open();
View Full Code Here


  public static Map<String, EventSource> createTinyCases() {
    return new HashMap<String, EventSource>() {
      {
        // datasets with fields, x attributes, 10 byte long attr names, 10
        // byte values.
        put("10,10,5,5,8", new AttrSynthSource(10, 5, 5, 8, 1337));
      }
    };
  }
View Full Code Here

  public static Map<String, EventSource> createVariedNumAttrsCases() {
    return new HashMap<String, EventSource>() {
      {
        // datasets with fields, x attributes, 10 byte long attr names, 10
        // byte values.
        put("100000,0,10,10,10", new AttrSynthSource(100000, 10, 10, 10, 1337));
        put("100000,0,100,10,10",
            new AttrSynthSource(100000, 100, 10, 10, 1337));
        put("10000,0,1000,10,10",
            new AttrSynthSource(10000, 1000, 10, 10, 1337));
        put("1000,0,10000,10,10",
            new AttrSynthSource(1000, 10000, 10, 10, 1337));
      }
    };
  }
View Full Code Here

  public static Map<String, EventSource> createVariedValSizeCases() {
    return new HashMap<String, EventSource>() {
      {
        // datasets with fields, 10 attributes, 10 byte long attr names, xx
        // byte values.
        put("100000,0,10,10,10", new AttrSynthSource(100000, 10, 10, 10, 1337));
        put("100000,0,10,10,100",
            new AttrSynthSource(100000, 10, 10, 100, 1337));
        put("100000,0,10,10,1000", new AttrSynthSource(100000, 10, 10, 1000,
            1337));
        put("1000,0,10,10,10000", new AttrSynthSource(10000, 10, 10, 10000,
            1337));
      }
    };
  }
View Full Code Here

TOP

Related Classes of com.cloudera.flume.handlers.debug.AttrSynthSource

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.