<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to handle: Unable to close file because the last block does not have enough number of replicas in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-Unable-to-close-file-because-the-last-block/m-p/180944#M70696</link>
    <description>&lt;P&gt;"Sleep and retry" is good way to handle the "not have enough number of replicas" problem.&lt;/P&gt;&lt;P&gt;For the "already the current lease holder" problem, you may call DistributedFileSystem.recoverLease(Path) to force lease recovery.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2017 06:51:40 GMT</pubDate>
    <dc:creator>sze</dc:creator>
    <dc:date>2017-11-28T06:51:40Z</dc:date>
    <item>
      <title>How to handle: Unable to close file because the last block does not have enough number of replicas</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-Unable-to-close-file-because-the-last-block/m-p/180943#M70695</link>
      <description>&lt;P&gt;I have a Java application that is appending recorded video into an HDFS file. Occasionally, after writing a batch of video frames, when I try to close the FSDataOutputStream I get the following error:&lt;/P&gt;&lt;PRE&gt;Unable to close file because the last block does not have enough number of replicas&lt;/PRE&gt;&lt;P&gt;In this case, I sleep for 100ms and try again and the close succeeds. However, the next time I try and open the file I get the following error:&lt;/P&gt;&lt;PRE&gt;Failed to APPEND_FILE /PSG/20171102.idx for DFSClient_NONMAPREDUCE_1265824578_479 on 192.168.3.224 because DFSClient_NONMAPREDUCE_1265824578_479 is already the current lease holder.&lt;/PRE&gt;&lt;P&gt;What is the proper way of handling a failed close attempt? Any ideas on how to handle such situations? Thanks, David&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 18:49:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-Unable-to-close-file-because-the-last-block/m-p/180943#M70695</guid>
      <dc:creator>kc7bfi</dc:creator>
      <dc:date>2017-11-03T18:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle: Unable to close file because the last block does not have enough number of replicas</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-Unable-to-close-file-because-the-last-block/m-p/180944#M70696</link>
      <description>&lt;P&gt;"Sleep and retry" is good way to handle the "not have enough number of replicas" problem.&lt;/P&gt;&lt;P&gt;For the "already the current lease holder" problem, you may call DistributedFileSystem.recoverLease(Path) to force lease recovery.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 06:51:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-Unable-to-close-file-because-the-last-block/m-p/180944#M70696</guid>
      <dc:creator>sze</dc:creator>
      <dc:date>2017-11-28T06:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle: Unable to close file because the last block does not have enough number of replicas</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-Unable-to-close-file-because-the-last-block/m-p/180945#M70697</link>
      <description>&lt;P&gt;For recoverLease using CLI, see &lt;A href="https://community.hortonworks.com/questions/146012/force-closing-a-hdfs-file-still-open-because-uncor.html?childToView=146021#answer-146021" target="_blank"&gt;https://community.hortonworks.com/questions/146012/force-closing-a-hdfs-file-still-open-because-uncor.html?childToView=146021#answer-146021&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 08:25:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-Unable-to-close-file-because-the-last-block/m-p/180945#M70697</guid>
      <dc:creator>sze</dc:creator>
      <dc:date>2017-11-28T08:25:31Z</dc:date>
    </item>
  </channel>
</rss>

