Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.4.0
-
None
Description
HDFS uses file-lease to manage opened files, when a file is not closed normally, NN will recover lease automatically after hard limit exceeded. But for a long running service(e.g. HBase), the hdfs-client will never die and NN don't have any chances to recover the file.
Usually client program needs to handle exceptions by themself to avoid this condition(e.g. HBase automatically call recover lease for files that not closed normally), but in our experience, most services (in our company) don't process this condition properly, which will cause lots of files in abnormal status or even data loss.
This Jira propose to add a feature that call recoverLease operation automatically when DFSOutputSteam close encounters exception. It should be disabled by default, but when somebody builds a long-running service based on HDFS, they can enable this option.
We've add this feature to our internal Hadoop distribution for more than 3 years, it's quite useful according our experience.
Attachments
Attachments
Issue Links
- incorporates
-
HDFS-15684 EC: Call recoverLease on DFSStripedOutputStream close exception
- Resolved
-
HDFS-15559 Complement initialize member variables in TestHdfsConfigFields#initializeMemberVariables
- Resolved
- relates to
-
HDFS-15858 Backport HDFS-14694 to branch-3.1/3.2/3.3
- Patch Available