Examples of CINode


Examples of org.apache.gora.goraci.generated.CINode

    Random rand = new Random();

    long numQueries = 0;
   
    while (numQueries < maxQueries) {
      CINode node = findStartNode(rand, store);
      numQueries++;
      while (node != null && node.getPrev() >= 0 && numQueries < maxQueries) {
        long prev = node.getPrev();

        long t1 = System.currentTimeMillis();
        node = store.get(prev, PREV_FIELD);
        long t2 = System.currentTimeMillis();
        System.out.printf("CQ %d %016x \n", t2 - t1, prev);
View Full Code Here

Examples of org.apache.gora.goraci.generated.CINode

      first[first.length - 1] = ez;
    }
   
    private static void persist(Context output, DataStore<Long,CINode> store, long count, long[] prev, long[] current, Utf8 id) throws IOException {
      for (int i = 0; i < current.length; i++) {
        CINode node = store.newPersistent();
        node.setCount(count + i);
        if (prev != null)
          node.setPrev(prev[i]);
        else
          node.setPrev((long) -1);
        node.setClient(id);
       
        store.put(current[i], node);
        if (i % 1000 == 0) {
          // Tickle progress every so often else maprunner will think us hung
          output.progress();
View Full Code Here

Examples of org.apache.gora.goraci.generated.CINode

      store.flush();
    }
   
    private static void updatePrev(DataStore<Long,CINode> store, long[] first, long[] current) throws IOException {
      for (int i = 0; i < current.length; i++) {
        CINode node = store.newPersistent();
        node.setPrev(current[i]);
        store.put(first[i], node);
      }
     
      store.flush();
    }
View Full Code Here

Examples of org.apache.gora.goraci.generated.CINode

      query.setLimit(100);

    Result<Long,CINode> rs = store.execute(query);

    while (rs.next()) {
      CINode node = rs.get();
      System.out.printf("%016x:%016x:%012d:%s\n", rs.getKey(), node.getPrev(), node.getCount(), node.getClient());

    }
   
    store.close();
   
View Full Code Here

Examples of org.apache.gora.goraci.generated.CINode

      first[first.length - 1] = ez;
    }
   
    private static void persist(Context output, DataStore<Long,CINode> store, long count, long[] prev, long[] current, Utf8 id) throws IOException {
      for (int i = 0; i < current.length; i++) {
        CINode node = store.newPersistent();
        node.setCount(count + i);
        if (prev != null)
          node.setPrev(prev[i]);
        else
          node.setPrev((long) -1);
        node.setClient(id);
       
        store.put(current[i], node);
        if (i % 1000 == 0) {
          // Tickle progress every so often else maprunner will think us hung
          output.progress();
View Full Code Here

Examples of org.apache.gora.goraci.generated.CINode

      store.flush();
    }
   
    private static void updatePrev(DataStore<Long,CINode> store, long[] first, long[] current) throws IOException {
      for (int i = 0; i < current.length; i++) {
        CINode node = store.newPersistent();
        node.setPrev(current[i]);
        store.put(first[i], node);
      }
     
      store.flush();
    }
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.