You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Michel Albonico <bs...@gmail.com> on 2010/11/18 13:40:59 UTC

Problems to start Hadoop through Java Classes

Hi everyone,

I'm having problems to creating a Java class to start Hadoop Cluster...

My NameNode e all datanodes are executing OK, I can create
directories, put files and remove them too... (bin/hadoop dfs -mkdir
/test)...

But, I can not run a Job... The JobTracker and TaskTrackers apparently
are executing ok...

Can someone help me?

Below is part of my code...

To start the JobTracker:
...
Configuration conf = getConfMR();
job = new JobConf(conf);
JobTracker jobtracker = JobTracker.startTracker(job);
...

To start the TaskTrackers:
...
Configuration conf = getConfMR();
JobConf job = new JobConf(conf);
TaskTracker tt = new TaskTracker(job);
...

I trying to execute the PiEstimator, but it stop on the message: "Starting Job".

All workers are started with Java classes, they aren't start with
shelll command "bin/hadoop jobtracker/tasktracker..."

-- 
Michel Albonico
http://www.inf.ufpr.br/michela
(49) 9913-2766
MSN: linucs@hotmail.com
E-mail: albonico@inf.ufpr.br

Re: Problems to start Hadoop through Java Classes

Posted by Ramkumar Vadali <ra...@gmail.com>.
Hi Michel

Any reason why you are not using the standard bin/start-mapred.sh? Why do
you need to create the JobTracker/TaskTracker yourself?

Ram

On Thu, Nov 18, 2010 at 4:49 AM, Michel Albonico <bs...@gmail.com>wrote:

> Hi everyone,
>
> I'm having problems to creating a Java class to start Hadoop Cluster...
>
> My NameNode e all datanodes are executing OK, I can create
> directories, put files and remove them too... (bin/hadoop dfs -mkdir
> /test)...
>
> But, I can not run a Job... The JobTracker and TaskTrackers apparently
> are executing ok...
>
> Can someone help me?
>
> Below is part of my code...
>
> To start the JobTracker:
> ...
> Configuration conf = getConfMR();
> job = new JobConf(conf);
> JobTracker jobtracker = JobTracker.startTracker(job);
> ...
>
> To start the TaskTrackers:
> ...
> Configuration conf = getConfMR();
> JobConf job = new JobConf(conf);
> TaskTracker tt = new TaskTracker(job);
> ...
>
> I trying to execute the PiEstimator, but it stop on the message: "Starting
> Job".
>
> All workers are started with Java classes, they aren't start with
> shelll command "bin/hadoop jobtracker/tasktracker..."
>
> --
> Michel Albonico
> http://www.inf.ufpr.br/michela
> (49) 9913-2766
> MSN: linucs@hotmail.com
> E-mail: albonico@inf.ufpr.br
>

Problems to start Hadoop through Java Classes

Posted by Michel Albonico <bs...@gmail.com>.
Hi everyone,

I'm having problems to creating a Java class to start Hadoop Cluster...

My NameNode e all datanodes are executing OK, I can create
directories, put files and remove them too... (bin/hadoop dfs -mkdir
/test)...

But, I can not run a Job... The JobTracker and TaskTrackers apparently
are executing ok...

Can someone help me?

Below is part of my code...

To start the JobTracker:
...
Configuration conf = getConfMR();
job = new JobConf(conf);
JobTracker jobtracker = JobTracker.startTracker(job);
...

To start the TaskTrackers:
...
Configuration conf = getConfMR();
JobConf job = new JobConf(conf);
TaskTracker tt = new TaskTracker(job);
...

I trying to execute the PiEstimator, but it stop on the message: "Starting Job".

All workers are started with Java classes, they aren't start with
shelll command "bin/hadoop jobtracker/tasktracker..."

--
Michel Albonico
http://www.inf.ufpr.br/michela
(49) 9913-2766
MSN: linucs@hotmail.com
E-mail: albonico@inf.ufpr.br