Package com.pardot.rhombus.util.faker

Examples of com.pardot.rhombus.util.faker.FakeR


    for (String cdefKey : cdefs.keySet()) {
      totalIndexCount += cdefs.get(cdefKey).getIndexes().size();
    }

    FakeR faker1 = new FakeR(ckdef, wideRowsPerIndex, totalObjectsPerWideRange, totalObjectsPerShard);
    Iterator<Map<String, Object>> iterator = faker1.getMasterIterator(CObjectOrdering.ASCENDING, null, null);

    Map<String, Map<String, Object>> materializedObjects1 = Maps.newHashMap();
    while (iterator.hasNext()) {
      Map<String, Object> next = iterator.next();
      assertTrue(next.containsKey("id"));
      assertFalse("Materialized objects shouldn't have this id yet", materializedObjects1.containsKey(next.get("id").toString()));
      materializedObjects1.put(next.get("id").toString(), next);
    }
    assertFalse(materializedObjects1.isEmpty());
    assertEquals(totalObjectsPerWideRange * totalIndexCount, materializedObjects1.size());
    System.out.printf("Wide rows per index:%d, indexes per definition:1, objects per wide range:%d, objects per shard:%d, total object count:%d",
        wideRowsPerIndex, totalObjectsPerWideRange, totalObjectsPerShard, materializedObjects1.size());

    Thread.sleep(500);

    // Let's do it again and see if we get the same results
    FakeR faker2 = new FakeR(ckdef, wideRowsPerIndex, totalObjectsPerWideRange, totalObjectsPerShard);
    iterator = faker2.getMasterIterator(CObjectOrdering.ASCENDING, null, null);

    Map<String, Map<String, Object>> materializedObjects2 = Maps.newHashMap();
    while (iterator.hasNext()) {
      Map<String, Object> next = iterator.next();
      assertTrue(next.containsKey("id"));
View Full Code Here

TOP

Related Classes of com.pardot.rhombus.util.faker.FakeR

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.