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

Michael Stack commented on HBASE-23930:
---------------------------------------

Currently when you see timestamp in shell, it looks like this:

{code}
hbase(main):002:0> scan 'hbase:meta'
ROW                                                                      
COLUMN+CELL
 hbase:namespace                                                         
column=table:state, timestamp=1583967620343, value=\x08\x00
 hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.        
column=info:regioninfo, timestamp=1583967661757, value={ENCODED => 
b5ce04eb5d4328b8db5934d0a48086c8, NAME => 
'hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.', STARTKEY => 
'', ENDKEY => ''}
 hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.        
column=info:seqnumDuringOpen, timestamp=1583967661757, 
value=\x00\x00\x00\x00\x00\x00\x00\x0A
 hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.        
column=info:server, timestamp=1583967661757, value=localhost:16020
 hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.        
column=info:serverstartcode, timestamp=1583967661757, value=1583967656007
 hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.        
column=info:sn, timestamp=1583967661558, value=localhost,16020,1583967656007
 hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.        
column=info:state, timestamp=1583967661757, value=OPEN
 x                                                                       
column=table:state, timestamp=1583967679400, value=\x08\x00
...
{code}

This patch changes it to looks like this instead... iso8601:

{code}
hbase(main):018:0> scan 'hbase:meta'
ROW                                                                      
COLUMN+CELL
 hbase:namespace                                                         
column=table:state, timestamp=2020-03-11T23:00:20.343Z, value=\x08\x00
 hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.        
column=info:regioninfo, timestamp=2020-03-11T23:01:01.757Z, value={ENCODED => 
b5ce04eb5d4328b8db5934d0a48086c8, NAME => 
'hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.', STARTKEY => 
'', ENDKEY =>
                                                                         ''}
 hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.        
column=info:seqnumDuringOpen, timestamp=2020-03-11T23:01:01.757Z, 
value=\x00\x00\x00\x00\x00\x00\x00\x0A
 hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.        
column=info:server, timestamp=2020-03-11T23:01:01.757Z, value=localhost:16020
 hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.        
column=info:serverstartcode, timestamp=2020-03-11T23:01:01.757Z, 
value=1583967656007
 hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.        
column=info:sn, timestamp=2020-03-11T23:01:01.558Z, 
value=localhost,16020,1583967656007
 hbase:namespace,,1583967619897.b5ce04eb5d4328b8db5934d0a48086c8.        
column=info:state, timestamp=2020-03-11T23:01:01.757Z, value=OPEN
 x                                                                       
column=table:state, timestamp=2020-03-11T23:01:19.400Z, value=\x08\x00
 
...
{code}

> Shell should attempt to format `timestamp` attributes as ISO-8601
> -----------------------------------------------------------------
>
>                 Key: HBASE-23930
>                 URL: https://issues.apache.org/jira/browse/HBASE-23930
>             Project: HBase
>          Issue Type: Improvement
>          Components: shell, Usability
>            Reporter: Nick Dimiduk
>            Priority: Minor
>
> Most of the time, the {{timestamp: long}} attribute of a cell is a timestamp. 
> The shell should make an attempt to interpret these values as timestamps and 
> print them out as such. Current practice is to copy the value out and pass it 
> through an external tool.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to