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); }
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); }
public virtual void InvalidateDfsInputStream(string userName, string inodePath) { DFSClientCache.DFSInputStreamCaheKey k = new DFSClientCache.DFSInputStreamCaheKey (userName, inodePath); inputstreamCache.Invalidate(k); }