title: How to track Java multithread output as per file records sequentially
body: <p>I need to read bulk data file and process the data (like data validation, tracking validation failures and insert into data base etc..) using java multithreading.</p>
  
  <p>I wanted to use a main thread to read data from file and process the data using multitheading and ExecutorService.</p>
  
  <p>I need to track every record output once validation and insertion are done against to database.</p>
  
  <p>My questions are: </p>
  
  <ul>
  <li>How can I track output of every record?</li>
  <li>Can I put one common variable and increase the count of failure record data?</li>
  <li>I need to track how many records are failed sequentially. Is it possible?</li>
  </ul>