private HTableDescriptor prepareTableDescriptor(String tableName,
      String entitySchemaString) {
    HTableDescriptor descriptor = new HTableDescriptor(
        Bytes.toBytes(tableName));
    AvroEntitySchema entitySchema = parser
        .parseEntitySchema(entitySchemaString);
    Set<String> familiesToAdd = entitySchema.getColumnMappingDescriptor()
        .getRequiredColumnFamilies();
    familiesToAdd.add(new String(Constants.SYS_COL_FAMILY));
    familiesToAdd.add(new String(Constants.OBSERVABLE_COL_FAMILY));
    for (String familyToAdd : familiesToAdd) {
      if (!descriptor.hasFamily(familyToAdd.getBytes())) {
        descriptor.addFamily(new HColumnDescriptor(familyToAdd));
      }
    }
    return descriptor;
  }
private HTableDescriptor prepareTableDescriptor ( String tableName , String entitySchemaString ) { HTableDescriptor descriptor = new HTableDescriptor ( Bytes . toBytes ( tableName ) ) ; AvroEntitySchema entitySchema = parser . parseEntitySchema ( entitySchemaString ) ; Set < String > familiesToAdd = entitySchema . getColumnMappingDescriptor ( ) . getRequiredColumnFamilies ( ) ; familiesToAdd . add ( new String ( Constants . SYS_COL_FAMILY ) ) ; familiesToAdd . add ( new String ( Constants . OBSERVABLE_COL_FAMILY ) ) ; for ( String familyToAdd : familiesToAdd ) { if ( ! descriptor . hasFamily ( familyToAdd . getBytes ( ) ) ) { descriptor . addFamily ( new HColumnDescriptor ( familyToAdd ) ) ; } } return descriptor ; }
Prepare the Table descriptor for the given entity Schema