Affects Version/s: 0.99.0, 2.0.0, 0.98.6
Fix Version/s: None
In the process of building support to running HBase on Microsoft Azure HDInsight, I hit an issue in the HBase WAL reading process that took a lot of time to debug. The WAL reading code depends on available() for the log InputStream never returing 0 until end of file. This is not the same as the contract in java.io.InputStream for available.
To prevent future grief for others that may want to port HBase onto storage systems other than HDFS, I propose to change the HBase WAL reader so it does not assume that EOF has been reached when available() == 0. It instead would treat available only as described in InputStream, i.e. available() is merely the number of bytes that could be read from the stream without blocking. That could be 0 even before EOF.
|Field||Original Value||New Value|
|Component/s||wal [ 12313572 ]|
|Affects Version/s||0.99.0 [ 12325675 ]|
|Affects Version/s||2.0.0 [ 12327188 ]|
|Affects Version/s||0.98.6 [ 12327376 ]|
|Status||Open [ 1 ]||Patch Available [ 10002 ]|
|Status||Patch Available [ 10002 ]||Open [ 1 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|7d 12h 14m||1||stack||12/Aug/14 05:00|
|318d 16h 17m||1||Ted Yu||26/Jun/15 21:18|