java io EOFException Premature EOF no length prefix available

One Star

java io EOFException Premature EOF no length prefix available

Exception in component tHDFSOutput_1
java.io.EOFException: Premature EOF: no length prefix available
at org.apache.hadoop.hdfs.protocolPB.PBHelper.vintPrefixed(PBHelper.java:2241)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1563)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1483)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:668)
: org.apache.hadoop.hdfs.DFSClient - DataStreamer Exception
java.io.IOException: Unable to create new block.
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1496)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:668)
: org.apache.hadoop.hdfs.DFSClient - Could not get block locations. Source file "/user/user1/Acccc_sfdc" - Aborting...
disconnected
: org.apache.hadoop.hdfs.DFSClient - Failed to close inode 38193
java.io.EOFException: Premature EOF: no length prefix available
at org.apache.hadoop.hdfs.protocolPB.PBHelper.vintPrefixed(PBHelper.java:2241)  
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1563)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1483)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:668)
Five Stars

Re: java io EOFException Premature EOF no length prefix available

You have a trailing '/' on your file name. Is that correct?
One Star

Re: java io EOFException Premature EOF no length prefix available

Yes but i need to place the file with source name Account.
Employee

Re: java io EOFException Premature EOF no length prefix available

The folder is not the issue but instead you need to put the file name after the last folder like "/user/user1/Acccc_sdfc/output.txt".