EntityId is used to identify a particular row under the key format of a Kiji table. There are two name-spaces for rows:
- Kiji rows are logically indexed by Kiji row keys (arbitrary byte arrays or a list of key components).
- Under the hood, rows are indexed by HBase row keys (arbitrary byte arrays).
The translation between Kiji row keys and HBase row keys depends on the layout of the table the row belongs to. The same Kiji row key may translate to two different EntityIds on two different tables, based on their key format. For a representation of row keys which is agnostic to row key formats, see {@link KijiRowKeyComponents}. There are multiple translation schemes:
- Raw: Kiji row keys and HBase row keys are identical (identity translation), specifically used when the row key is an array of bytes.
- Hash: HBase row keys are MD5 hashes of the Kiji row key (non reversible transform).
- Hash-prefix: HBase row keys are Kiji row keys prefixed by a hash of the Kiji row key.
- Formatted: The user specifies the composition of the key. The key can be composed of one or more components of type string, number or a hash of one of the other components.