Package org.apache.accumulo.examples.wikisearch.protobuf.Uid.List

Examples of org.apache.accumulo.examples.wikisearch.protobuf.Uid.List.Builder.build()


        // Create a UID object for the Value
        Builder uidBuilder = Uid.List.newBuilder();
        uidBuilder.setIGNORE(false);
        uidBuilder.setCOUNT(1);
        uidBuilder.addUID(Integer.toString(article.getId()));
        Uid.List uidList = uidBuilder.build();
        Value val = new Value(uidList.toByteArray());
       
        // Create mutations for the global index
        // Row is field value, colf is field name, colq is partitionid\0language, value is Uid.List object
        Mutation gm = new Mutation(index.getValue());
View Full Code Here


  public void testSingleUid() {
    Builder b = createNewUidList();
    b.setCOUNT(1);
    b.setIGNORE(false);
    b.addUID(UUID.randomUUID().toString());
    Uid.List uidList = b.build();
    Value val = new Value(uidList.toByteArray());
    values.add(val);
    Value result = combiner.reduce(new Key(), values.iterator());
    assertTrue(val.compareTo(result.get()) == 0);
  }
View Full Code Here

      b.setIGNORE(false);
      String uuid = UUID.randomUUID().toString();
      savedUUIDs.add(uuid);
      b.setCOUNT(i);
      b.addUID(uuid);
      Uid.List uidList = b.build();
      Value val = new Value(uidList.toByteArray());
      values.add(val);
    }
    Value result = combiner.reduce(new Key(), values.iterator());
    Uid.List resultList = Uid.List.parseFrom(result.get());
View Full Code Here

      b.setIGNORE(false);
      String uuid = UUID.randomUUID().toString();
      savedUUIDs.add(uuid);
      b.setCOUNT(i);
      b.addUID(uuid);
      Uid.List uidList = b.build();
      Value val = new Value(uidList.toByteArray());
      values.add(val);
    }
    Value result = combiner.reduce(new Key(), values.iterator());
    Uid.List resultList = Uid.List.parseFrom(result.get());
View Full Code Here

      b.setIGNORE(false);
      String uuid = UUID.randomUUID().toString();
      savedUUIDs.add(uuid);
      b.setCOUNT(1);
      b.addUID(uuid);
      Uid.List uidList = b.build();
      Value val = new Value(uidList.toByteArray());
      values.add(val);
    }
    Value result = combiner.reduce(new Key(), values.iterator());
    Uid.List resultList = Uid.List.parseFrom(result.get());
View Full Code Here

  @Test
  public void testSeenIgnore() throws Exception {
    Builder b = createNewUidList();
    b.setIGNORE(true);
    b.setCOUNT(0);
    Uid.List uidList = b.build();
    Value val = new Value(uidList.toByteArray());
    values.add(val);
    b = createNewUidList();
    b.setIGNORE(false);
    b.setCOUNT(1);
View Full Code Here

    values.add(val);
    b = createNewUidList();
    b.setIGNORE(false);
    b.setCOUNT(1);
    b.addUID(UUID.randomUUID().toString());
    uidList = b.build();
    val = new Value(uidList.toByteArray());
    values.add(val);
    Value result = combiner.reduce(new Key(), values.iterator());
    Uid.List resultList = Uid.List.parseFrom(result.get());
    assertTrue(resultList.getIGNORE() == true);
View Full Code Here

    for (int i = 0; i < 5; i++) {
      Builder b = createNewUidList();
      b.setCOUNT(1);
      b.setIGNORE(false);
      b.addUID(uuid.toString());
      Uid.List uidList = b.build();
      Value val = new Value(uidList.toByteArray());
      values.add(val);
    }
    Value result = combiner.reduce(new Key(), values.iterator());
    Uid.List resultList = Uid.List.parseFrom(result.get());
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.