new FileInputStream(filepath)), 16 * 1024 * 1024);
String line = null;
String delimiter_ = new String(",");
String firstuser = null;
String nextuser = null;
batch_mutation_t rmInbox = null;
batch_mutation_t rmOutbox = null;
while ((line = bufReader.readLine()) != null) {
StringTokenizer st = new StringTokenizer(line, delimiter_);
int i = 0;
String threadId = null;
int lastUpdated = 0;
int isDeleted = 0;
int folder = 0;
int uid =0;
String user = null;
while (st.hasMoreElements()) {
switch (i) {
case 0:
user = (String) st.nextElement();// sb.append((String)st.nextElement());
if ( !isNumeric(user))
continue;
break;
case 1:
folder = Integer.parseInt((String) st.nextElement());// sb.append((String)st.nextElement());
break;
case 2:
threadId = (String) st.nextElement();
break;
case 3:
lastUpdated = Integer.parseInt((String) st.nextElement());
break;
case 4:
isDeleted = Integer.parseInt((String) st.nextElement());// (String)st.nextElement();
break;
default:
break;
}
++i;
}
nextuser = user;
if (firstuser == null || firstuser.compareTo(nextuser) != 0) {
firstuser = nextuser;
if (rmInbox != null && !rmInbox.cfmap.isEmpty()) {
/* fos_.write(rmInbox.key.getBytes());
fos_.write( System.getProperty("line.separator").getBytes());
counter_.incrementAndGet();
*/ apply(rmInbox);
}
if (rmOutbox != null && !rmOutbox.cfmap.isEmpty()) {
/* fos_.write(rmOutbox.key.getBytes());
fos_.write( System.getProperty("line.separator").getBytes());
counter_.incrementAndGet();
*/ apply(rmOutbox);
}
rmInbox = new batch_mutation_t();
rmInbox.table = "Mailbox";
rmInbox.key = firstuser + ":0";
rmInbox.cfmap = new HashMap<String, List<column_t>>();
rmOutbox = new batch_mutation_t();
rmOutbox.table = "Mailbox";
rmOutbox.key = firstuser + ":1";
rmOutbox.cfmap = new HashMap<String, List<column_t>>();
}
column_t columnData = new column_t();