You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "rohithsharma (Created) (JIRA)" <ji...@apache.org> on 2011/10/25 06:50:32 UTC

[jira] [Created] (HIVE-2526) "lastAceesTime" is always zero when executed through "describe extended " unlike "show table extende like " where lastAccessTime is updated.

"lastAceesTime" is always zero when executed through "describe extended <table_name>" unlike "show table extende like <table_name>"  where lastAccessTime is updated.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HIVE-2526
                 URL: https://issues.apache.org/jira/browse/HIVE-2526
             Project: Hive
          Issue Type: Bug
    Affects Versions: 0.9.0
         Environment: Linux : SuSE 11 SP1
            Reporter: rohithsharma
            Priority: Minor


When the table is accessed(load),lastAccessTime is displaying updated accessTime in 

"show table extended like <table_name>".But "describe extended <table_name>" is always displaying zero.


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

        

[jira] [Commented] (HIVE-2526) "lastAceesTime" is always zero when executed through "describe extended " unlike "show table extende like " where lastAccessTime is updated.

Posted by "Anoop Sam John (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13140082#comment-13140082 ] 

Anoop Sam John commented on HIVE-2526:
--------------------------------------

As part of meta data for table, there are fields named 'lastAccessTime' and 'createTime'.[ Both are of int type also]. But as of now we are not maintaining any values in these fields and always will be zero only.[ default value].
When I checked the code DDLTask.writeFileSystemStats () contains code to display the lastaccesstime by getting the last access time from the underlying file system. So in case of command, show table extended like <TN>, this method is getting used and the last access time is getting displayed. In case of command describe exteneded <TN> the last access time is getting dispalyed from 
outStream.writeBytes(tbl.getTTable().toString());
In org.apache.hadoop.hive.metastore.api.Table, the 
private int lastAccessTime; will always be default value ( 0 ) only and no one updates this also.

I have 2 points here.
1. Why we are not making use of the fields in tbls meta data table for storing the last access time, create time?
2. Why is the dat type for lastAccessTime in org.apache.hadoop.hive.metastore.api.Table is int and not long? In order to capture the access time with values of System.currentTimeMillis() this type to be long. Also pls refer that in case of org.apache.hadoop.fs.FileStatus the access_time is having long data type rather than int.


                
> "lastAceesTime" is always zero when executed through "describe extended <table_name>" unlike "show table extende like <table_name>"  where lastAccessTime is updated.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2526
>                 URL: https://issues.apache.org/jira/browse/HIVE-2526
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>         Environment: Linux : SuSE 11 SP1
>            Reporter: rohithsharma
>            Priority: Minor
>
> When the table is accessed(load),lastAccessTime is displaying updated accessTime in 
> "show table extended like <table_name>".But "describe extended <table_name>" is always displaying zero.

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

        

[jira] [Commented] (HIVE-2526) "lastAceesTime" is always zero when executed through "describe extended " unlike "show table extende like " where lastAccessTime is updated.

Posted by "Namit Jain (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166588#comment-13166588 ] 

Namit Jain commented on HIVE-2526:
----------------------------------

If we want to maintain the last access time, it should be at the metadata level (in the metastore),
and not computed dynamically.

Also, if you want to maintain the last access time, it should be done for both hive access and metastore access.
                
> "lastAceesTime" is always zero when executed through "describe extended <table_name>" unlike "show table extende like <table_name>"  where lastAccessTime is updated.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2526
>                 URL: https://issues.apache.org/jira/browse/HIVE-2526
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>         Environment: Linux : SuSE 11 SP1
>            Reporter: rohithsharma
>            Assignee: Priyadarshini
>            Priority: Minor
>         Attachments: HIVE-2526.patch
>
>
> When the table is accessed(load),lastAccessTime is displaying updated accessTime in 
> "show table extended like <table_name>".But "describe extended <table_name>" is always displaying zero.

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

        

[jira] [Commented] (HIVE-2526) "lastAceesTime" is always zero when executed through "describe extended " unlike "show table extende like " where lastAccessTime is updated.

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153996#comment-13153996 ] 

jiraposter@reviews.apache.org commented on HIVE-2526:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2896/
-----------------------------------------------------------

Review request for hive.


Summary
-------

When "describe extended <tname>" is executed, lastAccessTime is always zero because its not gtting updated.
Now we have updated the lastAccessTime using the HDFS FileStatus api.


This addresses bug HIVE-2526.
    https://issues.apache.org/jira/browse/HIVE-2526


Diffs
-----

  trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 1202581 
  trunk/ql/src/test/results/clientpositive/ppr_pushdown.q.out 1202581 

Diff: https://reviews.apache.org/r/2896/diff


Testing
-------

All existing tests are passed.


Thanks,

Priyadarshini


                
> "lastAceesTime" is always zero when executed through "describe extended <table_name>" unlike "show table extende like <table_name>"  where lastAccessTime is updated.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2526
>                 URL: https://issues.apache.org/jira/browse/HIVE-2526
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>         Environment: Linux : SuSE 11 SP1
>            Reporter: rohithsharma
>            Priority: Minor
>         Attachments: HIVE-2526.patch
>
>
> When the table is accessed(load),lastAccessTime is displaying updated accessTime in 
> "show table extended like <table_name>".But "describe extended <table_name>" is always displaying zero.

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

        

[jira] [Assigned] (HIVE-2526) "lastAceesTime" is always zero when executed through "describe extended " unlike "show table extende like " where lastAccessTime is updated.

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

John Sichi reassigned HIVE-2526:
--------------------------------

    Assignee: Priyadarshini
    
> "lastAceesTime" is always zero when executed through "describe extended <table_name>" unlike "show table extende like <table_name>"  where lastAccessTime is updated.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2526
>                 URL: https://issues.apache.org/jira/browse/HIVE-2526
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>         Environment: Linux : SuSE 11 SP1
>            Reporter: rohithsharma
>            Assignee: Priyadarshini
>            Priority: Minor
>         Attachments: HIVE-2526.patch
>
>
> When the table is accessed(load),lastAccessTime is displaying updated accessTime in 
> "show table extended like <table_name>".But "describe extended <table_name>" is always displaying zero.

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

        

[jira] [Updated] (HIVE-2526) "lastAceesTime" is always zero when executed through "describe extended " unlike "show table extende like " where lastAccessTime is updated.

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

Priyadarshini updated HIVE-2526:
--------------------------------

    Attachment: HIVE-2526.patch
    
> "lastAceesTime" is always zero when executed through "describe extended <table_name>" unlike "show table extende like <table_name>"  where lastAccessTime is updated.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2526
>                 URL: https://issues.apache.org/jira/browse/HIVE-2526
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>         Environment: Linux : SuSE 11 SP1
>            Reporter: rohithsharma
>            Priority: Minor
>         Attachments: HIVE-2526.patch
>
>
> When the table is accessed(load),lastAccessTime is displaying updated accessTime in 
> "show table extended like <table_name>".But "describe extended <table_name>" is always displaying zero.

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

        

[jira] [Updated] (HIVE-2526) "lastAceesTime" is always zero when executed through "describe extended " unlike "show table extende like " where lastAccessTime is updated.

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

Namit Jain updated HIVE-2526:
-----------------------------

    Status: Open  (was: Patch Available)
    
> "lastAceesTime" is always zero when executed through "describe extended <table_name>" unlike "show table extende like <table_name>"  where lastAccessTime is updated.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2526
>                 URL: https://issues.apache.org/jira/browse/HIVE-2526
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>         Environment: Linux : SuSE 11 SP1
>            Reporter: rohithsharma
>            Assignee: Priyadarshini
>            Priority: Minor
>         Attachments: HIVE-2526.patch
>
>
> When the table is accessed(load),lastAccessTime is displaying updated accessTime in 
> "show table extended like <table_name>".But "describe extended <table_name>" is always displaying zero.

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

        

[jira] [Commented] (HIVE-2526) "lastAceesTime" is always zero when executed through "describe extended " unlike "show table extende like " where lastAccessTime is updated.

Posted by "Priyadarshini (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167438#comment-13167438 ] 

Priyadarshini commented on HIVE-2526:
-------------------------------------

Thanks for the comments Namit..

In org.apache.hadoop.hive.metastore.api.Table, the field lastAccessTime has the datatype as int.
This field should be of type long for capturing the time information. So thrift side changes has to be done for changing the type.
Also "show table extended like <tname>" needs to be changed where it dynamically calculates the lastAccessTime from HDFS.
Now lastAccessTime has to be updated into metadata also.

                
> "lastAceesTime" is always zero when executed through "describe extended <table_name>" unlike "show table extende like <table_name>"  where lastAccessTime is updated.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2526
>                 URL: https://issues.apache.org/jira/browse/HIVE-2526
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>         Environment: Linux : SuSE 11 SP1
>            Reporter: rohithsharma
>            Assignee: Priyadarshini
>            Priority: Minor
>         Attachments: HIVE-2526.patch
>
>
> When the table is accessed(load),lastAccessTime is displaying updated accessTime in 
> "show table extended like <table_name>".But "describe extended <table_name>" is always displaying zero.

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

        

[jira] [Commented] (HIVE-2526) "lastAceesTime" is always zero when executed through "describe extended " unlike "show table extende like " where lastAccessTime is updated.

Posted by "Priyadarshini (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153997#comment-13153997 ] 

Priyadarshini commented on HIVE-2526:
-------------------------------------

When "describe extended <tname>" is executed, lastAccessTime is always zero because its not gtting updated.
Now we have updated the lastAccessTime using the HDFS FileStatus api.

                
> "lastAceesTime" is always zero when executed through "describe extended <table_name>" unlike "show table extende like <table_name>"  where lastAccessTime is updated.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2526
>                 URL: https://issues.apache.org/jira/browse/HIVE-2526
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>         Environment: Linux : SuSE 11 SP1
>            Reporter: rohithsharma
>            Priority: Minor
>         Attachments: HIVE-2526.patch
>
>
> When the table is accessed(load),lastAccessTime is displaying updated accessTime in 
> "show table extended like <table_name>".But "describe extended <table_name>" is always displaying zero.

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

        

[jira] [Updated] (HIVE-2526) "lastAceesTime" is always zero when executed through "describe extended " unlike "show table extende like " where lastAccessTime is updated.

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

Priyadarshini updated HIVE-2526:
--------------------------------

    Status: Patch Available  (was: Open)
    
> "lastAceesTime" is always zero when executed through "describe extended <table_name>" unlike "show table extende like <table_name>"  where lastAccessTime is updated.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2526
>                 URL: https://issues.apache.org/jira/browse/HIVE-2526
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>         Environment: Linux : SuSE 11 SP1
>            Reporter: rohithsharma
>            Priority: Minor
>         Attachments: HIVE-2526.patch
>
>
> When the table is accessed(load),lastAccessTime is displaying updated accessTime in 
> "show table extended like <table_name>".But "describe extended <table_name>" is always displaying zero.

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