It looks like the way to use muti-query from Java is as follows: 1. pigServer.setBatchOn(); 2. register your queries with pigServer 3. List<ExecJob> jobs = pigServer.executeBatch(); 4. for (ExecJob job : jobs) { Iterator<Tuple> results = job.getResults(); }
This will cause all stores to get evaluated in a single batch. Is there a way to know which job corresponds to which store? Experimentally, they seem to be in reverse order of appearance. Is that guaranteed, or is the order basically undefined and we need to add getAlias() to ExecJob? Also, it's inconvenient to need to store to disk in order to take advantage of multi-query -- when executing from Java, I may just want several iterators. Any thoughts on the advisability of adding pigServer.executeBatch(List<String> aliases) ? Thanks, -Dmitriy