Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ public class BadDataLocationException extends IOException {
private final List<DatanodeDetails> failedLocations = new ArrayList<>();
private int failedLocationIndex;

/**
* Required for Unwrapping {@code RemoteException}. Used by
* {@link org.apache.hadoop.ipc.RemoteException#unwrapRemoteException()}
*/
public BadDataLocationException(String message) {
super(message);
}

public BadDataLocationException(DatanodeDetails dn) {
super();
failedLocations.add(dn);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
*/
public class ContainerException extends SCMException {

/**
* Constructs a {@code ContainerException} with {@code null}
* as its result code. <p>
* Required for Unwrapping {@code RemoteException}. Used by
* {@link org.apache.hadoop.ipc.RemoteException#unwrapRemoteException()}
*/
public ContainerException(String message) {
super(message);
}

/**
* Constructs an {@code ContainerException} with {@code null}
* as its error detail message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@
public class SCMException extends IOException {
private final ResultCodes result;

/**
* Constructs an {@code SCMException} with {@code null}
* as its result code. <p>
* Required for Unwrapping {@code RemoteException}. Used by
* {@link org.apache.hadoop.ipc.RemoteException#unwrapRemoteException()}
*/
public SCMException(String message) {
super(message);
this.result = null;
}

/**
* Constructs an {@code IOException} with {@code null}
* as its error detail message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
*/
public class NonRetriableException extends IOException {

/**
* Constructs a {@code NonRetriableException} with the given detailed message. <p>
* Required for Unwrapping {@code RemoteException}. Used by
* {@link org.apache.hadoop.ipc.RemoteException#unwrapRemoteException()}
*/
public NonRetriableException(String message) {
super(message);
}

public NonRetriableException(IOException exception) {
super(exception);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ public final class InsufficientDatanodesException extends IOException {
private final int required;
private final int available;

/**
* Required for Unwrapping {@code RemoteException}. Used by
* {@link org.apache.hadoop.ipc.RemoteException#unwrapRemoteException()}
*/
public InsufficientDatanodesException(String message) {
super(message);
this.required = 0;
this.available = 0;
}

public InsufficientDatanodesException(int required, int available,
String message) {
super(message);
Expand Down