hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Yates (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-4605) Constraints
Date Thu, 17 Nov 2011 18:53:51 GMT

    [ https://issues.apache.org/jira/browse/HBASE-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152226#comment-13152226

Jesse Yates commented on HBASE-4605:

bq. I got compilation error trying to run integration test:

Hmmm, something was a little wonky - had test/ excluded to ignore some build issues, but that
neglected all the tests I added. But FWIW it passes locally ;) Throwing up the correct version

Also, please ignore package-info.java - its on the TODO list and just using a placeholder
for the moment.

SERIALIZE_KEY and SERIALIZE_VALUE perform the same transformation. I think they should be
combined into one Function, possibly named serializer so that naming for Functions is consistent
(with transformToStrings).

I was thinking it would be better to split them into two different elements since we may want
to change how we do the serialization for each in the future, and having the independence
makes it much easier to swap and adds negligible overhead.

bq. getValueAsBytes() is only used once. I think we can just inline what it does in getKeyValueForClass().

+1 thought it might be useful later, but we can always add it as needed. Making the fix in
the latest patch.
> Constraints
> -----------
>                 Key: HBASE-4605
>                 URL: https://issues.apache.org/jira/browse/HBASE-4605
>             Project: HBase
>          Issue Type: Improvement
>          Components: client, coprocessors
>    Affects Versions: 0.94.0
>            Reporter: Jesse Yates
>            Assignee: Jesse Yates
>         Attachments: constraint_as_cp.txt, java_Constraint_v2.patch
> From Jesse's comment on dev:
> {quote}
> What I would like to propose is a simple interface that people can use to implement a
'constraint' (matching the classic database definition). This would help ease of adoption
by helping HBase more easily check that box, help minimize code duplication across organizations,
and lead to easier adoption.
> Essentially, people would implement a 'Constraint' interface for checking keys before
they are put into a table. Puts that are valid get written to the table, but if not people
can will throw an exception that gets propagated back to the client explaining why the put
was invalid.
> Constraints would be set on a per-table basis and the user would be expected to ensure
the jars containing the constraint are present on the machines serving that table.
> Yes, people could roll their own mechanism for doing this via coprocessors each time,
but this would make it easier to do so, so you only have to implement a very minimal interface
and not worry about the specifics.
> {quote}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message