All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.hana.datalake.files.HdlfsTaskOutputInfo Maven / Gradle / Ivy

Go to download

An implementation of org.apache.hadoop.fs.FileSystem targeting SAP HANA Data Lake Files.

There is a newer version: 3.0.27
Show newest version
// © 2022 SAP SE or an SAP affiliate company. All rights reserved.
package com.sap.hana.datalake.files;

import java.io.Serializable;
import java.util.List;

public class HdlfsTaskOutputInfo implements Serializable {
  private static final long serialVersionUID = 5227557730062778482L;
  public String taskAttemptId;
  public String finalTaskOutputLocation;
  public String taskPendingFilePath;
  public List taskPendingFiles;

  public HdlfsTaskOutputInfo() {
    // no-op
  }

  public HdlfsTaskOutputInfo(final String taskAttemptId, final String finalTaskOutputLocation, final String taskPendingFilePath, final List taskPendingFiles) {
    this.taskAttemptId = taskAttemptId;
    this.finalTaskOutputLocation = finalTaskOutputLocation;
    this.taskPendingFilePath = taskPendingFilePath;
    this.taskPendingFiles = taskPendingFiles;
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;

    result = prime * result + (this.taskAttemptId == null ? 0 : this.taskAttemptId.hashCode());
    result = prime * result + (this.finalTaskOutputLocation == null ? 0 : this.finalTaskOutputLocation.hashCode());
    result = prime * result + (this.taskPendingFilePath == null ? 0 : this.taskPendingFilePath.hashCode());
    result = prime * result + (this.taskPendingFiles == null ? 0 : this.taskPendingFiles.hashCode());

    return result;
  }

  @Override
  public boolean equals(Object other) {
    if (this == other) {
      return true;
    }

    if (other == null || this.getClass() != other.getClass()) {
      return false;
    }
    
    final HdlfsTaskOutputInfo otherInfo = (HdlfsTaskOutputInfo) other;
    
    return ((this.taskAttemptId == null && otherInfo.taskAttemptId == null) ||  (this.taskAttemptId != null && this.taskAttemptId.equals(otherInfo.taskAttemptId)))
        && ((this.finalTaskOutputLocation == null && otherInfo.finalTaskOutputLocation == null) || (this.finalTaskOutputLocation != null && this.finalTaskOutputLocation.equals(otherInfo.finalTaskOutputLocation)))
        && ((this.taskPendingFilePath == null && otherInfo.taskPendingFilePath == null) || (this.taskPendingFilePath != null && this.taskPendingFilePath.equals(otherInfo.taskPendingFilePath)))
        && ((this.taskPendingFiles == null && otherInfo.taskPendingFiles == null) || (this.taskPendingFiles != null && this.taskPendingFiles.equals(otherInfo.taskPendingFiles)));
  }
}

// © 2022 SAP SE or an SAP affiliate company. All rights reserved.




© 2015 - 2024 Weber Informatics LLC | Privacy Policy