Translates ColumnIds to HBase column names.
Encodes to a byte array making it as short as possible. We use characters that HBase allows (no control characters and no colon).
116117118119120121122123124125126
throw new NoSuchColumnException(kijiColumnName.toString()); } final ColumnId familyID = family.getId(); final byte[] familyBytes = familyID.toByteArray(); if (qualifierName == null) { // Unqualified column return new CassandraColumnName(familyBytes, null); } else if (family.isGroupType()) {
124125126127128129130131132133134
// Unqualified column return new CassandraColumnName(familyBytes, null); } else if (family.isGroupType()) { // Group type family. final ColumnId qualifierID = family.getColumnIdNameMap().inverse().get(qualifierName); final byte[] qualifierBytes = qualifierID.toByteArray(); return new CassandraColumnName(familyBytes, qualifierBytes); } else { // Map type family. assert family.isMapType(); final byte[] qualifierBytes = Bytes.toBytes(qualifierName);