本文整理了Java中org.apache.flink.core.fs.Path.equals()
方法的一些代码示例,展示了Path.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Path.equals()
方法的具体详情如下:
包路径:org.apache.flink.core.fs.Path
类名称:Path
方法名:equals
暂无
代码示例来源:origin: apache/flink
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
else if (obj instanceof FileInputSplit && super.equals(obj)) {
FileInputSplit other = (FileInputSplit) obj;
return this.start == other.start &&
this.length == other.length &&
(this.file == null ? other.file == null : (other.file != null && this.file.equals(other.file)));
}
else {
return false;
}
}
代码示例来源:origin: apache/flink
@Override
protected boolean matchesSafely(Bucket<String, String> bucket) {
return bucket.getBucketId().equals(bucketId) &&
bucket.getBucketPath().equals(new Path(testTmpPath, bucketId)) &&
bucket.getInProgressPart() == null &&
bucket.getPendingPartsForCurrentCheckpoint().isEmpty() &&
bucket.getPendingPartsPerCheckpoint().size() == 1;
}
代码示例来源:origin: apache/flink
/**
* Checks if the expected input splits were created.
*/
@Test
public void checkInputSplits() throws IOException {
FileInputSplit[] inputSplits = this.createInputFormat().createInputSplits(0);
Arrays.sort(inputSplits, new InputSplitSorter());
int splitIndex = 0;
for (int fileIndex = 0; fileIndex < this.parallelism; fileIndex++) {
List<FileInputSplit> sameFileSplits = new ArrayList<FileInputSplit>();
Path lastPath = inputSplits[splitIndex].getPath();
for (; splitIndex < inputSplits.length; splitIndex++) {
if (!inputSplits[splitIndex].getPath().equals(lastPath)) {
break;
}
sameFileSplits.add(inputSplits[splitIndex]);
}
Assert.assertEquals(this.getExpectedBlockCount(fileIndex), sameFileSplits.size());
long lastBlockLength =
this.rawDataSizes[fileIndex] % (this.blockSize - getInfoSize()) + getInfoSize();
for (int index = 0; index < sameFileSplits.size(); index++) {
Assert.assertEquals(this.blockSize * index, sameFileSplits.get(index).getStart());
if (index < sameFileSplits.size() - 1) {
Assert.assertEquals(this.blockSize, sameFileSplits.get(index).getLength());
}
}
Assert.assertEquals(lastBlockLength, sameFileSplits.get(sameFileSplits.size() - 1).getLength());
}
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof FileStateHandle)) {
return false;
}
FileStateHandle that = (FileStateHandle) o;
return filePath.equals(that.filePath);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof FileStateHandle)) {
return false;
}
FileStateHandle that = (FileStateHandle) o;
return filePath.equals(that.filePath);
}
代码示例来源:origin: org.apache.flink/flink-runtime
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof FileStateHandle)) {
return false;
}
FileStateHandle that = (FileStateHandle) o;
return filePath.equals(that.filePath);
}
代码示例来源:origin: com.alibaba.blink/flink-runtime
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof FileStateHandle)) {
return false;
}
FileStateHandle that = (FileStateHandle) o;
return filePath.equals(that.filePath);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DirectoryStateHandle that = (DirectoryStateHandle) o;
return directory.equals(that.directory);
}
代码示例来源:origin: com.alibaba.blink/flink-runtime
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DirectoryStateHandle that = (DirectoryStateHandle) o;
return directory.equals(that.directory);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SnapshotDirectory that = (SnapshotDirectory) o;
return directory.equals(that.directory);
}
代码示例来源:origin: com.alibaba.blink/flink-runtime
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SnapshotDirectory that = (SnapshotDirectory) o;
return directory.equals(that.directory);
}
代码示例来源:origin: org.apache.flink/flink-runtime
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SnapshotDirectory that = (SnapshotDirectory) o;
return directory.equals(that.directory);
}
代码示例来源:origin: org.apache.flink/flink-runtime
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DirectoryStateHandle that = (DirectoryStateHandle) o;
return directory.equals(that.directory);
}
代码示例来源:origin: com.alibaba.blink/flink-core
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
else if (obj instanceof FileInputSplit && super.equals(obj)) {
FileInputSplit other = (FileInputSplit) obj;
return this.start == other.start &&
this.length == other.length &&
(this.file == null ? other.file == null : (other.file != null && this.file.equals(other.file)));
}
else {
return false;
}
}
代码示例来源:origin: org.apache.flink/flink-core
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
else if (obj instanceof FileInputSplit && super.equals(obj)) {
FileInputSplit other = (FileInputSplit) obj;
return this.start == other.start &&
this.length == other.length &&
(this.file == null ? other.file == null : (other.file != null && this.file.equals(other.file)));
}
else {
return false;
}
}
内容来源于网络,如有侵权,请联系作者删除!