Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A49D4110FA for ; Mon, 22 Sep 2014 08:54:35 +0000 (UTC) Received: (qmail 56787 invoked by uid 500); 22 Sep 2014 08:54:34 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 56655 invoked by uid 500); 22 Sep 2014 08:54:34 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 56444 invoked by uid 500); 22 Sep 2014 08:54:34 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 56416 invoked by uid 99); 22 Sep 2014 08:54:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Sep 2014 08:54:34 +0000 Date: Mon, 22 Sep 2014 08:54:34 +0000 (UTC) From: "Suhas Vasu (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-7762) Enhancement while getting partitions via webhcat client MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-7762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Suhas Vasu updated HIVE-7762: ----------------------------- Status: Patch Available (was: Open) > Enhancement while getting partitions via webhcat client > ------------------------------------------------------- > > Key: HIVE-7762 > URL: https://issues.apache.org/jira/browse/HIVE-7762 > Project: Hive > Issue Type: Improvement > Components: WebHCat > Reporter: Suhas Vasu > Priority: Minor > Attachments: HIVE-7762.2.patch, HIVE-7762.3.patch, HIVE-7762.patch > > > Hcatalog creates partitions in lower case, whereas getting partitions from hcatalog via webhcat client doesn't handle this. So the client starts throwing exceptions. > Ex: > CREATE EXTERNAL TABLE in_table (word STRING, cnt INT) PARTITIONED BY (Year STRING, Month STRING, Date STRING, Hour STRING, Minute STRING) STORED AS TEXTFILE LOCATION '/user/suhas/hcat-data/in/'; > Then i try to get partitions by: > {noformat} > String inputTableName = "in_table"; > String database = "default"; > Map partitionSpec = new HashMap(); > partitionSpec.put("Year", "2014"); > partitionSpec.put("Month", "08"); > partitionSpec.put("Date", "11"); > partitionSpec.put("Hour", "00"); > partitionSpec.put("Minute", "00"); > HCatClient client = get(catalogUrl); > HCatPartition hCatPartition = client.getPartition(database, inputTableName, partitionSpec); > {noformat} > This throws up saying: > {noformat} > Exception in thread "main" org.apache.hcatalog.common.HCatException : 9001 : Exception occurred while processing HCat request : Invalid partition-key specified: year > at org.apache.hcatalog.api.HCatClientHMSImpl.getPartition(HCatClientHMSImpl.java:366) > at com.inmobi.demo.HcatPartitions.main(HcatPartitions.java:34) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > {noformat} > The same code works if i do > {noformat} > partitionSpec.put("year", "2014"); > partitionSpec.put("month", "08"); > partitionSpec.put("date", "11"); > partitionSpec.put("hour", "00"); > partitionSpec.put("minute", "00"); > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)