Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Seek to File Length position throws EOF.
Seeks by default should throw EOF past FileLength, not at file length position.
Even in DFSInputStream it throws EOF above FileLength :
public synchronized void seek(long targetPos) throws IOException { if (targetPos > getFileLength()) { throw new EOFException("Cannot seek after EOF"); }
Due to this behaviour EOF is shown as part of tail command too.
ayush@ayushpc:~/ozone/hadoop-ozone/hadoop-ozone/dist/target/ozone-0.5.0-SNAPSHOT/bin$ ./ozone fs -tail -f /file 2019-12-08 01:21:34,088 [main] INFO impl.MetricsConfig: Loaded properties from hadoop-metrics2.properties 2019-12-08 01:21:34,137 [main] INFO impl.MetricsSystemImpl: Scheduled Metric snapshot period at 10 second(s). 2019-12-08 01:21:34,137 [main] INFO impl.MetricsSystemImpl: XceiverClientMetrics metrics system started Test tail: EOF encountered at pos: 5 for key: file
Attachments
Issue Links
- breaks
-
HDDS-2786 ITestOzoneContractSeek zero byte file failures
- Resolved
- links to