You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by Apache Wiki <wi...@apache.org> on 2010/05/18 23:28:10 UTC

[Hadoop Wiki] Update of "Hive/LanguageManual/DDL" by PaulYang

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "Hive/LanguageManual/DDL" page has been changed by PaulYang.
http://wiki.apache.org/hadoop/Hive/LanguageManual/DDL?action=diff&rev1=59&rev2=60

--------------------------------------------------

  ALTER TABLE table_name TOUCH PARTITION partition_spec;
  }}}
  
- TOUCH reads the metadata, and writes it back. This has the effect of causing the pre/post execute hooks to fire. An example use case might be if you have a hook that logs all the tables/partitions that were modified. Then, if you have an external script that alters the files on HDFS directly, the modification wouldn't be logged it was performed outside of Hive. The external script could call TOUCH to fire the hook and mark the said table or partition as being modified.
+ TOUCH reads the metadata, and writes it back. This has the effect of causing the pre/post execute hooks to fire. An example use case might be if you have a hook that logs all the tables/partitions that were modified. Then, if you have an external script that alters the files on HDFS directly, the modification wouldn't be logged it was performed outside of Hive. The external script could call TOUCH to fire the hook and mark the said table or partition as modified.
  
  Also, it may be useful later if we incorporate reliable last modified times. Then touch would update that time as well.
  
- Note that TOUCH doesn't create a table or partition if it doesn't already exist. (See [[Hive/LanguageManual/DDL/Create_Table|Create Table]])
+ Note that TOUCH doesn't create a table or partition if it doesn't already exist. (See [[Hive/LanguageManual/DDL#Create.2BAC8-Drop_Table|Create Table]])
  
  == Create/Drop View ==