[
https://issues.apache.org/jira/browse/PHOENIX-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nico Pappagianis updated PHOENIX-3427:
--------------------------------------
Comment: was deleted
(was: The problem appears to be with the call to
ConfigurationUtil.getOutputConfiguration.
In ProductRDDFunctions there are two lines (41, 42):
// Create a within-partition config to retrieve the ColumnInfo list
@transient val partitionConfig =
ConfigurationUtil.getOutputConfiguration(tableName, cols, zkUrlFinal, tenantId)
@transient val columns =
PhoenixConfigurationUtil.getUpsertColumnMetadataList(partitionConfig).toList
after the call to getOutputConfiguration the partitionConfig does not contain
the tenantId. This is because getOutputConfiguration does not pass in the
optional conf argument and as such cannot copy the tenantId into the conf it
creates in ConfigurationUtil#29.
We likely do not want to clone the entire conf again (I say again because it is
copied on the creation of the outConfig). I'm assuming that's the reason the
conf is not passed in to getOutputConfiguration when creating the
partitionConfig, so I considered passing TenantId separately in the
saveToPhoenix call. I'm experimenting with this approach right now, although
I'm not sure if changing the function signature is something that should be
avoided. Input would be appreciated.
Thanks all)
> 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)