break; case 2: builder.setEndpoint(input.mergeObject(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder(), org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.MERGE));
/** * returns or creates a DrillPBError object corresponding to this user exception. * * @param verbose should the error object contain the verbose error message ? * @return protobuf error object */ public DrillPBError getOrCreatePBError(final boolean verbose) { final String message = verbose ? getVerboseMessage() : getMessage(); final DrillPBError.Builder builder = DrillPBError.newBuilder(); builder.setErrorType(errorType); builder.setErrorId(context.getErrorId()); if (context.getEndpoint() != null) { builder.setEndpoint(context.getEndpoint()); } builder.setMessage(message); if (getCause() != null) { // some unit tests use this information to make sure a specific exception was thrown in the server builder.setException(ErrorHelper.getWrapper(getCause())); } else { // not a wrapper exception builder.setException(ErrorHelper.getWrapper(this)); } return builder.build(); }
break; case 2: builder.setEndpoint(input.mergeObject(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder(), org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.MERGE));
/** * returns or creates a DrillPBError object corresponding to this user exception. * * @param verbose should the error object contain the verbose error message ? * @return protobuf error object */ public DrillPBError getOrCreatePBError(final boolean verbose) { final String message = verbose ? getVerboseMessage() : getMessage(); final DrillPBError.Builder builder = DrillPBError.newBuilder(); builder.setErrorType(errorType); builder.setErrorId(context.getErrorId()); if (context.getEndpoint() != null) { builder.setEndpoint(context.getEndpoint()); } builder.setMessage(message); if (getCause() != null) { // some unit tests use this information to make sure a specific exception was thrown in the server builder.setException(ErrorHelper.getWrapper(getCause())); } else { // not a wrapper exception builder.setException(ErrorHelper.getWrapper(this)); } return builder.build(); }