Path getCache ( Path hdfsPath ) { CacheEntry c = cacheMap . get ( hdfsPath ) ; localMetrics . numGetAttempts ++ ; if ( c != null ) { // update the accessTime before returning to caller c . setGenstamp ( globalStamp . incrementAndGet ( ) ) ; localMetrics . numGetHits ++ ; return c . localPath ; } return null ; // not in cache }
Maps the hdfs pathname to a local pathname . Returns null if this is not found in the cache .