@Override public boolean equals(Object other) { if(this == other) { return true; } if(other instanceof HdfsFile) { return ((HdfsFile) other).fs.equals(this.fs); } return false; } @Override
/** Compare if this object is equal to another object * @param o the object to be compared. * @return true if two file status has the same path name; false if not. */ @Override public boolean equals(Object o) { return super.equals(o); }
@Override public boolean equals(Object o) { return super.equals(o); }
@Override public boolean equals(Object o) { return realStatus.equals(o); }
/** Compare if this object is equal to another object * @param o the object to be compared. * @return true if two file status has the same path name; false if not. */ @Override public boolean equals(Object o) { if (o == null || this.getClass() != o.getClass()) { return false; } FileStatusEntry other = (FileStatusEntry) o; return this._fileStatus.get().equals(other._fileStatus.get()); }
if (!file.equals(mostCurrent)) { if (!fs.delete(file.getPath(), false)) { LOG.warn("Failed cleanup of " + path);
@Test public void testTableInfoFileStatusComparator() { FileStatus bare = new FileStatus(0, false, 0, 0, -1, new Path("/tmp", FSTableDescriptors.TABLEINFO_FILE_PREFIX)); FileStatus future = new FileStatus(0, false, 0, 0, -1, new Path("/tmp/tablinfo." + System.currentTimeMillis())); FileStatus farFuture = new FileStatus(0, false, 0, 0, -1, new Path("/tmp/tablinfo." + System.currentTimeMillis() + 1000)); FileStatus [] alist = {bare, future, farFuture}; FileStatus [] blist = {bare, farFuture, future}; FileStatus [] clist = {farFuture, bare, future}; Comparator<FileStatus> c = FSTableDescriptors.TABLEINFO_FILESTATUS_COMPARATOR; Arrays.sort(alist, c); Arrays.sort(blist, c); Arrays.sort(clist, c); // Now assert all sorted same in way we want. for (int i = 0; i < alist.length; i++) { assertTrue(alist[i].equals(blist[i])); assertTrue(blist[i].equals(clist[i])); assertTrue(clist[i].equals(i == 0? farFuture: i == 1? future: bare)); } }
/** Compare if this object is equal to another object * @param o the object to be compared. * @return true if two file status has the same path name; false if not. */ public boolean equals(Object o) { return super.equals(o); }
@Override public boolean equals(Object o) { if (!(o instanceof PathMetadata)) { return false; } return this.fileStatus.equals(((PathMetadata)o).fileStatus); }
@Override public boolean equals(Object o) { // satisfy findbugs return super.equals(o); }
@Override public boolean equals(Object other) { return other instanceof FileStatusWrapper && status.equals(((FileStatusWrapper) other).status); }
/** Compare if this object is equal to another object * @param o the object to be compared. * @return true if two file status has the same path name; false if not. */ @Override public boolean equals(Object o) { return super.equals(o); }
@Override public boolean equals(Object other) { return other instanceof FileStatusWrapper && status.equals(((FileStatusWrapper) other).status); }
/** Compare if this object is equal to another object * * @param o the object to be compared * @return true if two file status has the same path name; false if not */ @Override public boolean equals(Object o) { return super.equals(o); }
/** Compare if this object is equal to another object. * @param o the object to be compared. * @return true if two file status has the same path name; false if not. */ @Override public boolean equals(Object o) { return super.equals(o); }
@Override public boolean equals(Object o) { if (!super.equals(o)) { return false; } if (getClass() != o.getClass()) { return false; } CopyListingFileStatus other = (CopyListingFileStatus)o; return Objects.equal(aclEntries, other.aclEntries) && Objects.equal(xAttrs, other.xAttrs); }
/** Compare if this object is equal to another object * @param o the object to be compared. * @return true if two file status has the same path name; false if not. */ @Override public boolean equals(Object o) { if (o == null || this.getClass() != o.getClass()) { return false; } FileStatusEntry other = (FileStatusEntry) o; return this._fileStatus.get().equals(other._fileStatus.get()); }
/** Compare if this object is equal to another object * @param o the object to be compared. * @return true if two file status has the same path name; false if not. */ @Override public boolean equals(Object o) { if (o == null || this.getClass() != o.getClass()) { return false; } FileStatusEntry other = (FileStatusEntry) o; return this._fileStatus.get().equals(other._fileStatus.get()); }
@Override public boolean equals(Object other) { if (!(other instanceof TreePath)) { return false; } TreePath o = (TreePath) other; return getParentId() == o.getParentId() && getFileStatus().equals(o.getFileStatus()); }