protected Callable<Response> callable() {
return new Callable<Response>() {
@Override
public Response call() throws Exception {
URIBuilder uri = uri( Job.SERVICE_PATH, "/mapreduce/jar" );
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add( new BasicNameValuePair( "jar", jar ) );
params.add( new BasicNameValuePair( "class", app ) );
params.add( new BasicNameValuePair( "arg", input ) );
params.add( new BasicNameValuePair( "arg", output ) );
UrlEncodedFormEntity form = new UrlEncodedFormEntity( params );
HttpPost request = new HttpPost( uri.build() );
request.setEntity( form );
return new Response( execute( request ) );
}
};
}