public Builder mergeFrom(org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse other) { if (other == org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.getDefaultInstance()) return this; if (other.hasState()) { mergeState(other.getState()); this.mergeUnknownFields(other.getUnknownFields()); return this;
@Override public final Collection<FunctionDesc> getFunctions() { List<FunctionDesc> list = new ArrayList<>(); try { final BlockingInterface stub = getStub(); final GetFunctionsResponse response = stub.getFunctions(null, NullProto.newBuilder().build()); ensureOk(response.getState()); for (int i = 0; i < response.getFunctionDescCount(); i++) { try { list.add(new FunctionDesc(response.getFunctionDesc(i))); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } return list; } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public GetFunctionsResponse getFunctions(RpcController controller, NullProto request) throws ServiceException { Iterator<List<FunctionDescProto>> iterator = functions.values().iterator(); GetFunctionsResponse.Builder builder = GetFunctionsResponse.newBuilder(); builder.setState(OK); while (iterator.hasNext()) { builder.addAllFunctionDesc(iterator.next()); } return builder.build(); }
return org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState.getDefaultInstance(); case 42: return org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.getDefaultInstance(); case 43: return org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance();
return org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState.getDefaultInstance(); case 42: return org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.getDefaultInstance(); case 43: return org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance();
return org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState.getDefaultInstance(); case 40: return org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.getDefaultInstance(); case 41: return org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance();
return org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState.getDefaultInstance(); case 40: return org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.getDefaultInstance(); case 41: return org.apache.tajo.catalog.proto.CatalogProtos.FunctionResponse.getDefaultInstance();
public org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse buildPartial() { org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse result = new org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse(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 (functionDescBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { functionDesc_ = java.util.Collections.unmodifiableList(functionDesc_); bitField0_ = (bitField0_ & ~0x00000002); } result.functionDesc_ = functionDesc_; } else { result.functionDesc_ = functionDescBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@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.GetFunctionsResponse)) { return super.equals(obj); } org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse other = (org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse) obj; boolean result = true; result = result && (hasState() == other.hasState()); if (hasState()) { result = result && getState() .equals(other.getState()); } result = result && getFunctionDescList() .equals(other.getFunctionDescList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
@Override public final Collection<FunctionDesc> getFunctions() { List<FunctionDesc> list = new ArrayList<FunctionDesc>(); try { final BlockingInterface stub = getStub(); final GetFunctionsResponse response = stub.getFunctions(null, NullProto.newBuilder().build()); ensureOk(response.getState()); for (int i = 0; i < response.getFunctionDescCount(); i++) { try { list.add(new FunctionDesc(response.getFunctionDesc(i))); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } return list; } catch (ServiceException e) { throw new RuntimeException(e); } }
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; } for (int i = 0; i < getFunctionDescCount(); i++) { if (!getFunctionDesc(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; }
@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 (getFunctionDescCount() > 0) { hash = (37 * hash) + FUNCTIONDESC_FIELD_NUMBER; hash = (53 * hash) + getFunctionDescList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse prototype) {
public Builder toBuilder() { return newBuilder(this); }
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_); } for (int i = 0; i < functionDesc_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, functionDesc_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
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(42), 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 dropFunction( com.google.protobuf.RpcController controller, org.apache.tajo.catalog.proto.CatalogProtos.UnregisterFunctionRequest request, com.google.protobuf.RpcCallback<org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState> done) { channel.callMethod( getDescriptor().getMethods().get(39), controller, request, org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState.getDefaultInstance(), com.google.protobuf.RpcUtil.generalizeCallback( done, org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState.class, org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState.getDefaultInstance())); }
public org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse getDefaultInstanceForType() { return org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse.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 static Builder newBuilder(org.apache.tajo.catalog.proto.CatalogProtos.GetFunctionsResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }