public void run() { QueryBatchImpl batch = new QueryBatchImpl() .withBatcher(batcher) .withTimestamp(Calendar.getInstance())
Runnable processBatch = new Runnable() { public void run() { QueryBatchImpl batch = new QueryBatchImpl() .withBatcher(batcher) .withTimestamp(Calendar.getInstance()) QueryBatchImpl batch = new QueryBatchImpl() .withItems(new String[0]) .withClient(clientList.get().get(0))
QueryBatchImpl batch = new QueryBatchImpl() .withBatcher(batcher) .withClient(client)
services.postResource(null, "internal/apply-transform", null, params, uris, new ReaderHandle()).get() ).lines().collect(Collectors.toList()); QueryBatchImpl processedBatch = new QueryBatchImpl() .withClient( batch.getClient() ) .withItems( responseUris.toArray(new String[responseUris.size()]) )
@Override public void retryListener(QueryBatch batch, QueryBatchListener queryBatchListener) { // We get the batch and modify the client alone in order to make use // of the new forest client in case if the original host is unavailable. DatabaseClient client = null; Forest[] forests = batch.getBatcher().getForestConfig().listForests(); for(Forest forest : forests) { if(forest.equals(batch.getForest())) client = getMoveMgr().getForestClient(forest); } QueryBatchImpl retryBatch = new QueryBatchImpl() .withClient( client ) .withBatcher( batch.getBatcher() ) .withTimestamp( batch.getTimestamp() ) .withServerTimestamp( batch.getServerTimestamp() ) .withItems( batch.getItems() ) .withJobTicket( batch.getJobTicket() ) .withJobBatchNumber( batch.getJobBatchNumber() ) .withJobResultsSoFar( batch.getJobResultsSoFar() ) .withForestBatchNumber( batch.getForestBatchNumber() ) .withForestResultsSoFar( batch.getForestResultsSoFar() ) .withForest( batch.getForest() ) .withJobTicket( batch.getJobTicket() ); queryBatchListener.processEvent(retryBatch); }