phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (PHOENIX-733) Lack of Batch Statement implementation break storage with PIG
Date Fri, 02 May 2014 04:52:14 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James Taylor resolved PHOENIX-733.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.0
                   4.0.0
                   3.0.0

> Lack of Batch Statement implementation break storage with PIG
> -------------------------------------------------------------
>
>                 Key: PHOENIX-733
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-733
>             Project: Phoenix
>          Issue Type: Task
>    Affects Versions: 3.0-Release
>            Reporter: damiencarol
>             Fix For: 3.0.0, 4.0.0, 5.0.0
>
>
> If you use PHOENIX with Pig.
> Try to UPSERT some values from PIG script to PHOENIX with JDBC connector throw java.sql.SQLFeatureNotSupportedException.
> This is because PIG use Batch statement (see class "org.apache.pig.piggybank.storage.DBStorage").
> ```Pig
>     STORE some_table INTO 'some_table' USING org.apache.pig.piggybank.storage.DBStorage('com.salesforce.phoenix.jdbc.PhoenixDriver',
>     'jdbc:phoenix:someserver', '', '',
>     ' UPSERT INTO some_table (id, col1, col2, col3) VALUES (?, ?, ?, ?) ');
> ```
> Exception :
> ```
> java.io.IOException: java.lang.RuntimeException: JDBC error
>     at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.runPipeline(PigGenericMapReduce.java:469)
>     at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.processOnePackageOutput(PigGenericMapReduce.java:432)
>     at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.reduce(PigGenericMapReduce.java:404)
>     at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.reduce(PigGenericMapReduce.java:256)
>     at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:177)
>     at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
>     at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:418)
>     at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at javax.security.auth.Subject.doAs(Subject.java:396)
>     at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
>     at org.apache.hadoop.mapred.Child.main(Child.java:249)
> Caused by: java.lang.RuntimeException: JDBC error
>     at org.apache.pig.piggybank.storage.DBStorage.putNext(DBStorage.java:178)
>     at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat$PigRecordWriter.write(PigOutputFormat.java:139)
>     at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat$PigRecordWriter.write(PigOutputFormat.java:98)
>     at org.apache.hadoop.mapred.ReduceTask$NewTrackingRecordWriter.write(ReduceTask.java:586)
>     at org.apache.hadoop.mapreduce.TaskInputOutputContext.write(TaskInputOutputContext.java:80)
>     at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.runPipeline(PigGenericMapReduce.java:467)
>     ... 11 more
> Caused by: java.sql.SQLFeatureNotSupportedException
>     at com.salesforce.phoenix.jdbc.PhoenixPreparedStatement.addBatch(PhoenixPreparedStatement.java:92)
>     at org.apache.pig.piggybank.storage.DBStorage.putNext(DBStorage.java:157)
>     ... 16 more



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message