phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
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)
Date Tue, 08 Nov 2016 21:14:58 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15648812#comment-15648812
] 

ASF GitHub Bot commented on PHOENIX-3427:
-----------------------------------------

Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/221#discussion_r87029205
  
    --- Diff: phoenix-spark/src/main/scala/org/apache/phoenix/spark/ProductRDDFunctions.scala
---
    @@ -16,19 +16,20 @@ package org.apache.phoenix.spark
     import org.apache.hadoop.conf.Configuration
     import org.apache.hadoop.io.NullWritable
     import org.apache.phoenix.mapreduce.PhoenixOutputFormat
    -import org.apache.phoenix.mapreduce.util.{ColumnInfoToStringEncoderDecoder, PhoenixConfigurationUtil}
    +import org.apache.phoenix.mapreduce.util.PhoenixConfigurationUtil
     import org.apache.spark.Logging
     import org.apache.spark.rdd.RDD
    +
     import scala.collection.JavaConversions._
     
     class ProductRDDFunctions[A <: Product](data: RDD[A]) extends Logging with Serializable
{
     
       def saveToPhoenix(tableName: String, cols: Seq[String],
    -                    conf: Configuration = new Configuration, zkUrl: Option[String] =
None)
    +                    conf: Configuration = new Configuration, zkUrl: Option[String] =
None, tenantId: Option[String] = None)
    --- End diff --
    
    Can we set the TenantId on props of the PhoenixConnection instead of on the Configuration
as the latter may be shared among multiple users.


> rdd.saveToPhoenix gives table undefined error when attempting to write to a tenant-specific
view (TenantId defined in configuration object and passed 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 the conf object
when calling sc.phoenixTableAsRDD the same does not hold for rdd.saveToPhoenix. Calling saveToPhoenix
with a tenant-specific view as the table name gives a table undefined error, even when passing
in the TenantId with the conf object.
> It appears that TenantId is lost during the execution path of saveToPhoenix.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message