From user-return-3651-apmail-phoenix-user-archive=phoenix.apache.org@phoenix.apache.org Thu Sep 3 11:53:38 2015 Return-Path: X-Original-To: apmail-phoenix-user-archive@minotaur.apache.org Delivered-To: apmail-phoenix-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 99B7318217 for ; Thu, 3 Sep 2015 11:53:36 +0000 (UTC) Received: (qmail 19456 invoked by uid 500); 3 Sep 2015 11:53:33 -0000 Delivered-To: apmail-phoenix-user-archive@phoenix.apache.org Received: (qmail 19406 invoked by uid 500); 3 Sep 2015 11:53:33 -0000 Mailing-List: contact user-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@phoenix.apache.org Delivered-To: mailing list user@phoenix.apache.org Received: (qmail 19395 invoked by uid 99); 3 Sep 2015 11:53:33 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2015 11:53:33 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C9B09F12E3 for ; Thu, 3 Sep 2015 11:53:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.971 X-Spam-Level: *** X-Spam-Status: No, score=3.971 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_SOFTFAIL=0.972] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id jbQxjCOWQnIW for ; Thu, 3 Sep 2015 11:53:31 +0000 (UTC) Received: from mail-yk0-f176.google.com (mail-yk0-f176.google.com [209.85.160.176]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 02E7521141 for ; Thu, 3 Sep 2015 11:53:30 +0000 (UTC) Received: by ykcf206 with SMTP id f206so40189154ykc.3 for ; Thu, 03 Sep 2015 04:53:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=IlVfzYifj19Z4PrGyt02Bzz/UnvdCPj4/OYepaCFU7Q=; b=f/quUV2nHwUsOQ9IbZ77M/fzO92nwdrXmNvvg1/ar8JM0LE34/usqlnTRg/V83uZ7M kUXbhkVnQ4Zy0OS7DLEvstrMDPBR7DuX2GZD8QqLK67vY8Yipc8o/POVTbmcmq/05P/s /lXzOlWl5BL5+GLzJC8rPbFMDDI5rwZIXB2vWzMkntnbF9CDTshwCJrluea5yXTVaI3Y fdOmcdZicsTgom8akm+PARFy7GEFbY/VY0aDlOTtHwXGbf6QGdCfh35dQfd08CyljZW+ RjryIFMRgYK69sbIwIjLe1af7C53bbekQKUOwOAoVJCG0p2MBj/5KCpSRbZngmZ4IRyF 9TMw== X-Gm-Message-State: ALoCoQkzmogjLdQrQYgH0lu+uZtZw2Ve/y82lRAQTdG59CDrOcq+irBWqZ+MF4uf6Sc6qH1RVeCC MIME-Version: 1.0 X-Received: by 10.13.210.5 with SMTP id u5mr41703591ywd.46.1441281203925; Thu, 03 Sep 2015 04:53:23 -0700 (PDT) Received: by 10.129.133.131 with HTTP; Thu, 3 Sep 2015 04:53:23 -0700 (PDT) In-Reply-To: References: Date: Thu, 3 Sep 2015 07:53:23 -0400 Message-ID: Subject: Re: Get values that caused the exception From: Josh Mahonin To: user@phoenix.apache.org Content-Type: multipart/alternative; boundary=001a114e4e8a2ead34051ed66e08 --001a114e4e8a2ead34051ed66e08 Content-Type: text/plain; charset=UTF-8 Hi Yiannis, I've found the best solution to this is generally just to add logging around that area. For example, you could add a try (or Scala Try<>) and check if an exception has been thrown, then log it somewhere. As a wild guess, if you're dealing with a Double datatype and getting NumberFormatException, is it possible one of your values is a NaN? Josh On Thu, Sep 3, 2015 at 6:11 AM, Yiannis Gkoufas wrote: > Hi there, > > I am using phoenix-spark to insert multiple entries on a phoenix table. > I get the following errors: > > ..Exception while committing to database.. > ..Caused by: java.lang.NumberFormatException.. > > I couldn't find on the logs what was the row that was causing the issue. > Is it possible to extract somehow the (wrong) values that I am trying to > insert in this column of Double type? > > Thanks a lot! > --001a114e4e8a2ead34051ed66e08 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Yiannis,

I've found the best sol= ution to this is generally just to add logging around that area. For exampl= e, you could add a try (or Scala Try<>) and check if an exception has= been thrown, then log it somewhere.

As a wild gue= ss, if you're dealing with a Double datatype and getting NumberFormatEx= ception, is it possible one of your values is a NaN?

Josh

On Thu, Sep 3, 2= 015 at 6:11 AM, Yiannis Gkoufas <johngouf85@gmail.com> wr= ote:
Hi there,

<= /div>
I am using phoenix-spark to insert multiple entries on a phoenix = table.
I get the following errors:

..Exc= eption while committing to database..
..Caused by: java.lang.= NumberFormatException..

I couldn't find on the= logs what was the row that was causing the issue.
Is it possible= to extract somehow the (wrong) values that I am trying to insert in this c= olumn of Double type?

Thanks a lot!

--001a114e4e8a2ead34051ed66e08--