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

Hudson commented on PHOENIX-2310:
---------------------------------

SUCCESS: Integrated in Phoenix-master #915 (See 
[https://builds.apache.org/job/Phoenix-master/915/])
PHOENIX-2310 Fix to address issue in Phoenix / Pig integration that was 
(jfernando: rev 288eda9ab8dffcb7b5ae8bc8e706797d4b20d173)
* 
phoenix-core/src/test/java/org/apache/phoenix/mapreduce/util/PhoenixConfigurationUtilTest.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/DelegateColumn.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/DelegateTable.java


> PhoenixConfigurationUtil.getUpsertColumnMetadataList() in Phoenix Mapreduce 
> integration generates incorrect upsert statement for view immediately after 
> issue view DDL
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2310
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2310
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.5.2
>            Reporter: Jan Fernando
>            Assignee: Jan Fernando
>         Attachments: PHOENIX-2310-v1.patch, PHOENIX-2310_v2.patch
>
>
> We ran into what I believe is a corner case that was causing a M/R job using 
> the Phoenix / Pig integration to fail by virtue of a incorrect UPSERT 
> statement being generated. 
> The issue was intermittent. The bug is that the UPSERT statement generated by 
> PhoenixConfigurationUtil.getUpsertColumnMetadataList() when invoked from 
> PhoenixRecordWriter would, instead of the cf.column_name, would contain for 
> certain columns the result class name + hashcode as generated by Java's 
> Object.toString(). Since this was not a valid column name the Pig Script 
> would blow-up.
> This only occurs if we are attempting to insert data into a Phoenix View and 
> the DDL for the Phoenix View was issued recently such that the MetadataClient 
> cache was for this view was populated by MetaDataClient.createTable(). 
> What is occurring is in this case we wrap the PColumn in a Delegate at lines 
> 1898 and 1909. The DelegateColumn class used to wrap PColumn doesn't 
> implement toString() and so the default Object toString() is used. If you 
> restart the JVM and force Phoenix to re-read the metadata from SYSTEM.CATALOG 
> this doesn't occur as in this case we don't wrap the PColumn instance.
> I have a test to repro and a possible patch I'll attach shortly.



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

Reply via email to