You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Anoop Sam John (Commented) (JIRA)" <ji...@apache.org> on 2011/10/31 12:57:33 UTC

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

    [ 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