Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # dev >> Calling o/s.flush() in HLog.sync()?


Copy link to this message
-
Calling o/s.flush() in HLog.sync()?
Looking at ProtobufLogWriter class, it looks like the call to flush() in
the sync method is a noop.

https://github.com/apache/hbase/blob/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java#L134

The underlying output stream is DFSOutputStream, which doesn't implement
flush().

And, it calls sync() anyway, which ensures the data is written to DN's
(cache).

Previously with SequenceFile$Writer, it writes data to the outputstream
(using Writables#write), and invoke sync/hflush.
https://github.com/apache/hadoop-common/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/SequenceFile.java#L1314

Is there a reason we have this call here? Please let me know if I miss any
context.

Thanks,
Himanshu
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB