Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 28C8711BBD for ; Fri, 1 Aug 2014 20:17:53 +0000 (UTC) Received: (qmail 58937 invoked by uid 500); 1 Aug 2014 20:17:51 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 58866 invoked by uid 500); 1 Aug 2014 20:17:51 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 58856 invoked by uid 99); 1 Aug 2014 20:17:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2014 20:17:51 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of btv1==2903336a37c==dfan@appnexus.com designates 68.67.133.180 as permitted sender) Received: from [68.67.133.180] (HELO mx-filter-01.lax1.appnexus.com) (68.67.133.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2014 20:17:46 +0000 X-ASG-Debug-ID: 1406924240-0536980fb2539b0d0001-2YaFqQ Received: from 01-exch-nym2.ad.corp.appnexus.com (01-exch-nym2.ad.corp.appnexus.com [68.67.155.154]) by mx-filter-01.lax1.appnexus.com with ESMTP id hLkQuj6YhFkm2bCc for ; Fri, 01 Aug 2014 16:17:21 -0400 (EDT) X-Barracuda-Envelope-From: dfan@appnexus.com X-Barracuda-Apparent-Source-IP: 68.67.155.154 X-ASG-Whitelist: Client Received: from 01-exch-nym2.ad.corp.appnexus.com ([fe80::1c0e:efa8:ce1:26a]) by 01-exch-nym2.ad.corp.appnexus.com ([fe80::1c0e:efa8:ce1:26a%18]) with mapi id 14.03.0181.006; Fri, 1 Aug 2014 16:16:51 -0400 From: Dan Fan To: "user@hive.apache.org" Subject: FAILED: ClassCastException org.apache.hadoop.io.Text cannot be cast to java.lang.String Thread-Topic: FAILED: ClassCastException org.apache.hadoop.io.Text cannot be cast to java.lang.String X-ASG-Orig-Subj: FAILED: ClassCastException org.apache.hadoop.io.Text cannot be cast to java.lang.String Thread-Index: AQHPrcWHT3PJfmuOW0GzIo9HlNdNSg== Date: Fri, 1 Aug 2014 20:16:50 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.12.59] Content-Type: multipart/alternative; boundary="_000_D0016E0D66F31dfanappnexuscom_" MIME-Version: 1.0 X-Barracuda-Connect: 01-exch-nym2.ad.corp.appnexus.com[68.67.155.154] X-Barracuda-Start-Time: 1406924240 X-Barracuda-URL: http://68.67.133.180:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at appnexus.com X-Barracuda-BRTS-Status: 1 X-Virus-Checked: Checked by ClamAV on apache.org --_000_D0016E0D66F31dfanappnexuscom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi team Quick question. I am writing a hive generic UDF. In which, I wanna have this: HashMap vpDefinition =3D new HashMap() ; vpDefinition.push(=93auction_id=94,=9422=94) ; The second line always give me FAILED: ClassCastException org.apache.hadoop= .io.Text cannot be cast to java.lang.String When I run the generic udf in hive. Does anyone know how to deal with this issue ? I do not understand that, why do I have this cannot cast error. Could anyone explain please ? Thanks Dan --_000_D0016E0D66F31dfanappnexuscom_ Content-Type: text/html; charset="Windows-1252" Content-ID: Content-Transfer-Encoding: quoted-printable

Hi team 

Quick question. 

I am writing a hive generic UDF. 
In which, I wanna have this:

HashMap<String, String> vpDefinition =3D new HashMap<String, = String>() ; 
vpDefinition.push(=93auction_id=94,=9422=94) ;  

The second line always give me FAILED: ClassCastException org.apache.hadoop.io.Text can= not be cast to java.lang.String

When I run the generic udf in hive. 

Does anyone know how to deal with this issue ?  
I do not understand that, why do I have this cannot cast error. <= /div>

Could anyone explain please ? 

Thanks 

Dan
--_000_D0016E0D66F31dfanappnexuscom_--