Package org.hbase.async

Examples of org.hbase.async.GetRequest.family()


  }

  /** Returns the cell of the specified row key, using family:kind. */
  private Deferred<byte[]> hbaseGet(final byte[] key, final byte[] family) {
    final GetRequest get = new GetRequest(table, key);
    get.family(family).qualifier(kind);
    class GetCB implements Callback<byte[], ArrayList<KeyValue>> {
      public byte[] call(final ArrayList<KeyValue> row) {
        if (row == null || row.isEmpty()) {
          return null;
        }
View Full Code Here


      }
     
    }
   
    final GetRequest get = new GetRequest(tsdb.uidTable(), MAXID_ROW);
    get.family(ID_FAMILY);
    get.qualifiers(kinds);
    return tsdb.getClient().get(get).addCallback(new GetCB());
  }
}
View Full Code Here

          }
         
        }
       
        final GetRequest get = new GetRequest(tsdb.uidTable(), uid);
        get.family(FAMILY);
        get.qualifier((type.toString().toLowerCase() + "_meta").getBytes(CHARSET));
        return tsdb.getClient().get(get).addCallbackDeferring(new FetchMetaCB());
      }
    }
   
View Full Code Here

    final Leaf leaf = new Leaf();
    leaf.setDisplayName(display_name);
   
    final GetRequest get = new GetRequest(tsdb.treeTable(), branch_id);
    get.family(Tree.TREE_FAMILY());
    get.qualifier(leaf.columnQualifier());
   
    /**
     * Called with the results of the fetch from storage
     */
 
View Full Code Here

      throw new IllegalArgumentException("Invalid Tree ID");
    }

    // fetch the whole row
    final GetRequest get = new GetRequest(tsdb.treeTable(), idToBytes(tree_id));
    get.family(TREE_FAMILY);
   
    /**
     * Called from the GetRequest with results from storage. Loops through the
     * columns and loads the tree definition and rules
     */
 
View Full Code Here

    final byte[] row_key = new byte[TREE_ID_WIDTH + 1];
    System.arraycopy(idToBytes(tree_id), 0, row_key, 0, TREE_ID_WIDTH);
    row_key[TREE_ID_WIDTH] = COLLISION_ROW_SUFFIX;
   
    final GetRequest get = new GetRequest(tsdb.treeTable(), row_key);
    get.family(TREE_FAMILY);
   
    // if the caller provided a list of TSUIDs, then we need to compile a list
    // of qualifiers so we only fetch those columns.
    if (tsuids != null && !tsuids.isEmpty()) {
      final byte[][] qualifiers = new byte[tsuids.size()][];
View Full Code Here

    final byte[] row_key = new byte[TREE_ID_WIDTH + 1];
    System.arraycopy(idToBytes(tree_id), 0, row_key, 0, TREE_ID_WIDTH);
    row_key[TREE_ID_WIDTH] = NOT_MATCHED_ROW_SUFFIX;
   
    final GetRequest get = new GetRequest(tsdb.treeTable(), row_key);
    get.family(TREE_FAMILY);
   
    // if the caller provided a list of TSUIDs, then we need to compile a list
    // of qualifiers so we only fetch those columns.
    if (tsuids != null && !tsuids.isEmpty()) {
      final byte[][] qualifiers = new byte[tsuids.size()][];
View Full Code Here

   */
  public static Deferred<Boolean> metaExistsInStorage(final TSDB tsdb,
      final String tsuid) {
    final GetRequest get = new GetRequest(tsdb.metaTable(),
        UniqueId.stringToUid(tsuid));
    get.family(FAMILY);
    get.qualifier(META_QUALIFIER);
   
    /**
     * Callback from the GetRequest that simply determines if the row is empty
     * or not
View Full Code Here

   * @throws HBaseException if there was an issue fetching
   */
  public static Deferred<Boolean> counterExistsInStorage(final TSDB tsdb,
      final byte[] tsuid) {
    final GetRequest get = new GetRequest(tsdb.metaTable(), tsuid);
    get.family(FAMILY);
    get.qualifier(COUNTER_QUALIFIER);
   
    /**
     * Callback from the GetRequest that simply determines if the row is empty
     * or not
View Full Code Here

      }
     
    }
   
    final GetRequest get = new GetRequest(tsdb.metaTable(), tsuid);
    get.family(FAMILY);
    get.qualifiers(new byte[][] { COUNTER_QUALIFIER, META_QUALIFIER });
    return tsdb.getClient().get(get).addCallbackDeferring(new GetCB());
  }
 
  /** @return The configured meta data column qualifier byte array*/
 
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.