Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8546

Use try with resources in DataStorage and Storage

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: datanode
    • Labels:
      None
    • Target Version/s:

      Description

      We have some old-style try/finally to close files in DataStorage and Storage, let's update them.

      Also a few small cleanups:

      • Actually check that tryLock returns a FileLock in isPreUpgradableLayout
      • Remove unused parameter from writeProperties
      • Add braces for one-line if statements per coding style

        Attachments

        1. HDFS-8546.001.patch
          5 kB
          Andrew Wang
        2. HDFS-8546.002.patch
          6 kB
          Andrew Wang
        3. HDFS-8546.003.patch
          6 kB
          Andrew Wang
        4. HDFS-8546.004.patch
          6 kB
          Andrew Wang
        5. HDFS-8546.005.patch
          6 kB
          Andrew Wang
        6. HDFS-8546.006.patch
          6 kB
          Andrew Wang

          Activity

            People

            • Assignee:
              andrew.wang Andrew Wang
              Reporter:
              andrew.wang Andrew Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: