search

Home  >  Q&A  >  body text

java - hdfs的append追加问题

问一下hdfs的append追加操作,每次追加一定要关闭fds流吗?

我不关闭会报错:areadybeingcreatedexception

大家讲道理大家讲道理2911 days ago419

reply all(2)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:44:38

    But when I run append, it runs normally at the beginning, but after a while this error occurs

    I can’t understand it. Doesn’t append look for the location of the last file pointer in the file metadata? Why is it reported that file creation failed?
    Append still needs to create a file?

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:44:38

    HDFS does have this problem. It is recommended to close and reopen each time, but use batch append to improve efficiency

    reply
    0
  • Cancelreply