@Override public void run() { try { for (int i = 0; i < numBatches; i++) { TupleBatch batch = dataGen.tupleBatchQueue.take(); for (int j = 0; j < batch.size(); j++) { try { indexAccessor.insert(batch.get(j)); } catch (Exception e) { e.printStackTrace(); throw e; } } } } catch (Exception e) { e.printStackTrace(); } } }