Return-Path: Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: (qmail 49883 invoked from network); 31 Jul 2010 00:30:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 31 Jul 2010 00:30:57 -0000 Received: (qmail 68610 invoked by uid 500); 31 Jul 2010 00:30:56 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 68551 invoked by uid 500); 31 Jul 2010 00:30:56 -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 68544 invoked by uid 500); 31 Jul 2010 00:30:56 -0000 Delivered-To: apmail-hadoop-core-commits@hadoop.apache.org Received: (qmail 68541 invoked by uid 99); 31 Jul 2010 00:30:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Jul 2010 00:30:56 +0000 X-ASF-Spam-Status: No, hits=-1999.2 required=10.0 tests=ALL_TRUSTED,UPPERCASE_50_75 X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Jul 2010 00:30:54 +0000 Received: from eosnew.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 025D41D7; Sat, 31 Jul 2010 00:30:32 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Sat, 31 Jul 2010 00:30:31 -0000 Message-ID: <20100731003031.42116.25687@eosnew.apache.org> Subject: =?utf-8?q?=5BHadoop_Wiki=5D_Update_of_=22Hive/IndexDev=22_by_HeYongqiang?= 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/IndexDev" page has been changed by HeYongqiang. http://wiki.apache.org/hadoop/Hive/IndexDev?action=3Ddiff&rev1=3D4&rev2=3D5 -------------------------------------------------- * need LAST_REBUILD_TIME? how do we track it at partition-level? it sh= ould be in the metastore (not just HDFS) * in the case where the index partitioning is a subset of the base table= partitioning, we need a way to model this in the metastore = + =3D=3D Metastore Upgrades =3D=3D + = + Here are the MySQL metastore upgrade statements. = + = + {{{ + DROP TABLE IF EXISTS `IDXS`; + CREATE TABLE `IDXS` ( + `INDEX_ID` bigint(20) NOT NULL, + `CREATE_TIME` int(11) NOT NULL, + `DEFERRED_REBUILD` bit(1) NOT NULL, + `INDEX_HANDLER_CLASS` varchar(256) DEFAULT NULL, + `INDEX_NAME` varchar(128) DEFAULT NULL, + `INDEX_TBL_ID` bigint(20) DEFAULT NULL, + `LAST_ACCESS_TIME` int(11) NOT NULL, + `ORIG_TBL_ID` bigint(20) DEFAULT NULL, + `SD_ID` bigint(20) DEFAULT NULL, + PRIMARY KEY (`INDEX_ID`), + UNIQUE KEY `UNIQUEINDEX` (`INDEX_NAME`,`ORIG_TBL_ID`), + KEY `IDXS_FK1` (`SD_ID`), + KEY `IDXS_FK2` (`INDEX_TBL_ID`), + KEY `IDXS_FK3` (`ORIG_TBL_ID`), + CONSTRAINT `IDXS_FK3` FOREIGN KEY (`ORIG_TBL_ID`) REFERENCES `TBLS` (`T= BL_ID`), + CONSTRAINT `IDXS_FK1` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`), + CONSTRAINT `IDXS_FK2` FOREIGN KEY (`INDEX_TBL_ID`) REFERENCES `TBLS` (`= TBL_ID`) + ) ENGINE=3DInnoDB DEFAULT CHARSET=3Dlatin1; + = + -- + -- Table structure for table `INDEX_PARAMS` + -- + = + DROP TABLE IF EXISTS `INDEX_PARAMS`; + CREATE TABLE `INDEX_PARAMS` ( + `INDEX_ID` bigint(20) NOT NULL, + `PARAM_KEY` varchar(256) NOT NULL, + `PARAM_VALUE` varchar(767) DEFAULT NULL, + PRIMARY KEY (`INDEX_ID`,`PARAM_KEY`), + CONSTRAINT `INDEX_PARAMS_FK1` FOREIGN KEY (`INDEX_ID`) REFERENCES `IDXS= ` (`INDEX_ID`) + ) ENGINE=3DInnoDB DEFAULT CHARSET=3Dlatin1; + = + }}} =3D=3D REBUILD =3D=3D = {{{