private void verifyColumns() {
   if (AbstractRecordReader.isStarQuery(columns)) {
     return;
   }
   for (SchemaPath column : columns) {
     if (!(column.equals(ROW_KEY_PATH)
         || hTableDesc.hasFamily(HBaseUtils.getBytes(column.getRootSegment().getPath())))) {
       DrillRuntimeException.format(
           "The column family '%s' does not exist in HBase table: %s .",
           column.getRootSegment().getPath(), hTableDesc.getNameAsString());
     }
   }
 }
예제 #2
0
  /**
   * Load the object from HBase - rememmber to pull the orig length from the hash params
   *
   * @param sax_hash_key
   */
  public static NodePersisted LoadFromStore(String isax_hash, String table_name) {

    NodePersisted hbase_node = null;
    byte[] node_bytes = null;
    try {
      node_bytes =
          HBaseUtils.Get(
              isax_hash, table_name, ISAXIndex.COLUMN_FAMILY_NAME, ISAXIndex.STORE_COL_NAME);
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    if (null == node_bytes) {
      return null;
    }

    hbase_node = NodePersisted.deserialize_unknown(isax_hash, node_bytes);

    hbase_node.SetTableName(table_name);

    return hbase_node;
  }