/*
* Begin the import - iterate the files in the path
*/
for (FileStatus importStatus : fs.listStatus(importPath)) {
try {
FileSKVIterator importIterator = FileOperations.getInstance().openReader(importStatus.getPath().toString(), true, fs, fs.getConf(),
AccumuloConfiguration.getDefaultConfiguration());
while (importIterator.hasTop()) {
Key key = importIterator.getTopKey();
Value value = importIterator.getTopValue();
if (setTime) {
key.setTimestamp(time);
}
Mutation mutation = new Mutation(key.getRow());
if (!key.isDeleted()) {
mutation.put(key.getColumnFamily(), key.getColumnQualifier(), new ColumnVisibility(key.getColumnVisibilityData().toArray()), key.getTimestamp(),
value);
} else {
mutation.putDelete(key.getColumnFamily(), key.getColumnQualifier(), new ColumnVisibility(key.getColumnVisibilityData().toArray()),
key.getTimestamp());
}
table.addMutation(mutation);
importIterator.next();
}
} catch (Exception e) {
FSDataOutputStream failureWriter = null;
DataInputStream failureReader = null;
try {