public void getFunctionMeta( com.google.protobuf.RpcController controller, org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionMetaRequest request, com.google.protobuf.RpcCallback<org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse> done) { channel.callMethod( getDescriptor().getMethods().get(43), controller, request, org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance(), com.google.protobuf.RpcUtil.generalizeCallback( done, org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.class, org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance())); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasState()) { hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + getState().hashCode(); } if (hasFunction()) { hash = (37 * hash) + FUNCTION_FIELD_NUMBER; hash = (53 * hash) + getFunction().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse buildPartial() { org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse result = new org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (stateBuilder_ == null) { result.state_ = state_; } else { result.state_ = stateBuilder_.build(); } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } if (functionBuilder_ == null) { result.function_ = function_; } else { result.function_ = functionBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
return org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.getDefaultInstance(); case 43: return org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance(); case 44: return org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState.getDefaultInstance();
return org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.getDefaultInstance(); case 41: return org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance(); case 42: return org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState.getDefaultInstance();
return org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.getDefaultInstance(); case 43: return org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance(); case 44: return org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState.getDefaultInstance();
return org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.getDefaultInstance(); case 41: return org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance(); case 42: return org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState.getDefaultInstance();
@Override public FunctionResponse getFunctionMeta(RpcController controller, GetFunctionMetaRequest request) { FunctionDescProto function = null; try { if (request.hasFunctionType()) { if (containFunction(request.getSignature(), request.getFunctionType(), request.getParameterTypesList())) { function = findFunction(request.getSignature(), request.getFunctionType(), request.getParameterTypesList(), true); } } else { function = findFunction(request.getSignature(), request.getParameterTypesList()); } if (function != null) { return FunctionResponse.newBuilder() .setState(OK) .setFunction(function) .build(); } else { return FunctionResponse.newBuilder() .setState(errUndefinedFunction( buildSimpleFunctionSignature(request.getSignature(), request.getParameterTypesList()))) .build(); } } catch (Throwable t) { printStackTraceIfError(LOG, t); return FunctionResponse.newBuilder() .setState(returnError(t)) .build(); } }
@Override public FunctionResponse getFunctionMeta(RpcController controller, GetFunctionMetaRequest request) { FunctionDescProto function = null; try { if (request.hasFunctionType()) { if (containFunction(request.getSignature(), request.getFunctionType(), request.getParameterTypesList())) { function = findFunction(request.getSignature(), request.getFunctionType(), request.getParameterTypesList(), true); } } else { function = findFunction(request.getSignature(), request.getParameterTypesList()); } if (function != null) { return FunctionResponse.newBuilder() .setState(OK) .setFunction(function) .build(); } else { return FunctionResponse.newBuilder() .setState(errUndefinedFunction( buildSimpleFunctionSignature(request.getSignature(), request.getParameterTypesList()))) .build(); } } catch (Throwable t) { printStackTraceIfError(LOG, t); return FunctionResponse.newBuilder() .setState(returnError(t)) .build(); } }
@Override public final FunctionDesc getFunction(final String signature, FunctionType funcType, DataType... paramTypes) throws AmbiguousFunctionException, UndefinedFunctionException { final GetFunctionMetaRequest.Builder builder = GetFunctionMetaRequest.newBuilder(); builder.setSignature(signature); if (funcType != null) { builder.setFunctionType(funcType); } for (DataType type : paramTypes) { builder.addParameterTypes(type); } try { final BlockingInterface stub = getStub(); final FunctionResponse response = stub.getFunctionMeta(null, builder.build()); throwsIfThisError(response.getState(), UndefinedFunctionException.class); ensureOk(response.getState()); return new FunctionDesc(response.getFunction()); } catch (ServiceException se) { throw new RuntimeException(se); } catch (ClassNotFoundException e) { throw new TajoInternalError(e); } }
@Override public final FunctionDesc getFunction(final String signature, FunctionType funcType, DataType... paramTypes) throws AmbiguousFunctionException, UndefinedFunctionException { final GetFunctionMetaRequest.Builder builder = GetFunctionMetaRequest.newBuilder(); builder.setSignature(signature); if (funcType != null) { builder.setFunctionType(funcType); } for (DataType type : paramTypes) { builder.addParameterTypes(type); } try { final BlockingInterface stub = getStub(); final FunctionResponse response = stub.getFunctionMeta(null, builder.build()); throwsIfThisError(response.getState(), UndefinedFunctionException.class); ensureOk(response.getState()); return new FunctionDesc(response.getFunction()); } catch (ServiceException se) { throw new RuntimeException(se); } catch (ClassNotFoundException e) { throw new TajoInternalError(e); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse)) { return super.equals(obj); } org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse other = (org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse) obj; boolean result = true; result = result && (hasState() == other.hasState()); if (hasState()) { result = result && getState() .equals(other.getState()); } result = result && (hasFunction() == other.hasFunction()); if (hasFunction()) { result = result && getFunction() .equals(other.getFunction()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasState()) { memoizedIsInitialized = 0; return false; } if (!getState().isInitialized()) { memoizedIsInitialized = 0; return false; } if (hasFunction()) { if (!getFunction().isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, state_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, function_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse prototype) {
public org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse getDefaultInstanceForType() { return org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance(); }
public void getFunctions( com.google.protobuf.RpcController controller, org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.NullProto request, com.google.protobuf.RpcCallback<org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse> done) { channel.callMethod( getDescriptor().getMethods().get(40), controller, request, org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.getDefaultInstance(), com.google.protobuf.RpcUtil.generalizeCallback( done, org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.class, org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.getDefaultInstance())); }
public void getFunctionMeta( com.google.protobuf.RpcController controller, org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionMetaRequest request, com.google.protobuf.RpcCallback<org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse> done) { channel.callMethod( getDescriptor().getMethods().get(41), controller, request, org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance(), com.google.protobuf.RpcUtil.generalizeCallback( done, org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.class, org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance())); }
public static Builder newBuilder(org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }