Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A4A45200BB4 for ; Tue, 1 Nov 2016 17:29:35 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A34D2160AF7; Tue, 1 Nov 2016 16:29:35 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E869C160ADA for ; Tue, 1 Nov 2016 17:29:34 +0100 (CET) Received: (qmail 38350 invoked by uid 500); 1 Nov 2016 16:29:34 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 38324 invoked by uid 99); 1 Nov 2016 16:29:33 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2016 16:29: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 08FE7C65F6; Tue, 1 Nov 2016 16:29:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.102 X-Spam-Level: X-Spam-Status: No, score=-0.102 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 3ItoNcvSkSP5; Tue, 1 Nov 2016 16:29:32 +0000 (UTC) Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com [209.85.192.182]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id E898F5F2F0; Tue, 1 Nov 2016 16:29:31 +0000 (UTC) Received: by mail-pf0-f182.google.com with SMTP id i88so4173718pfk.2; Tue, 01 Nov 2016 09:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=QC725CAFcdMRLWqPDfZm5E27/oxW3IK4CZyjMc05Qus=; b=0w5U6DOuhjAn5WD27l0FP4ARUL53fUIb+C/bINcfM7nh0nlmSJ1pZSN/EcNrybk/w/ F/tkIH23xCeQbFBtiq8DHU4PYCvQAo8u01mYoYT7zuWviLmsSl93Jf99UM37XtT5q5Xx 5RxZNKq3ZfoTyzZ5BvtcYHsTddl78pJLAU7fZfk1ix9Kfo4c+aGQmpKRDY+jEQqQVe/X 3A3w6Vbzopo7Iq64Q/g6jcaWbX9jQsy348G9fDyCJm0VOQEDP5kXk9tkdSzWUHSfYdsk hbo+lE8NP2QERjrBVwGQa2XOoGaZcLEm1ClYQUCnAJEWSTwrNk2kkvfDq36B+bGDYoq2 fSAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=QC725CAFcdMRLWqPDfZm5E27/oxW3IK4CZyjMc05Qus=; b=GU2yNqGG8uesMwqbHQ37BekyYRJOhEU/3BGVRdNjtEW+P9p3ksccrpF+tos4PPHa7m KR00en0UYsHO0Bd4FxQbRcTCaJ+kLUyCO0oPvkyh47gNqsZfqA1sbgTzTC66rkzARa2s udW64XFVR9Rxc1R6DYqHokvBybmYVSqcdPfC09t66D/QlsSKNmH08H1gYSeED7zo3vPA lbN/+ZuhdZlYs391ltqGHlI2pc9NL8mVG99dAwhDwopPienfX9zQ7zoDux6X7R81K0bm CuKaxLW3m//g+0FtCUSDgAZygZF/FXj64TQIHyOsaZN1fPhNdxd1eY6hSJR4zXx2AoLj pf8g== X-Gm-Message-State: ABUngvc7wRnBe3Mdbmhok8020pzUOR1dgpOMUk3ObLGxGpl66trG4jTCbkId97khMrFOuA== X-Received: by 10.98.51.134 with SMTP id z128mr61503235pfz.163.1478017770829; Tue, 01 Nov 2016 09:29:30 -0700 (PDT) Received: from [192.168.1.6] ([49.205.76.145]) by smtp.gmail.com with ESMTPSA id d26sm43286235pfb.37.2016.11.01.09.29.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Nov 2016 09:29:30 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: Sample phoenix upserts using threads From: Shiva Krishna In-Reply-To: <5818C1B1.9020607@apache.org> Date: Tue, 1 Nov 2016 21:59:27 +0530 Cc: "user@phoenix.apache.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <5818C1B1.9020607@apache.org> To: dev@phoenix.apache.org X-Mailer: Apple Mail (2.3251) archived-at: Tue, 01 Nov 2016 16:29:35 -0000 Hi Elser, Thanks for the quick response.=20 Below is the exception that being logged in some region servers. In local it is working good when running in a distributed environment I = am getting the below exception. Caused by: java.lang.AssertionError: we should never remove a different context at org.apache.hadoop.hbase.regionserver.HRegion$RowLockContext.cleanUp( HRegion.java:5227) at org.apache.hadoop.hbase.regionserver.HRegion$ RowLockImpl.release(HRegion.java:5272) at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.doGetTable( MetaDataEndpointImpl.java:2489) at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.doGetTable( MetaDataEndpointImpl.java:2426) at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable( MetaDataEndpointImpl.java:451) ... 10 more Phoenix : 4.7.0-HBase1.1 jar HBase: 1.2.2 Cluster : 1 master 4 cores OS : Amazon EMR 5.0.0 Thanks, Krishna. > On 01-Nov-2016, at 21:54, Josh Elser wrote: >=20 > (cc: -dev +user, bcc: +dev) >=20 > Hi Krishna, >=20 > Might you be able to share the stacktrace that accompanied that = Exception? >=20 > Shiva Krishna wrote: >> Hi All, >> Can any one give me a small example of Phoenix upserts using Threads = in Java. >> I wrote a sample it is working fine in local environment but when = running it cluster it is failing with below error. >> java.lang.AssertionError: we should never remove a different context >>=20 >> try(Connection conn =3D getConnection(); >> PreparedStatement statement =3D conn.prepareStatement("upsert = into \=E2=80=9Dtest\" values(?,?,?)");){ >> statement.setString(1,=E2=80=9Dtest1=E2=80=9D); >> statement.setString(2,=E2=80=9Dtest2=E2=80=9D); >> statement.setString(3,=E2=80=9Dtest3=E2=80=9D); >> statement.execute(); >> conn.commit(); >> }catch(SqlException ex) >> { >> ex.printStackTrace(); >> } >> Tried using both Threads and ForkJoins but getting the same exception = some times we are not able to predict or generalise when this exception = is occurring or how to resolve it. >>=20 >> Thanks, >> Krishna.