Grokbase Groups Pig dev November 2009
FAQ
[ https://issues.apache.org/jira/browse/PIG-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates reassigned PIG-93:
-----------------------------

Assignee: Benjamin Francisoud
Impossible to set jobconf parameters
------------------------------------

Key: PIG-93
URL: https://issues.apache.org/jira/browse/PIG-93
Project: Pig
Issue Type: Bug
Components: impl
Affects Versions: 0.1.0
Reporter: Benjamin Francisoud
Assignee: Benjamin Francisoud
Priority: Critical
Fix For: 0.1.0

Attachments: PIG93Main.java


I'm trying to set jobconf parameter before launching a pig job using pig api.
I tried 2 different ways but with no success:
{code:java}
PigContext pigContext = new PigContext(ExecType.MAPREDUCE);
pigContext.getExecutionEngine().getConfiguration().putAll(properties);
PigServer pigServer = new PigServer(pigContext);
....
{code}
Throw a NPE because the internal executionEngine var is initialize only when calling connect().
So I tried:
{code:java}
PigContext pigContext = new PigContext(ExecType.MAPREDUCE);
pigContext.connect();
pigContext.getExecutionEngine().getConfiguration().putAll(properties);
PigServer pigServer = new PigServer(pigContext);
...
{code}
My properties have been replace with a "new JobConf()"
{noformat}
java.lang.RuntimeException: Bad mapred.job.tracker: local
at org.apache.hadoop.mapred.JobTracker.getAddress(JobTracker.java:711)
at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.init(HExecutionEngine.java:149)
at org.apache.pig.impl.PigContext.connect(PigContext.java:180)
{noformat}
"properties" contains "mapred.job.tracker" and "hadoop.tmp.dir values"
Before PIG-32 I use to do (and it was working):
{code:java}
PigContext pigContext = new PigContext(ExecType.MAPREDUCE);
pigContext.setConf(myJobConf);
PigServer pigServer = new PigServer(pigContext);
...
{code}
Any idea before I start to work on a patch ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupdev @
categoriespig, hadoop
postedNov 12, '09 at 4:54a
activeNov 12, '09 at 4:54a
posts1
users1
websitepig.apache.org

1 user in discussion

Alan Gates (JIRA): 1 post

People

Translate

site design / logo © 2022 Grokbase