Java Code Examples for org.apache.hadoop.hbase.client.Put.get()

The following are Jave code examples for showing how to use get() of the org.apache.hadoop.hbase.client.Put class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: ditb   File: SimpleIndexKeyGenerator.java   Source Code and License Vote up 6 votes
@Override public byte[] createIndexRowKey(final IndexSpecification indexSpec, final Put put) {
  List<Cell> values = put.get(indexSpec.getFamily(), indexSpec.getQualifier());
  if (values == null || values.size() == 0) {
    return null;
  }
  if (values.size() > 1) {
    throw new IllegalArgumentException(
        "Make sure that there is at most one value for an index column in a Put");
  }
  byte[] value = values.get(0).getValue();
  return createIndexRowKey(put.getRow(), value);
}