We are using PigServer directly to run pig scripts as part of workflow.
It looks like setbatchmodeon(true) can't be used with this registerScript(String fileName, Map<String,String> params).
I am not sure why the pigserver implementation doesnt match grunt shell implementation.
Also you need to call pigserver.store method.
This makes MultiQuery option not possible with PigServer with registerPigScript?