hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinod Kumar Vavilapalli <vino...@hortonworks.com>
Subject Re: Stop at CallObjectMethod when daemon running
Date Mon, 10 Dec 2012 19:02:31 GMT

Not familiar with your apr stuff, but you should capture getJobStatus() method instead of
getAllJobs(). getJobStatus() is what is called for individual jobs, getAllJobs() is called
only when you try to list jobs.

Thanks,
+Vinod Kumar Vavilapalli
Hortonworks Inc.
http://hortonworks.com/

On Dec 10, 2012, at 4:53 AM, ugiwgh wrote:

> I collect hadoop job info with JNI. My program run as daemon with apr API. But it didn't
go on running at the function "CallObjectMethod". Any one has this experience. Any help will
be appreciated.
> 
> 
> Following is code pieces.
> -------------------------
> 	jmethodID get_all_jobs_id = get_method(env,client_class,"getAllJobs","()[Lorg/apache/hadoop/mapred/JobStatus;");
> 	if(get_all_jobs_id == NULL)
>        {
> 		return false;
> 	}
>     jclass job_status_class = create_class(env,"org/apache/hadoop/mapred/JobStatus");
>    if(job_status_class == NULL)
>    {
>        return false;
>    }
>    jarray job_status_array = (*env)->CallObjectMethod(env,client_obj,get_all_jobs_id);
>    js_num = (*env)->GetArrayLength(env,job_status_array);
>    jmethodID get_run_status_id = get_method(env,job_status_class,"getRunState","()I");
> 
> -GHui


Mime
View raw message