From hcatalog-commits-return-793-apmail-incubator-hcatalog-commits-archive=incubator.apache.org@incubator.apache.org Tue Apr 3 22:14:48 2012 Return-Path: X-Original-To: apmail-incubator-hcatalog-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-hcatalog-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C2609B75 for ; Tue, 3 Apr 2012 22:14:48 +0000 (UTC) Received: (qmail 48872 invoked by uid 500); 3 Apr 2012 22:14:48 -0000 Delivered-To: apmail-incubator-hcatalog-commits-archive@incubator.apache.org Received: (qmail 48816 invoked by uid 500); 3 Apr 2012 22:14:48 -0000 Mailing-List: contact hcatalog-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hcatalog-dev@incubator.apache.org Delivered-To: mailing list hcatalog-commits@incubator.apache.org Received: (qmail 48790 invoked by uid 99); 3 Apr 2012 22:14:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 22:14:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 22:14:44 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 07D0D23888EA; Tue, 3 Apr 2012 22:14:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1309176 - in /incubator/hcatalog/trunk: CHANGES.txt src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java Date: Tue, 03 Apr 2012 22:14:22 -0000 To: hcatalog-commits@incubator.apache.org From: gates@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120403221424.07D0D23888EA@eris.apache.org> Author: gates Date: Tue Apr 3 22:14:22 2012 New Revision: 1309176 URL: http://svn.apache.org/viewvc?rev=1309176&view=rev Log: HCATALOG-356 Compilation failure due to API change in HIVE-2908 Modified: incubator/hcatalog/trunk/CHANGES.txt incubator/hcatalog/trunk/src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java Modified: incubator/hcatalog/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1309176&r1=1309175&r2=1309176&view=diff ============================================================================== --- incubator/hcatalog/trunk/CHANGES.txt (original) +++ incubator/hcatalog/trunk/CHANGES.txt Tue Apr 3 22:14:22 2012 @@ -100,6 +100,8 @@ Release 0.4.0 - Unreleased OPTIMIZATIONS BUG FIXES + HCAT-356 Compilation failure due to API change in HIVE-2908 (rohini via gates) + HCAT-354 hive-hbase-handler jar not getting put in hcat package (gates) HCAT-348 HCatUtil::getHiveConf(Configuration) ignores passed-in conf while creating HiveConf (gates) Modified: incubator/hcatalog/trunk/src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java?rev=1309176&r1=1309175&r2=1309176&view=diff ============================================================================== --- incubator/hcatalog/trunk/src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java (original) +++ incubator/hcatalog/trunk/src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java Tue Apr 3 22:14:22 2012 @@ -19,7 +19,6 @@ package org.apache.hcatalog.cli.Semantic import java.io.Serializable; import java.util.List; -import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -41,6 +40,7 @@ import org.apache.hadoop.hive.ql.plan.De import org.apache.hadoop.hive.ql.plan.DropDatabaseDesc; import org.apache.hadoop.hive.ql.plan.DropTableDesc; import org.apache.hadoop.hive.ql.plan.HiveOperation; +import org.apache.hadoop.hive.ql.plan.PartitionSpec; import org.apache.hadoop.hive.ql.plan.ShowDatabasesDesc; import org.apache.hadoop.hive.ql.plan.ShowPartitionsDesc; import org.apache.hadoop.hive.ql.plan.ShowTableStatusDesc; @@ -299,10 +299,16 @@ public class HCatSemanticAnalyzer extend // table is partitioned. } else { //this is actually a ALTER TABLE DROP PARITITION statement - for (Map partSpec : dropTable.getPartSpecs()) { + for (PartitionSpec partSpec : dropTable.getPartSpecs()) { // partitions are not added as write entries in drop partitions in Hive Table table = hive.getTable(hive.getCurrentDatabase(), dropTable.getTableName()); - List partitions = hive.getPartitions(table, partSpec); + List partitions = null; + try { + partitions = hive.getPartitionsByFilter(table, partSpec.toString()); + } catch (Exception e) { + throw new HiveException(e); + } + for (Partition part : partitions) { authorize(part, Privilege.DROP); }