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

Zhihong Yu commented on HBASE-5824:
-----------------------------------

Implication of this JIRA is that the type of exception thrown when certain 
constraint isn't satisfied differs depending on whether auto flush is enabled.
When I changed the test case slightly:
{code}
Index: src/test/java/org/apache/hadoop/hbase/constraint/TestConstraint.java
===================================================================
--- src/test/java/org/apache/hadoop/hbase/constraint/TestConstraint.java        
(revision 1328376)
+++ src/test/java/org/apache/hadoop/hbase/constraint/TestConstraint.java        
(working copy)
@@ -105,7 +105,7 @@
 
     util.getHBaseAdmin().createTable(desc);
     HTable table = new HTable(util.getConfiguration(), tableName);
-    table.setAutoFlush(true);
+    table.setAutoFlush(false);
 
     // test that we do fail on violation
     Put put = new Put(row1);
{code}
I got:
{code}
testConstraintFails(org.apache.hadoop.hbase.constraint.TestConstraint)  Time 
elapsed: 4.144 sec  <<< FAILURE!
java.lang.AssertionError
  at org.junit.Assert.fail(Assert.java:92)
  at org.junit.Assert.assertTrue(Assert.java:43)
  at org.junit.Assert.assertTrue(Assert.java:54)
  at 
org.apache.hadoop.hbase.constraint.TestConstraint.testConstraintFails(TestConstraint.java:118)
{code}
This makes exception handling unnecessarily complicated.
                
> HRegion.incrementColumnValue is not used in trunk
> -------------------------------------------------
>
>                 Key: HBASE-5824
>                 URL: https://issues.apache.org/jira/browse/HBASE-5824
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Elliott Clark
>            Assignee: Jimmy Xiang
>             Fix For: 0.96.0
>
>         Attachments: hbase-5824.patch, hbase-5824_v2.patch, 
> hbase_5824.addendum
>
>
> on 0.94 a call to client.HTable#incrementColumnValue will cause 
> HRegion#incrementColumnValue.  On trunk all calls to 
> HTable.incrementColumnValue got to HRegion#increment.
> My guess is that HTable#incrementColumnValue and HTable#increment serialize 
> to the same thing over the wire so that the remote HRegionServer no longer 
> knows which htable method was called.
> To repro I checked out trunk and put a break point in 
> HRegion#incrementColumnValue and then ran TestFromClientSide.  The breakpoint 
> wasn't hit.

--
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

        

Reply via email to