[
https://issues.apache.org/jira/browse/HBASE-4879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14498347#comment-14498347
]
Jesse Yates commented on HBASE-4879:
------------------------------------
Hmm, I'm not sure when they got put under the private annotation. Indeed was
meant to be something used by users, not just limited to internal use (of which
there is none, AFAIK).
bq. Should this not be accessible, at least LimitedPrivate? But is it complete
enough to be used?
Yes, and yes. The tests are still running and passing (e.g.
TestConstraint.java), so constraints at least work. So it can be used, with
some caveats.
It has two main issues: (1) you still have to deploy a jar to the server that
contains the constraint (ala coprocessors or filters), and (2) its not useful
for many cases because as the docs say:
bq. Further, {@link Constraint Constraints} should probably not be used to
enforce cross-table references as it will cause tremendous write slowdowns, but
it is possible.
Obviously, there is no way around the second one, and the interface actually
goes out of its way to not allow you access to an HTable, to prevent this kind
of thing.
However, the flip side is that you have very limited utility. It becomes useful
for toy examples, but in real life its really limited to use. I don't know of
any users actively using constraints (though there was some interest when they
first came out).
Things that could be added to increase utility are: a limited HTable interface
that only accesses the local region and just for reads; a basic set of
constraint processors that uses the table properties to configure certain
constraints (e.g. all values must remain > 0); easy shell support.
Your call if you want to include it - they can be useful, but no one has
actually used them :) I'm happy to write code/do reviews/commit improvements,
if people actually want them, but until there is an actual user who wants them,
I'm reluctant to put any more work into it.
> Add Constraint support to shell
> -------------------------------
>
> Key: HBASE-4879
> URL: https://issues.apache.org/jira/browse/HBASE-4879
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 0.94.0
> Reporter: Jesse Yates
>
> Follow-on ticket to HBASE-4605. Extend the shell functionality to include
> altering a table to add a Constraint.
> Discussion around this can be found at:
> http://search-hadoop.com/m/EeYb3dezMM
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)