Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C89F9797E for ; Tue, 29 Nov 2011 20:22:10 +0000 (UTC) Received: (qmail 95894 invoked by uid 500); 29 Nov 2011 20:22:09 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 95862 invoked by uid 500); 29 Nov 2011 20:22:09 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 95829 invoked by uid 99); 29 Nov 2011 20:22:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2011 20:22:09 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2011 20:22:05 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C419CA7AAC for ; Tue, 29 Nov 2011 20:21:44 +0000 (UTC) Date: Tue, 29 Nov 2011 20:21:44 +0000 (UTC) From: "jiraposter@reviews.apache.org (Commented) (JIRA)" To: issues@hbase.apache.org Message-ID: <1170612008.23134.1322598104804.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1672117683.1395.1318875790749.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-4605) Constraints MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159516#comment-13159516 ] jiraposter@reviews.apache.org commented on HBASE-4605: ------------------------------------------------------ ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/2579/ ----------------------------------------------------------- (Updated 2011-11-29 20:19:41.250509) Review request for hbase. Changes ------- Updating to incorporate Gary and Ted's latest (as of 11/29) comments. Mostly cleanup in syntax. Also pushing up latest documentation changes that we previously on the Jira. Summary ------- Most of the implementation for adding constraints as a coprocessor. Looking for general comments on style/structure, though nitpicks are ok too. Currently missing implementation for disableConstraints() since that will require adding removeCoprocessor() to HTD (also comments on if this is worth it would be good). This addresses bug HBASE-4605. https://issues.apache.org/jira/browse/HBASE-4605 Diffs (updated) ----- src/docbkx/book.xml 3c12169 src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java 84a0d1a src/main/java/org/apache/hadoop/hbase/constraint/BaseConstraint.java PRE-CREATION src/main/java/org/apache/hadoop/hbase/constraint/Constraint.java PRE-CREATION src/main/java/org/apache/hadoop/hbase/constraint/ConstraintException.java PRE-CREATION src/main/java/org/apache/hadoop/hbase/constraint/ConstraintProcessor.java PRE-CREATION src/main/java/org/apache/hadoop/hbase/constraint/Constraints.java PRE-CREATION src/main/java/org/apache/hadoop/hbase/constraint/IntegerConstraint.java PRE-CREATION src/main/java/org/apache/hadoop/hbase/constraint/package-info.java PRE-CREATION src/test/java/org/apache/hadoop/hbase/TestHTableDescriptor.java PRE-CREATION src/test/java/org/apache/hadoop/hbase/constraint/AllFailConstraint.java PRE-CREATION src/test/java/org/apache/hadoop/hbase/constraint/AllPassConstraint.java PRE-CREATION src/test/java/org/apache/hadoop/hbase/constraint/CheckConfigurationConstraint.java PRE-CREATION src/test/java/org/apache/hadoop/hbase/constraint/IntegrationTestConstraint.java PRE-CREATION src/test/java/org/apache/hadoop/hbase/constraint/RuntimeFailConstraint.java PRE-CREATION src/test/java/org/apache/hadoop/hbase/constraint/TestConstraints.java PRE-CREATION src/test/java/org/apache/hadoop/hbase/constraint/TestIntegerConstraint.java PRE-CREATION src/test/java/org/apache/hadoop/hbase/constraint/WorksConstraint.java PRE-CREATION Diff: https://reviews.apache.org/r/2579/diff Testing ------- Adding IntegrationTestConstraint and unit tests for Constraints and IntegerConstraint. All of those pass. Thanks, Jesse > 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: 4605.v7, constraint_as_cp.txt, java_Constraint_v2.patch, java_HBASE-4605_v1.patch, java_HBASE-4605_v2.patch, java_HBASE-4605_v3.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