kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Kreps <jay.kr...@gmail.com>
Subject sync() in java
Date Sat, 05 Nov 2011 20:34:53 GMT
Does anyone know if there is an equivalent to the sync() system call
available in Java? This is the system call that flushes all files. This
seems like it might be a good optimization for the time-based log flush. If
you are going to sequentially flush all the log partitions anyway it might
be better to just do a single sync() and let the I/O scheduler have more
leeway in the ordering of he writes. I know who to get the equivalent of
fsync() or fdatasync() using FileChannel.force(...) to flush a single file
but I don't know how to get the equivalent of sync().

-Jay

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message