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 D04BB200BDE for ; Thu, 10 Nov 2016 23:07:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CF374160B01; Thu, 10 Nov 2016 22:07:01 +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 0DC34160B15 for ; Thu, 10 Nov 2016 23:07:00 +0100 (CET) Received: (qmail 2746 invoked by uid 500); 10 Nov 2016 22:06:59 -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 2392 invoked by uid 99); 10 Nov 2016 22:06:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2016 22:06:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7C7162C4C79 for ; Thu, 10 Nov 2016 22:06:59 +0000 (UTC) Date: Thu, 10 Nov 2016 22:06:59 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-3427) rdd.saveToPhoenix gives table undefined error when attempting to write to a tenant-specific view (TenantId defined in configuration object and passed to saveToPhoenix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 10 Nov 2016 22:07:01 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-3427?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D15= 655300#comment-15655300 ]=20 ASF GitHub Bot commented on PHOENIX-3427: ----------------------------------------- Github user nico-pappagianis commented on the issue: https://github.com/apache/phoenix/pull/221 =20 Thanks James. I did the following: =20 from my local branch: =20 git pull --rebase origin master =20 git push origin multiTenantSaveToPhoenixRDDFix =20 =20 =20 =20 On Thu, Nov 10, 2016 at 2:01 PM, James Taylor wrote: =20 > *@JamesRTaylor* commented on this pull request. > ------------------------------ > > In phoenix-spark/src/main/scala/org/apache/phoenix/spark/ > ProductRDDFunctions.scala : > > > import scala.collection.JavaConversions._ > > class ProductRDDFunctions[A <: Product](data: RDD[A]) extends Loggin= g with Serializable { > > def saveToPhoenix(tableName: String, cols: Seq[String], > - conf: Configuration =3D new Configuration, zkUrl= : Option[String] =3D None) > + conf: Configuration =3D new Configuration, zkUrl= : Option[String] =3D None, tenantId: Option[String] =3D None) > > Just do a git pull --rebase origin master on your local branch to pic= k up > what Josh committed. Then push your next commit to your repro (either= in > the pull request or a new one). > > Another way would be to just stash the changes for your last commit, = get > the latest by doing a git pull origin master, then apply your stashed > change, and push out to this pull request. > > =E2=80=94 > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > , or mute the thread > > . > > rdd.saveToPhoenix gives table undefined error when attempting to write to= a tenant-specific view (TenantId defined in configuration object and passe= d to saveToPhoenix) > -------------------------------------------------------------------------= ---------------------------------------------------------------------------= ------------------- > > Key: PHOENIX-3427 > URL: https://issues.apache.org/jira/browse/PHOENIX-3427 > Project: Phoenix > Issue Type: Bug > Reporter: Nico Pappagianis > > Although we can read from a tenant-specific view by passing TenantId in t= he conf object when calling sc.phoenixTableAsRDD the same does not hold for= rdd.saveToPhoenix. Calling saveToPhoenix with a tenant-specific view as th= e table name gives a table undefined error, even when passing in the Tenant= Id with the conf object. > It appears that TenantId is lost during the execution path of saveToPhoen= ix. -- This message was sent by Atlassian JIRA (v6.3.4#6332)