Example #1
0
 public override bool Equals(object obj)
 {
     if (obj is DFSClientCache.DFSInputStreamCaheKey)
     {
         DFSClientCache.DFSInputStreamCaheKey k = (DFSClientCache.DFSInputStreamCaheKey)obj;
         return(userId.Equals(k.userId) && inodePath.Equals(k.inodePath));
     }
     return(false);
 }
Example #2
0
        internal virtual FSDataInputStream GetDfsInputStream(string userName, string inodePath
                                                             )
        {
            DFSClientCache.DFSInputStreamCaheKey k = new DFSClientCache.DFSInputStreamCaheKey
                                                         (userName, inodePath);
            FSDataInputStream s = null;

            try
            {
                s = inputstreamCache.Get(k);
            }
            catch (ExecutionException e)
            {
                Log.Warn("Failed to create DFSInputStream for user:"******" Cause:" + e);
            }
            return(s);
        }
Example #3
0
 public virtual void InvalidateDfsInputStream(string userName, string inodePath)
 {
     DFSClientCache.DFSInputStreamCaheKey k = new DFSClientCache.DFSInputStreamCaheKey
                                                  (userName, inodePath);
     inputstreamCache.Invalidate(k);
 }