You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Eric Charles (JIRA)" <ji...@apache.org> on 2011/04/04 16:18:05 UTC

[jira] [Created] (HBASE-3729) Get cells via shell with a time range predicate

Get cells via shell with a time range predicate
-----------------------------------------------

                 Key: HBASE-3729
                 URL: https://issues.apache.org/jira/browse/HBASE-3729
             Project: HBase
          Issue Type: New Feature
          Components: shell
            Reporter: Eric Charles


HBase shell allows to specify a timestamp to get a value
- get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}

If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.

It would be fine to have a "time range" predicate based get.
The shell syntax could be (depending on technical feasibility)
- get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Ted Yu commented on HBASE-3729:
-------------------------------

Luckily get command works - get.setMaxVersions() only existed in the case where column name is specified.
{code}
hbase(main):001:0> get 'test', 'row1', { TIMERANGE => [0, 3000000000000], VERSIONS => 4}
COLUMN                           CELL                                                                                        
 cf:a                            timestamp=1302020637740, value=value3                                                       
 cf:a                            timestamp=1302020604067, value=value2                                                       
 cf:a                            timestamp=1302020596305, value=value1                                                       
3 row(s) in 0.3660 seconds
{code}
New patch coming.

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Eric Charles commented on HBASE-3729:
-------------------------------------

I agree that shell and client behavior must be the same.
Now the question is about the client:I can read on http://hbase.apache.org/docs/current/api/org/apache/hadoop/hbase/client/Get.html#setTimeRange%28long,%20long%29

"Get versions of columns only within the specified timestamp range, [minStamp, maxStamp)."

The Get class javadoc also says "To only retrieve columns within a specific range of version timestamps, execute setTimeRange.".

The setMaxVersions doc says : "Get up to the specified number of versions of each column.".

>From that, I don't see how I can guess that the result further a setTimeRange is limited by setMaxVersions...

At first sight, I find that if you don't set a maxVersion, you should simply return all results within the time range, but that's another discussion...

To map the client, shell should thus return only 1 result if VERSIONS is not provided.
Also, the setTimeRange javadoc could be enhanced to mention the result is limited by the version (with default = 1) (btw, I don't think it is worth I open a jira for the javadoc upgrade).

Cheers,
Eric

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729-v3.txt, 3729-v4.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-3729) Get cells via shell with a time range predicate

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

Ted Yu updated HBASE-3729:
--------------------------

    Attachment: 3729.txt

Add support for TIMERANGE

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Ted Yu commented on HBASE-3729:
-------------------------------

Here is sample output:
{code}
hbase(main):001:0> get 'SECOND_2-1299913025789', 'F871915C83D0D046642369B88904F8CD', { TIMERANGE => [0,1] }
COLUMN                           CELL                                                                                        
0 row(s) in 0.3130 seconds
get 'SECOND_2-1299913025789', 'F871915C83D0D046642369B88904F8CD', { TIMERANGE => [0,10000000000000000] }
COLUMN                           CELL                                                                                        
 v:_                             timestamp=1299913025789, value=\x00\x069\xFC F871915C83D0D046642369B88904F8CD\x1670gCcSu8wbc
                                 ZOOpN65azZw\x00\x00\x00\x00\x01"\xDD\x8E4\x00\x00\x00\x00\x00                               
1 row(s) in 0.0470 seconds
{code}

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (HBASE-3729) Get cells via shell with a time range predicate

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

Ted Yu reassigned HBASE-3729:
-----------------------------

    Assignee: Ted Yu

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-3729) Get cells via shell with a time range predicate

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

Ted Yu updated HBASE-3729:
--------------------------

    Attachment: 3729-v2.txt

Added one more usage sample according to Eric's suggestion.

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Ted Yu commented on HBASE-3729:
-------------------------------

I think 0.90.x has get.rb:
{code}
tyumac:hbase-0.90.2 tyu$ find . -name get.rb
./lib/ruby/shell/commands/get.rb
./src/main/ruby/shell/commands/get.rb
{code}

TIMERANGE => [ts1, ts2], VERSIONS => 4 would limit output for the same rowkey to 4.


> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Jonathan Gray commented on HBASE-3729:
--------------------------------------

I think the default behavior of the shell should be the default behavior of the client, which is 1 version unless specified otherwise.  Specifying a time range and wanting the most recent from within that range is a valid and somewhat common use case.

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729-v3.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Ted Yu commented on HBASE-3729:
-------------------------------

Right.
Thanks for clarification.

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729-v3.txt, 3729-v4.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Eric Charles commented on HBASE-3729:
-------------------------------------

I applied 3729-v3.txt, and now:

hbase(main):001:0> get 'test', 'row1', { TIMERANGE => [0, 3000000000000], VERSIONS => 4}
COLUMN                   CELL
 cf:a                    timestamp=1301984853863, value=value2
 cf:a                    timestamp=1301984830139, value=value1
2 row(s) in 0.4100 seconds

==> Great!

hbase(main):002:0> get 'test', 'row1', { TIMERANGE => [0, 3000000000000]}
COLUMN                   CELL
 cf:a                    timestamp=1301984853863, value=value2
1 row(s) in 0.0620 seconds

==> If versions is not specified, it does not return the expected list.

I think an error message will be better suited, otherwise many users will simply provide the TIMERANGE predicate without the VERSIONS, and will think there's only one cell, but there may be more... So VERSIONS should be mandatory if TIMERANGE is provided. The other/better? options would be to let return all versions if VERSIONS is not provided.


> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729-v3.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Ted Yu commented on HBASE-3729:
-------------------------------

I chose 3 versions as default value to be consistent with HTable default.

Here is the output when VERSIONS is absent:
{code}
hbase(main):001:0> get 'test', 'row1', { TIMERANGE => [0, 3000000000000]}
COLUMN                             CELL                                                                                             
 cf:a                              timestamp=1302061994636, value=value2                                                            
 cf:a                              timestamp=1302061992530, value=value1                                                            
2 row(s) in 0.3540 seconds
{code}


> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729-v3.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Eric Charles commented on HBASE-3729:
-------------------------------------

Right, get.rb was there.
I applied patch and tested with 

hbase(main):001:0> create 'test', 'cf'
hbase(main):003:0> put 'test', 'row1', 'cf:a', 'value1'
hbase(main):004:0> scan 'test'
ROW                                              COLUMN+CELL
 row1                                            column=cf:a, timestamp=1301984830139, value=value1
==> value1 ==> OK
1 row(s) in 0.0440 seconds
hbase(main):005:0> put 'test', 'row1', 'cf:a', 'value2'
0 row(s) in 0.0610 seconds
hbase(main):006:0> scan 'test'
ROW                                              COLUMN+CELL
 row1                                            column=cf:a, timestamp=1301984853863, value=value2
==> value2 ==> OK (the last one)
hbase(main):007:0> get 'test', 'row1'
COLUMN                                           CELL
 cf:a                                            timestamp=1301984853863, value=value2
1 row(s) in 0.1350 seconds
==> value2 ==> OK (the last one)
hbase(main):009:0> get 'test', 'row1',  { TIMERANGE => [0, 3000000000000]}
COLUMN                                           CELL
 cf:a                                            timestamp=1301984853863, value=value2
1 row(s) in 0.0260 seconds
==> I would have expected a list of values, namely value1 and value2, because they both map the given timerange predicate.

Or maybe I missunderstood what we were talking about?


> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Eric Charles commented on HBASE-3729:
-------------------------------------

Hi Ted,
Tks a lot for this!
I applied the patch to the scripts of 0.90-1, but I think the scripts have have evolved in trunk (for example, I have no get.rb in 0.90-1.
I will try a bit later tomorrow the trunk with the TIMERANGE option to see if it returns more than 1 cell (in your example, only one cell is returned).
Btw, does TIMERANGE => [ts1, ts2], VERSIONS => 4 limit the ouput to 4?
It would be useful to add the description when you type "get help" (also on the http://wiki.apache.org/hadoop/Hbase/Shell)
 hbase> get 't1', 'r1'
  hbase> get 't1', 'r1', {COLUMN => 'c1'}
  hbase> get 't1', 'r1', {COLUMN => ['c1', 'c2', 'c3']}
  hbase> get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
  hbase> get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1, VERSIONS => 4}
******  hbase> get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => [ts1, ts2], VERSIONS => 4}
  hbase> get 't1', 'r1', 'c1'
  hbase> get 't1', 'r1', 'c1', 'c2'
  hbase> get 't1', 'r1', ['c1', 'c2']


> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

stack commented on HBASE-3729:
------------------------------

So, it seems like I should get the right behavior if I take your last patch Ted and remove this portion:

{code}
+        elsif args[TIMERANGE]
+          vers = 3
+        else
+          vers = 1
{code}

Do you agree?  If so, I'll test it.  I'll add note to the help too about how user might want to add VERSIONS > 1 when setting TIMERANGE.

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729-v3.txt, 3729-v4.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Eric Charles commented on HBASE-3729:
-------------------------------------

Hi, i tried to remove/add in .rb, but was a bit lost with the patch history.
Anyway, I understand last Ted's code lines, and it should shell should map the API.

Tks again for this. Looking for it in trunk.

PS: I will crawl the archives to have a better understanding on the reason to return only the last version by default when timerange set.


> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729-v3.txt, 3729-v4.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (HBASE-3729) Get cells via shell with a time range predicate

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

stack resolved HBASE-3729.
--------------------------

       Resolution: Fixed
    Fix Version/s: 0.92.0
     Hadoop Flags: [Reviewed]

Thanks for the patch Ted (Thanks for reviews and testing Eric).  Committed to TRUNK.

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>             Fix For: 0.92.0
>
>         Attachments: 3729-v2.txt, 3729-v3.txt, 3729-v4.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-3729) Get cells via shell with a time range predicate

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

Ted Yu updated HBASE-3729:
--------------------------

    Attachment: 3729-v3.txt

Added support for VERSIONS when column name is absent.

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729-v3.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-3729) Get cells via shell with a time range predicate

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

Ted Yu updated HBASE-3729:
--------------------------

    Attachment: 3729-v4.txt

Adjust default VERSIONS value

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729-v3.txt, 3729-v4.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Ted Yu commented on HBASE-3729:
-------------------------------

That's fine Stack.
{code}
+        if args[VERSIONS]
+          vers = args[VERSIONS]
+        else
+          vers = 1
+        end
{code}

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729-v3.txt, 3729-v4.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3729) Get cells via shell with a time range predicate

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

Jonathan Gray commented on HBASE-3729:
--------------------------------------

HTable (Get/Scan) default is 1 version not 3 versions.  I think you are thinking of the HColumnDescriptor default.

> Get cells via shell with a time range predicate
> -----------------------------------------------
>
>                 Key: HBASE-3729
>                 URL: https://issues.apache.org/jira/browse/HBASE-3729
>             Project: HBase
>          Issue Type: New Feature
>          Components: shell
>            Reporter: Eric Charles
>            Assignee: Ted Yu
>         Attachments: 3729-v2.txt, 3729-v3.txt, 3729-v4.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp, end_timestamp)}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira