running pig script
I have not used node.js. But here I find a link to show how to execute a unit command in node.js: http://www.dzone.com/snippets/execute-unix-command-nodejs
For example, if you want to run a pig script called foo.pig. Then you can try the following code:
var sys = require('sys')var exec = require('child_process').exec;function puts(error, stdout, stderr) { sys.puts(stdout) }exec("pig -f foo.pig", puts);
You can replace pig -f foo.pig
to any command that you use to run your pig script.