use of alluxio.master.journal.JournalContext in project alluxio by Alluxio.
the class AccessTimeUpdater method flushUpdates.
private void flushUpdates() {
try (JournalContext context = mFileSystemMaster.createJournalContext()) {
for (Iterator<Map.Entry<Long, Long>> iterator = mAccessTimeUpdates.entrySet().iterator(); iterator.hasNext(); ) {
Map.Entry<Long, Long> inodeEntry = iterator.next();
iterator.remove();
UpdateInodeEntry entry = UpdateInodeEntry.newBuilder().setId(inodeEntry.getKey()).setLastAccessTimeMs(inodeEntry.getValue()).build();
context.append(Journal.JournalEntry.newBuilder().setUpdateInode(entry).build());
}
} catch (UnavailableException e) {
LOG.debug("Failed to flush access time updates.", e);
}
}
Aggregations