Return-Path: Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: (qmail 34985 invoked from network); 30 Apr 2010 20:57:37 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Apr 2010 20:57:37 -0000 Received: (qmail 34861 invoked by uid 500); 30 Apr 2010 20:57:37 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 34836 invoked by uid 500); 30 Apr 2010 20:57:37 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 34829 invoked by uid 500); 30 Apr 2010 20:57:37 -0000 Delivered-To: apmail-hadoop-core-commits@hadoop.apache.org Received: (qmail 34826 invoked by uid 99); 30 Apr 2010 20:57:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Apr 2010 20:57:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Apr 2010 20:57:34 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 9AE1517D1C; Fri, 30 Apr 2010 20:57:13 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Fri, 30 Apr 2010 20:57:13 -0000 Message-ID: <20100430205713.19572.38372@eos.apache.org> Subject: =?utf-8?q?=5BHadoop_Wiki=5D_Update_of_=22Hive/LanguageManual/DDL=22_by_Pa?= =?utf-8?q?ulYang?= X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for ch= ange notification. The "Hive/LanguageManual/DDL" page has been changed by PaulYang. http://wiki.apache.org/hadoop/Hive/LanguageManual/DDL?action=3Ddiff&rev1=3D= 58&rev2=3D59 -------------------------------------------------- = NOTE: These commands will only modify Hive's metadata, and will NOT reorg= anize or reformat existing data. Users should make sure the actual data lay= out conforms with the metadata definition. = - =3D=3D=3D Alter Table Touch =3D=3D=3D = + =3D=3D=3D Alter Table Touch =3D=3D=3D {{{ ALTER TABLE table_name TOUCH; ALTER TABLE table_name TOUCH PARTITION partition_spec; }}} = - Touch reads the metadata, and writes it back. This has the effect of caus= ing 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 exter= nal script could call TOUCH to fire the hook and mark the said table or par= tition as being modified. + TOUCH reads the metadata, and writes it back. This has the effect of caus= ing 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 exter= nal script could call TOUCH to fire the hook and mark the said table or par= tition as being modified. = Also, it may be useful later if we incorporate reliable last modified tim= es. 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_Table|Create Table]]) = =3D=3D Create/Drop View =3D=3D =20