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

ShortCircuitCache.CacheCleaner can add Slot.isInvalid() check too

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.7.1
    • None
    • hdfs-client
    • None

    Description

      Currently CacheCleaner thread checks only for cache-expiry times. It would be nice if it handles an invalid-slot too in an extra-pass of evictable map…

      for(ShortCircuitReplica replica:evictable.values()) {
      if(!scr.getSlot().isValid())

      { purge(replica); }

      }
      //Existing code...
      int numDemoted = demoteOldEvictableMmaped(curMs);
      int numPurged = 0;
      Long evictionTimeNs = Long.valueOf(0);
      ….
      …..

      Apps like HBase can tweak the expiry/staleness/cache-size params in DFS-Client, so that ShortCircuitReplica will never be closed except when Slot is declared invalid.

      I assume slot-invalidation will happen during block-invalidation/deletes

      {Primarily triggered by compaction/shard-takeover etc..}

      Attachments

        Activity

          People

            kanaka Kanaka Kumar Avvaru
            ravikumar.govindarajan Ravikumar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: