@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getErrorCode() == null) ? 0 : getErrorCode().hashCode()); hashCode = prime * hashCode + ((getErrorMessage() == null) ? 0 : getErrorMessage().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getErrorDetail() == null) ? 0 : getErrorDetail().hashCode()); return hashCode; }
/** * <p> * The code associated with this error. * </p> * * @param errorCode * The code associated with this error. * @return Returns a reference to this object so that method calls can be chained together. */ public ErrorDetail withErrorCode(String errorCode) { setErrorCode(errorCode); return this; }
public ErrorDetail unmarshall(JsonUnmarshallerContext context) throws Exception { ErrorDetail errorDetail = new ErrorDetail(); if (context.testExpression("ErrorCode", targetDepth)) { context.nextToken(); errorDetail.setErrorCode(context.getUnmarshaller(String.class).unmarshall(context)); errorDetail.setErrorMessage(context.getUnmarshaller(String.class).unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TableError == false) return false; TableError other = (TableError) obj; if (other.getTableName() == null ^ this.getTableName() == null) return false; if (other.getTableName() != null && other.getTableName().equals(this.getTableName()) == false) return false; if (other.getErrorDetail() == null ^ this.getErrorDetail() == null) return false; if (other.getErrorDetail() != null && other.getErrorDetail().equals(this.getErrorDetail()) == false) return false; return true; }
/** * <p> * A message describing the error. * </p> * * @param errorMessage * A message describing the error. * @return Returns a reference to this object so that method calls can be chained together. */ public ErrorDetail withErrorMessage(String errorMessage) { setErrorMessage(errorMessage); return this; }
public ErrorDetail unmarshall(JsonUnmarshallerContext context) throws Exception { ErrorDetail errorDetail = new ErrorDetail(); if (context.testExpression("ErrorCode", targetDepth)) { context.nextToken(); errorDetail.setErrorCode(context.getUnmarshaller(String.class).unmarshall(context)); errorDetail.setErrorMessage(context.getUnmarshaller(String.class).unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PartitionError == false) return false; PartitionError other = (PartitionError) obj; if (other.getPartitionValues() == null ^ this.getPartitionValues() == null) return false; if (other.getPartitionValues() != null && other.getPartitionValues().equals(this.getPartitionValues()) == false) return false; if (other.getErrorDetail() == null ^ this.getErrorDetail() == null) return false; if (other.getErrorDetail() != null && other.getErrorDetail().equals(this.getErrorDetail()) == false) return false; return true; }
/** * <p> * A message describing the error. * </p> * * @param errorMessage * A message describing the error. * @return Returns a reference to this object so that method calls can be chained together. */ public ErrorDetail withErrorMessage(String errorMessage) { setErrorMessage(errorMessage); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ErrorDetail == false) return false; ErrorDetail other = (ErrorDetail) obj; if (other.getErrorCode() == null ^ this.getErrorCode() == null) return false; if (other.getErrorCode() != null && other.getErrorCode().equals(this.getErrorCode()) == false) return false; if (other.getErrorMessage() == null ^ this.getErrorMessage() == null) return false; if (other.getErrorMessage() != null && other.getErrorMessage().equals(this.getErrorMessage()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPartitionValues() == null) ? 0 : getPartitionValues().hashCode()); hashCode = prime * hashCode + ((getErrorDetail() == null) ? 0 : getErrorDetail().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BatchStopJobRunError == false) return false; BatchStopJobRunError other = (BatchStopJobRunError) obj; if (other.getJobName() == null ^ this.getJobName() == null) return false; if (other.getJobName() != null && other.getJobName().equals(this.getJobName()) == false) return false; if (other.getJobRunId() == null ^ this.getJobRunId() == null) return false; if (other.getJobRunId() != null && other.getJobRunId().equals(this.getJobRunId()) == false) return false; if (other.getErrorDetail() == null ^ this.getErrorDetail() == null) return false; if (other.getErrorDetail() != null && other.getErrorDetail().equals(this.getErrorDetail()) == false) return false; return true; }
/** * <p> * The code associated with this error. * </p> * * @param errorCode * The code associated with this error. * @return Returns a reference to this object so that method calls can be chained together. */ public ErrorDetail withErrorCode(String errorCode) { setErrorCode(errorCode); return this; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getErrorCode() != null) sb.append("ErrorCode: ").append(getErrorCode()).append(","); if (getErrorMessage() != null) sb.append("ErrorMessage: ").append(getErrorMessage()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getVersionId() == null) ? 0 : getVersionId().hashCode()); hashCode = prime * hashCode + ((getErrorDetail() == null) ? 0 : getErrorDetail().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TableVersionError == false) return false; TableVersionError other = (TableVersionError) obj; if (other.getTableName() == null ^ this.getTableName() == null) return false; if (other.getTableName() != null && other.getTableName().equals(this.getTableName()) == false) return false; if (other.getVersionId() == null ^ this.getVersionId() == null) return false; if (other.getVersionId() != null && other.getVersionId().equals(this.getVersionId()) == false) return false; if (other.getErrorDetail() == null ^ this.getErrorDetail() == null) return false; if (other.getErrorDetail() != null && other.getErrorDetail().equals(this.getErrorDetail()) == false) return false; return true; }
private static void propagatePartitionErrorToPrestoException(String databaseName, String tableName, List<PartitionError> partitionErrors) { if (partitionErrors != null && !partitionErrors.isEmpty()) { ErrorDetail errorDetail = partitionErrors.get(0).getErrorDetail(); String glueExceptionCode = errorDetail.getErrorCode(); switch (glueExceptionCode) { case "AlreadyExistsException": throw new PrestoException(ALREADY_EXISTS, errorDetail.getErrorMessage()); case "EntityNotFoundException": throw new TableNotFoundException(new SchemaTableName(databaseName, tableName), errorDetail.getErrorMessage()); default: throw new PrestoException(HIVE_METASTORE_ERROR, errorDetail.getErrorCode() + ": " + errorDetail.getErrorMessage()); } } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobName() == null) ? 0 : getJobName().hashCode()); hashCode = prime * hashCode + ((getJobRunId() == null) ? 0 : getJobRunId().hashCode()); hashCode = prime * hashCode + ((getErrorDetail() == null) ? 0 : getErrorDetail().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PartitionError == false) return false; PartitionError other = (PartitionError) obj; if (other.getPartitionValues() == null ^ this.getPartitionValues() == null) return false; if (other.getPartitionValues() != null && other.getPartitionValues().equals(this.getPartitionValues()) == false) return false; if (other.getErrorDetail() == null ^ this.getErrorDetail() == null) return false; if (other.getErrorDetail() != null && other.getErrorDetail().equals(this.getErrorDetail()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(ErrorDetail errorDetail, ProtocolMarshaller protocolMarshaller) { if (errorDetail == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(errorDetail.getErrorCode(), ERRORCODE_BINDING); protocolMarshaller.marshall(errorDetail.getErrorMessage(), ERRORMESSAGE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }