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

Use try with resources in DataStorage and Storage

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.7.0
    • 2.8.0, 3.0.0-alpha1
    • datanode
    • None

    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.006.patch
          6 kB
          Andrew Wang
        2. HDFS-8546.005.patch
          6 kB
          Andrew Wang
        3. HDFS-8546.004.patch
          6 kB
          Andrew Wang
        4. HDFS-8546.003.patch
          6 kB
          Andrew Wang
        5. HDFS-8546.002.patch
          6 kB
          Andrew Wang
        6. HDFS-8546.001.patch
          5 kB
          Andrew Wang

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: