Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

pig vertica connecter is giving URI exception while storing the data.

I have a simple pig script which reads data from vertica and try to write to other vertica table. I am able to read the data but when it tries to write, it is giving the following exception. It is happening for both local and map reduce mode.

2013-10-22 10:59:20,724 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size before optimization: 12013-10-22 10:59:20,724 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size after optimization: 12013-10-22 10:59:20,776 [main] INFO  org.apache.pig.tools.pigstats.ScriptState - Pig script settings are added to the job2013-10-22 10:59:20,792 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - mapred.job.reduce.markreset.buffer.percent is not set, set to default 0.32013-10-22 10:59:20,794 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - creating jar file Job2760076736579640824.jar2013-10-22 10:59:24,248 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - jar file Job2760076736579640824.jar created2013-10-22 10:59:24,268 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Setting up single store job2013-10-22 10:59:24,270 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 0: URISyntaxException:Output Path URI is malformed:null


-----pig script

REGISTER '/opt/mapr/pig/pig-0.10.0/lib/vertica-jdk5-6.1.2-0.jar';
REGISTER '/opt/mapr/pig/pig-0.10.0/lib/pig-vertica.jar';
REGISTER 'hadoop-vertica.jar';
A = LOAD 'sql://{select * from cg.campaign}' USING com.vertica.pig.VerticaLoader('XXX','XXX','5433', 'XX','XXX');
B = foreach A generate (int)1 as CAMPAIGN_KEY:int ;
STORE B INTO '{outTable(CAMPAIGN_KEY int)}' USING com.vertica.pig.VerticaStorer('XXX','XXX','5433', 'XX','XXX');

Comments

  • Have the same issue  ... environment is MAPR... 
  • This problem is fixed in MapR pig 0.11.
  • ok I tried MapR pig 0.11 and now am getting the following error

    2014-01-21 11:06:01,899 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Failed!2014-01-21 11:06:01,903 [main] ERROR org.apache.pig.tools.grunt.GruntParser - ERROR 2997: Encountered IOException. [Vertica][VJDBC](4856) ERROR: Syntax error at or near ")"Details at logfile: /home/hachena1/pig_1390320307576.log

    and the code used is
    REGISTER '/home/hachena1/jars/vertica-jdk5-6.1.1-0.jar';
    REGISTER '/home/hachena1/hadoop_vertica1/pig-vertica.jar';

    A = LOAD 'sql://{SELECT * FROM dennis.DB}' USING com.vertica.pig.VerticaLoader('abc.net','v_nibr_dev','5433', 'xyz','xxxxx');

    -- store A into 'outdata/nabil_test';

    STORE A INTO '{dennis.DB2}' USING com.vertica.pig.VerticaStorer('abc.net','v_nibr_dev','5433', 'xyz','xxxxxx');

    if we just store in a file it works but if we try to store in table schema we get the above error....

  • adding log output
    [email protected] ~]$ more pig_1390321057421.log Backend error message---------------------java.io.IOException: [Vertica][VJDBC](4856) ERROR: Syntax error at or near ")" at com.vertica.hadoop.VerticaOutputFormat.getRecordWriter(VerticaOutputFormat.java:140) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.getRecordWriter(PigOutputFormat.java:84) at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.<init>(MapTask.java:555) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:670) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:347) at org.apache.hadoop.mapred.Child$4.run(Child.java:270) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1127) at org.apache.hadoop.mapred.Child.main(Child.java:264)
    Pig Stack Trace---------------ERROR 2997: Encountered IOException. [Vertica][VJDBC](4856) ERROR: Syntax error at or near ")"
    java.io.IOException: [Vertica][VJDBC](4856) ERROR: Syntax error at or near ")" at com.vertica.hadoop.VerticaOutputFormat.getRecordWriter(VerticaOutputFormat.java:140) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.getRecordWriter(PigOutputFormat.java:84) at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.<init>(MapTask.java:555) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:670) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:347) at org.apache.hadoop.mapred.Child$4.run(Child.java:270) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1127)================================================================================

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.