MapR FS Java Client - Disable Caching

Discussion created by shani on Jul 22, 2018
Latest reply on Aug 2, 2018 by aaron



I'm trying to implement an atomic write of file to MapR-FS in Java, to do so, I first write the data file, and then I write another file which contains the CRC of the data and the data size to another file (I'll call it the "completion" file from now own). When I list the files, I check if the "completion" file exists, and when I read the file, I check for CRC errors.


Sometimes when I "force close" the Java program which writes the files down, I notice that the completion file is written, but the data file has CRC errors. I wonder if I can use some "fsync" on the FS to make sure that the data file is written successfully and only then write the completion file, also If I can disable some caches that the mapr client has.