/** * <code>optional .exec.shared.DrillPBError error = 3;</code> */ public Builder setError( org.apache.drill.exec.proto.UserBitShared.DrillPBError.Builder builderForValue) { if (errorBuilder_ == null) { error_ = builderForValue.build(); onChanged(); } else { errorBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /**
bitField0_ |= 0x00000001; errorId_ = other.errorId_; onChanged(); mergeEndpoint(other.getEndpoint()); setErrorType(other.getErrorType()); onChanged(); mergeException(other.getException()); bitField0_ = (bitField0_ & ~0x00000020); } else { ensureParsingErrorIsMutable(); parsingError_.addAll(other.parsingError_); onChanged(); parsingErrorBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getParsingErrorFieldBuilder() : null; } else { parsingErrorBuilder_.addAllMessages(other.parsingError_); this.mergeUnknownFields(other.getUnknownFields()); return this;
subBuilder.mergeFrom(error_); error_ = subBuilder.buildPartial();
subBuilder.mergeFrom(error_); error_ = subBuilder.buildPartial();
subBuilder.mergeFrom(error_); error_ = subBuilder.buildPartial();
subBuilder.mergeFrom(error_); error_ = subBuilder.buildPartial();
subBuilder.mergeFrom(error_); error_ = subBuilder.buildPartial();
subBuilder.mergeFrom(error_); error_ = subBuilder.buildPartial();
subBuilder.mergeFrom(error_); error_ = subBuilder.buildPartial();
subBuilder.mergeFrom(error_); error_ = subBuilder.buildPartial();
subBuilder.mergeFrom(error_); error_ = subBuilder.buildPartial();
bitField0_ |= 0x00000001; errorId_ = other.errorId_; onChanged(); mergeEndpoint(other.getEndpoint()); setErrorType(other.getErrorType()); onChanged(); mergeException(other.getException()); bitField0_ = (bitField0_ & ~0x00000020); } else { ensureParsingErrorIsMutable(); parsingError_.addAll(other.parsingError_); onChanged(); parsingErrorBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getParsingErrorFieldBuilder() : null; } else { parsingErrorBuilder_.addAllMessages(other.parsingError_); this.mergeUnknownFields(other.getUnknownFields()); return this;
final String errorMessage = String.format("Failed to produce PlanFragments for query id \"%s\" with " + "request to %s plan", queryId, (req.getSplitPlan() ? "split" : "no split")); DrillPBError error = DrillPBError.newBuilder().setMessage(errorMessage).setErrorType(DrillPBError.ErrorType.PLAN).build();
return; case 1: builder.setErrorId(input.readString()); break; case 2: builder.setEndpoint(input.mergeObject(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder(), org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.MERGE)); builder.setErrorType(org.apache.drill.exec.proto.UserBitShared.DrillPBError.ErrorType.valueOf(input.readEnum())); break; case 4: builder.setMessage(input.readString()); break; case 5: builder.setException(input.mergeObject(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.newBuilder(), org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.MERGE)); builder.addParsingError(input.mergeObject(org.apache.drill.exec.proto.UserBitShared.ParsingError.newBuilder(), org.apache.drill.exec.proto.SchemaUserBitShared.ParsingError.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(); }
/** * <code>optional .exec.shared.DrillPBError error = 3;</code> */ public Builder mergeError(org.apache.drill.exec.proto.UserBitShared.DrillPBError value) { if (errorBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && error_ != org.apache.drill.exec.proto.UserBitShared.DrillPBError.getDefaultInstance()) { error_ = org.apache.drill.exec.proto.UserBitShared.DrillPBError.newBuilder(error_).mergeFrom(value).buildPartial(); } else { error_ = value; } onChanged(); } else { errorBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>optional .exec.shared.DrillPBError error = 3;</code> */ public Builder mergeError(org.apache.drill.exec.proto.UserBitShared.DrillPBError value) { if (errorBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && error_ != org.apache.drill.exec.proto.UserBitShared.DrillPBError.getDefaultInstance()) { error_ = org.apache.drill.exec.proto.UserBitShared.DrillPBError.newBuilder(error_).mergeFrom(value).buildPartial(); } else { error_ = value; } onChanged(); } else { errorBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>optional .exec.shared.DrillPBError error = 3;</code> */ public Builder mergeError(org.apache.drill.exec.proto.UserBitShared.DrillPBError value) { if (errorBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && error_ != org.apache.drill.exec.proto.UserBitShared.DrillPBError.getDefaultInstance()) { error_ = org.apache.drill.exec.proto.UserBitShared.DrillPBError.newBuilder(error_).mergeFrom(value).buildPartial(); } else { error_ = value; } onChanged(); } else { errorBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>optional .exec.shared.DrillPBError error = 3;</code> */ public Builder mergeError(org.apache.drill.exec.proto.UserBitShared.DrillPBError value) { if (errorBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && error_ != org.apache.drill.exec.proto.UserBitShared.DrillPBError.getDefaultInstance()) { error_ = org.apache.drill.exec.proto.UserBitShared.DrillPBError.newBuilder(error_).mergeFrom(value).buildPartial(); } else { error_ = value; } onChanged(); } else { errorBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>optional .exec.shared.DrillPBError error = 2;</code> */ public Builder mergeError(org.apache.drill.exec.proto.UserBitShared.DrillPBError value) { if (errorBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && error_ != org.apache.drill.exec.proto.UserBitShared.DrillPBError.getDefaultInstance()) { error_ = org.apache.drill.exec.proto.UserBitShared.DrillPBError.newBuilder(error_).mergeFrom(value).buildPartial(); } else { error_ = value; } onChanged(); } else { errorBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**