Skip to content
Closed
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 @@ -45,7 +45,6 @@
import org.apache.hadoop.ozone.security.acl.IAccessAuthorizer;
import org.apache.hadoop.ozone.security.acl.OzoneObj;
import org.apache.hadoop.security.UserGroupInformation;

import javax.annotation.Nonnull;

/**
Expand Down Expand Up @@ -181,7 +180,8 @@ protected OMResponse createErrorOMResponse(

omResponse.setSuccess(false);
if (ex.getMessage() != null) {
omResponse.setMessage(ex.getMessage());
omResponse.setMessage(org.apache.hadoop.util.StringUtils
.stringifyException(ex));
}
omResponse.setStatus(OzoneManagerRatisUtils.exceptionToResponseStatus(ex));
return omResponse.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected List< OmKeyLocationInfo > allocateBlock(ScmClient scmClient,
throw new OMException(ex.getMessage(),
OMException.ResultCodes.SCM_IN_SAFE_MODE);
}
throw ex;
throw new IOException(ex.getMessage(), ex);
}
for (AllocatedBlock allocatedBlock : allocatedBlocks) {
OmKeyLocationInfo.Builder builder = new OmKeyLocationInfo.Builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import com.google.protobuf.RpcController;
import com.google.protobuf.ServiceException;
import io.opentracing.Scope;
import org.apache.hadoop.util.StringUtils;
import org.apache.ratis.protocol.RaftPeerId;
import org.apache.ratis.util.ExitUtils;
import org.slf4j.Logger;
Expand Down Expand Up @@ -177,7 +178,7 @@ private OMResponse createErrorResponse(
.setCmdType(cmdType)
.setSuccess(false);
if (exception.getMessage() != null) {
omResponse.setMessage(exception.getMessage());
omResponse.setMessage(StringUtils.stringifyException(exception));
}
return omResponse.build();
}
Expand Down