[
https://issues.apache.org/jira/browse/HBASE-1804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749604#action_12749604
]
Jonathan Gray commented on HBASE-1804:
--------------------------------------
Issue is because we use a special FAMILY_COMPARATOR for the HTD map... It
currently ignores the delimiter when doing the comparison. IMO, we should not
ignore it, if we support old API stuff with delimiters, we should be stripping
them before we do any family checking.
{code}
public static final RawComparator<byte []> FAMILY_COMPARATOR =
new RawComparator<byte []> () {
public int compare(byte [] a, int ao, int al, byte [] b, int bo, int bl) {
int indexa = KeyValue.getDelimiter(a, ao, al, COLUMN_FAMILY_DELIMITER);
if (indexa < 0) {
indexa = al;
}
int indexb = KeyValue.getDelimiter(b, bo, bl, COLUMN_FAMILY_DELIMITER);
if (indexb < 0) {
indexb = bl;
}
return Bytes.compareTo(a, ao, indexa, b, bo, indexb);
}
public int compare(byte[] a, byte[] b) {
return compare(a, 0, a.length, b, 0, b.length);
}
};
{code}
> Puts are permitted (and stored) when including an appended colon
> ----------------------------------------------------------------
>
> Key: HBASE-1804
> URL: https://issues.apache.org/jira/browse/HBASE-1804
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.20.0
> Reporter: Jonathan Gray
> Assignee: Jonathan Gray
> Fix For: 0.20.0, 0.21.0
>
>
> If I have a table with family "testFamily", currently I can do Puts using the
> new API by specifying the family name with or without a colon. The KV is
> then stored w/ or w/o depending on how the Put was done.
> If you try to Put.add("testFamily:", "qualifier", "value") this should throw
> a NoSuchColumnFamilyException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.