[ https://issues.apache.org/jira/browse/HDDS-2692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated HDDS-2692: --------------------------------- Labels: pull-request-available (was: ) > Seek to file end throws EOF Exception > ------------------------------------- > > Key: HDDS-2692 > URL: https://issues.apache.org/jira/browse/HDDS-2692 > Project: Hadoop Distributed Data Store > Issue Type: Bug > Reporter: Ayush Saxena > Assignee: Ayush Saxena > Priority: Major > Labels: pull-request-available > > 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 : > {code:java} > public synchronized void seek(long targetPos) throws IOException { > if (targetPos > getFileLength()) { > throw new EOFException("Cannot seek after EOF"); > } > {code} > Due to this behaviour EOF is shown as part of tail command too. > {noformat} > 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 > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org