private int comparePath(Path p1, Path p2) { return p1.compareTo(p2); } }
@Override public int compareTo(OrcFileKeyWrapper o) { return inputPath.compareTo(o.inputPath); }
@Override public int compareTo(PathData o) { return path.compareTo(o.path); }
private int comparePath(Path p1, Path p2) { return p1.compareTo(p2); } }
@Override public int compareTo(OrcFileKeyWrapper o) { return inputPath.compareTo(o.inputPath); }
@Override public int compareTo(FileSystemDatasetVersion other) { StringDatasetVersion otherAsString = (StringDatasetVersion) other; return this.version.equals(otherAsString.version) ? this.path.compareTo(otherAsString.path) : this.version .compareTo(otherAsString.version); }
/** * Compare this FileStatus to another FileStatus * @param o the FileStatus to be compared. * @return a negative integer, zero, or a positive integer as this object * is less than, equal to, or greater than the specified object. */ public int compareTo(FileStatus o) { return this.getPath().compareTo(o.getPath()); }
@Override public int compareTo(FileSystemDatasetVersion other) { FileStatusDatasetVersion otherAsFileStatus = (FileStatusDatasetVersion) other; return this.fileStatus.getPath().compareTo(otherAsFileStatus.getFileStatus().getPath()); }
@Override public int compareTo(FileSystemDatasetVersion other) { TimestampedDatasetVersion otherAsDateTime = (TimestampedDatasetVersion) other; return this.version.equals(otherAsDateTime.version) ? this.path.compareTo(otherAsDateTime.path) : this.version.compareTo(otherAsDateTime.version); }
public int compareTo(DatasetVersion other) { FileStatusDatasetVersion otherAsFileStatus = (FileStatusDatasetVersion) other; return this.fileStatus.getPath().compareTo(otherAsFileStatus.getFileStatus().getPath()); }
private Path makeRelative(String initial, Path p) { String scheme = this.uri.getScheme(); String authority = this.uri.getAuthority(); Path root = new Path(Path.SEPARATOR); if (root.compareTo(p) == 0) return new Path(scheme, authority, initial); Path retPath = new Path(p.getName()); Path parent = p.getParent(); for (int i=0; i < p.depth()-1; i++) { retPath = new Path(parent.getName(), retPath); parent = parent.getParent(); } return new Path(new Path(scheme, authority, initial), retPath.toString()); }
/** * this method returns the path * inside the har filesystem. * this is relative path inside * the har filesystem. * @param path the fully qualified path in the har filesystem. * @return relative path in the filesystem. */ private Path getPathInHar(Path path) { Path harPath = new Path(path.toUri().getPath()); if (archivePath.compareTo(harPath) == 0) return new Path(Path.SEPARATOR); Path tmp = new Path(harPath.getName()); Path parent = harPath.getParent(); while (!(parent.compareTo(archivePath) == 0)) { if (parent.toString().equals(Path.SEPARATOR)) { tmp = null; break; } tmp = new Path(parent.getName(), tmp); parent = parent.getParent(); } if (tmp != null) tmp = new Path(Path.SEPARATOR, tmp); return tmp; }
@Override public int compare(FetchInputFormatSplit a, FetchInputFormatSplit b) { final Path ap = a.getPath(); final Path bp = b.getPath(); if (ap != null) { return (ap.compareTo(bp)); } return Long.signum(a.getLength() - b.getLength()); } }
@SuppressWarnings("deprecation") @Override public int compare(FileStatus o1, FileStatus o2) { if (o1 == null || o2 == null) return o1 == o2 ? 0 : o1 == null ? -1 : 1; return o1.isDir() == o2.isDir() ? o1.getPath().compareTo(o2.getPath()) : o1.isDir() ? -1 : 1; } };
@Override public int compare(InputSplit inp1, InputSplit inp2) { FileSplit fs1 = (FileSplit) inp1; FileSplit fs2 = (FileSplit) inp2; int retval = fs1.getPath().compareTo(fs2.getPath()); if (retval != 0) { return retval; } if (fs1.getStart() != fs2.getStart()) { return (int) (fs1.getStart() - fs2.getStart()); } return 0; } }
@Override public int compare(InputSplit inp1, InputSplit inp2) { FileSplit fs1 = (FileSplit) inp1; FileSplit fs2 = (FileSplit) inp2; int retval = fs1.getPath().compareTo(fs2.getPath()); if (retval != 0) { return retval; } if (fs1.getStart() != fs2.getStart()) { return (int) (fs1.getStart() - fs2.getStart()); } return 0; } }
FileSplit fs2 = (FileSplit) o2; if (fs1.getPath() != null && fs2.getPath() != null) { int pathComp = (fs1.getPath().compareTo(fs2.getPath())); if (pathComp == 0) {
FileSplit fs2 = (FileSplit) o2; if (fs1.getPath() != null && fs2.getPath() != null) { int pathComp = (fs1.getPath().compareTo(fs2.getPath())); if (pathComp == 0) {
@Override public int compareTo(FileRef o) { return suffix.compareTo(o.suffix); }
fsd1.getDirName().compareTo(fsd2.getDirName())); for (FileSinkDesc desc : acidSinks) { TableDesc tableInfo = desc.getTableInfo();