hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiraposter@reviews.apache.org (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-4605) Constraints
Date Sat, 29 Oct 2011 03:57:34 GMT

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

jiraposter@reviews.apache.org commented on HBASE-4605:
------------------------------------------------------



bq.  On 2011-10-26 23:01:06, Ted Yu wrote:
bq.  > src/main/java/org/apache/hadoop/hbase/constraint/ConstraintProcessor.java, line
49
bq.  > <https://reviews.apache.org/r/2579/diff/1/?file=53674#file53674line49>
bq.  >
bq.  >     This condition can be expressed as !constraints.isEmpty()

I was concerned with speed here - maybe a premature optimization and bit of assumption on
my part that the check of is empty takes longer than a boolean, and that my way has minimal
memory overhead


bq.  On 2011-10-26 23:01:06, Ted Yu wrote:
bq.  > src/main/java/org/apache/hadoop/hbase/constraint/ConstraintProcessor.java, line
77
bq.  > <https://reviews.apache.org/r/2579/diff/1/?file=53674#file53674line77>
bq.  >
bq.  >     This has been done, right ?

yup, just some cruft.


bq.  On 2011-10-26 23:01:06, Ted Yu wrote:
bq.  > src/main/java/org/apache/hadoop/hbase/constraint/ConstraintProcessor.java, line
83
bq.  > <https://reviews.apache.org/r/2579/diff/1/?file=53674#file53674line83>
bq.  >
bq.  >     Contents of put should be included.

+1


bq.  On 2011-10-26 23:01:06, Ted Yu wrote:
bq.  > src/main/java/org/apache/hadoop/hbase/constraint/Constraints.java, line 135
bq.  > <https://reviews.apache.org/r/2579/diff/1/?file=53675#file53675line135>
bq.  >
bq.  >     We can either add removeCoprocessor() to HTD or, persist a flag to tell ConstraintProcessor
that it is disabled.
bq.  >     
bq.  >     I think the second approach may be better in our case.

see comments on Gary's comments.


bq.  On 2011-10-26 23:01:06, Ted Yu wrote:
bq.  > src/main/java/org/apache/hadoop/hbase/constraint/Constraints.java, line 140
bq.  > <https://reviews.apache.org/r/2579/diff/1/?file=53675#file53675line140>
bq.  >
bq.  >     Should be 'desc HTableDescriptor to read from'

+1


- Jesse


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2579/#review2870
-----------------------------------------------------------


On 2011-10-26 22:34:35, Jesse Yates wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2579/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-10-26 22:34:35)
bq.  
bq.  
bq.  Review request for hbase.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Most of the implementation for adding constraints as a coprocessor. 
bq.  
bq.  Looking for general comments on style/structure, though nitpicks are ok too. 
bq.  
bq.  Currently missing implementation for disableConstraints() since that will require adding
removeCoprocessor() to HTD (also comments on if this is worth it would be good). 
bq.  
bq.  
bq.  This addresses bug HBASE-4605.
bq.      https://issues.apache.org/jira/browse/HBASE-4605
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/main/java/org/apache/hadoop/hbase/constraint/BaseConstraint.java PRE-CREATION 
bq.    src/main/java/org/apache/hadoop/hbase/constraint/Constraint.java PRE-CREATION 
bq.    src/main/java/org/apache/hadoop/hbase/constraint/ConstraintProcessor.java PRE-CREATION

bq.    src/main/java/org/apache/hadoop/hbase/constraint/Constraints.java PRE-CREATION 
bq.    src/main/java/org/apache/hadoop/hbase/constraint/IntegerConstraint.java PRE-CREATION

bq.    src/test/java/org/apache/hadoop/hbase/constraint/IntegrationTestConstraint.java PRE-CREATION

bq.  
bq.  Diff: https://reviews.apache.org/r/2579/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Adding IntegrationTestConstraint and unit tests for Constraints and IntegerConstraint.
All of those pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jesse
bq.  
bq.


                
> 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

        

Mime
View raw message