spring - How Callback parameter works using WebHCat/Hive? -



spring - How Callback parameter works using WebHCat/Hive? -

i followed documentation in webhcat reference hive

my goal phone call spring controller 1 time hive job status succeeded.

**here inputs :** **url** : http://localhost:50111/templeton/v1/hive?user.name=hduser **parameter:** callback : http://domain:port/project-name/mycall/$jobid

the $jobid paramter replaced actual jobid 1 time processing completed.

** here controller : ** @requestmapping(value = "/mycall/{jobid}", method = requestmethod.get) public void callback( @pathvariable string jobid) throws ioexception { logger.debug("jobid : {}", jobid ); }

i've done sucsefully in node.js express. i'll seek explain though.

first utilize request module submit job

var cmd = "http://"+targ+":"+port+"/templeton/v1/hive"; request({ method: 'post', url: cmd, form: { 'user.name': user, // variable user.name= 'execute': query, // actual query string 'statusdir': dir, // directory results go on hdfs 'callback': "http://"+ip+":3000/callback/$jobid", // callback address } }, function(err, response, body){

and route receives callback.

router.get('/:jobid', function(req, res) { var jobid = req.param('jobid'); console.log(jobid, 'get: /callback/:jobid'); i.alert(jobid); res.status(200).end(); });

the /callback in app.js calls route if not familiar node.

spring hadoop hive hql hcatalog

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -