pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Francisoud (JIRA)" <j...@apache.org>
Subject [jira] Updated: (PIG-93) Impossible to set jobconf parameters
Date Wed, 06 Feb 2008 17:15:08 GMT

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

Benjamin Francisoud updated PIG-93:
-----------------------------------

    Attachment: PIG93Main.java

Java Main to reproduce this bug.
You need to change FS_NAME, JOB_TRACKER, INPUT_PATH and OUTPUT_PATH values.

The stacktrace:
{noformat}
Running main...
08/02/06 18:11:04 INFO apache.pig: Connecting to hadoop file system at: file:///
08/02/06 18:11:05 INFO apache.pig: Connecting to map-reduce job tracker at: local
Exception in thread "main" 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:151)
	at org.apache.pig.impl.PigContext.connect(PigContext.java:182)
	at org.apache.pig.PigServer.<init>(PigServer.java:123)
	at org.apache.pig.PIG93Main.main(PIG93Main.java:22)
{noformat}

> 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
>            Priority: Critical
>         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.


Mime
View raw message