You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Stefan Baritchii (JIRA)" <ji...@apache.org> on 2012/09/02 21:10:07 UTC

[jira] [Created] (HBASE-6712) incrementColumnValue should throw an exception if row does not exist

Stefan Baritchii created HBASE-6712:
---------------------------------------

             Summary: incrementColumnValue should throw an exception if row does not exist 
                 Key: HBASE-6712
                 URL: https://issues.apache.org/jira/browse/HBASE-6712
             Project: HBase
          Issue Type: Bug
          Components: client
    Affects Versions: 0.92.1
            Reporter: Stefan Baritchii


increment should throw an exception if a row does not exist. instead it creates the row. checkAndIncrement may be also a solution to it but needs development.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-6712) Implement checkAndIncrement

Posted by "Stefan Baritchii (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447417#comment-13447417 ] 

Stefan Baritchii commented on HBASE-6712:
-----------------------------------------

@Lars: renaming fine with me. will also take a look into the coprocessor approach.
                
> Implement checkAndIncrement
> ---------------------------
>
>                 Key: HBASE-6712
>                 URL: https://issues.apache.org/jira/browse/HBASE-6712
>             Project: HBase
>          Issue Type: New Feature
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Stefan Baritchii
>
> increment should throw an exception if a row does not exist. instead it creates the row. checkAndIncrement may be also a solution to it but needs development.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-6712) Implement checkAndIncrement

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl updated HBASE-6712:
---------------------------------

    Issue Type: New Feature  (was: Bug)
       Summary: Implement checkAndIncrement  (was: incrementColumnValue should throw an exception if row does not exist )
    
> Implement checkAndIncrement
> ---------------------------
>
>                 Key: HBASE-6712
>                 URL: https://issues.apache.org/jira/browse/HBASE-6712
>             Project: HBase
>          Issue Type: New Feature
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Stefan Baritchii
>
> increment should throw an exception if a row does not exist. instead it creates the row. checkAndIncrement may be also a solution to it but needs development.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-6712) incrementColumnValue should throw an exception if row does not exist

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447390#comment-13447390 ] 

Lars Hofhansl commented on HBASE-6712:
--------------------------------------

I see. If you don't mind, I'll change the title to "Implement checkAndIncrement" (and maybe we'll fold this into a more general checkAndMutate implementation).
                
> incrementColumnValue should throw an exception if row does not exist 
> ---------------------------------------------------------------------
>
>                 Key: HBASE-6712
>                 URL: https://issues.apache.org/jira/browse/HBASE-6712
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Stefan Baritchii
>
> increment should throw an exception if a row does not exist. instead it creates the row. checkAndIncrement may be also a solution to it but needs development.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-6712) incrementColumnValue should throw an exception if row does not exist

Posted by "Stefan Baritchii (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447307#comment-13447307 ] 

Stefan Baritchii commented on HBASE-6712:
-----------------------------------------

My usecase: I have a row with a rowid and a column that is incremented. rowid represents a resource name, column represents how many guys are sharing that resource.

It would be nice if I would be able to create the row first (i do it only once anyway), and then increment/decrement it's sharing.

To answer the "which would definitely be bad" part I think it has already been done at Put where you have checkAndPut() method. Do you think it would be bad to have a "checkAndIncrement" method similar to checkAndPut?
                
> incrementColumnValue should throw an exception if row does not exist 
> ---------------------------------------------------------------------
>
>                 Key: HBASE-6712
>                 URL: https://issues.apache.org/jira/browse/HBASE-6712
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Stefan Baritchii
>
> increment should throw an exception if a row does not exist. instead it creates the row. checkAndIncrement may be also a solution to it but needs development.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-6712) Implement checkAndIncrement

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447394#comment-13447394 ] 

Lars Hofhansl commented on HBASE-6712:
--------------------------------------

Also note that after HBASE-6522 it is possible to do this with a coprocessor endpoint.
(The missing part before was the coprocessors cannot take out locks)
                
> Implement checkAndIncrement
> ---------------------------
>
>                 Key: HBASE-6712
>                 URL: https://issues.apache.org/jira/browse/HBASE-6712
>             Project: HBase
>          Issue Type: New Feature
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Stefan Baritchii
>
> increment should throw an exception if a row does not exist. instead it creates the row. checkAndIncrement may be also a solution to it but needs development.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-6712) incrementColumnValue should throw an exception if row does not exist

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447007#comment-13447007 ] 

Lars Hofhansl commented on HBASE-6712:
--------------------------------------

If increment would not create new rows when needed, you have to use some other API to create the row first, which would definitely be bad.

Do you have a specific use case in mind?

                
> incrementColumnValue should throw an exception if row does not exist 
> ---------------------------------------------------------------------
>
>                 Key: HBASE-6712
>                 URL: https://issues.apache.org/jira/browse/HBASE-6712
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Stefan Baritchii
>
> increment should throw an exception if a row does not exist. instead it creates the row. checkAndIncrement may be also a solution to it but needs development.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira