Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-4824

FileInputStreamCache.close leaves dangling reference to FileInputStreamCache.cacheCleaner

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4-alpha
    • Fix Version/s: 2.1.0-beta
    • Component/s: hdfs-client
    • Labels:
      None

      Description

      FileInputStreamCache leaves around a reference to its cacheCleaner after close().

      The cacheCleaner is created like this:

      if (cacheCleaner == null) {
                cacheCleaner = new CacheCleaner();
                executor.scheduleAtFixedRate(cacheCleaner, expiryTimeMs, expiryTimeMs,
                    TimeUnit.MILLISECONDS);
              }
      

      and supposedly removed like this:

      if (cacheCleaner != null) {
        executor.remove(cacheCleaner);
      }
      

      However, ScheduledThreadPoolExecutor.remove returns a success boolean which should be checked. And I think from a quick read of that class that the return value of scheduleAtFixedRate should be used as the argument to remove.

      1. HDFS-4824.002.patch
        4 kB
        Colin Patrick McCabe
      2. HDFS-4824.001.patch
        2 kB
        Colin Patrick McCabe

        Activity

        Henry Robinson created issue -
        Colin Patrick McCabe made changes -
        Field Original Value New Value
        Attachment HDFS-4824.001.patch [ 12583357 ]
        Colin Patrick McCabe made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Colin Patrick McCabe made changes -
        Attachment HDFS-4824.002.patch [ 12583550 ]
        Colin Patrick McCabe made changes -
        Attachment HDFS-4824.002.patch [ 12583591 ]
        Colin Patrick McCabe made changes -
        Attachment HDFS-4824.002.patch [ 12583550 ]
        Todd Lipcon made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Target Version/s 3.0.0, 2.0.5-beta [ 12320356, 12324031 ]
        Fix Version/s 3.0.0 [ 12320356 ]
        Fix Version/s 2.0.5-beta [ 12324031 ]
        Resolution Fixed [ 1 ]
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Allen Wittenauer made changes -
        Fix Version/s 3.0.0 [ 12320356 ]

          People

          • Assignee:
            Colin Patrick McCabe
            Reporter:
            Henry Robinson
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development