All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.hadoop.yarn.proto.ContainerManagementProtocol Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: containermanagement_protocol.proto

package org.apache.hadoop.yarn.proto;

public final class ContainerManagementProtocol {
  private ContainerManagementProtocol() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  /**
   * Protobuf service {@code hadoop.yarn.ContainerManagementProtocolService}
   */
  public static abstract class ContainerManagementProtocolService
      implements com.google.protobuf.Service {
    protected ContainerManagementProtocolService() {}

    public interface Interface {
      /**
       * rpc startContainers(.hadoop.yarn.StartContainersRequestProto) returns (.hadoop.yarn.StartContainersResponseProto);
       */
      public abstract void startContainers(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersRequestProto request,
          com.google.protobuf.RpcCallback done);

      /**
       * rpc stopContainers(.hadoop.yarn.StopContainersRequestProto) returns (.hadoop.yarn.StopContainersResponseProto);
       */
      public abstract void stopContainers(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersRequestProto request,
          com.google.protobuf.RpcCallback done);

      /**
       * rpc getContainerStatuses(.hadoop.yarn.GetContainerStatusesRequestProto) returns (.hadoop.yarn.GetContainerStatusesResponseProto);
       */
      public abstract void getContainerStatuses(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesRequestProto request,
          com.google.protobuf.RpcCallback done);

    }

    public static com.google.protobuf.Service newReflectiveService(
        final Interface impl) {
      return new ContainerManagementProtocolService() {
        @java.lang.Override
        public  void startContainers(
            com.google.protobuf.RpcController controller,
            org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersRequestProto request,
            com.google.protobuf.RpcCallback done) {
          impl.startContainers(controller, request, done);
        }

        @java.lang.Override
        public  void stopContainers(
            com.google.protobuf.RpcController controller,
            org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersRequestProto request,
            com.google.protobuf.RpcCallback done) {
          impl.stopContainers(controller, request, done);
        }

        @java.lang.Override
        public  void getContainerStatuses(
            com.google.protobuf.RpcController controller,
            org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesRequestProto request,
            com.google.protobuf.RpcCallback done) {
          impl.getContainerStatuses(controller, request, done);
        }

      };
    }

    public static com.google.protobuf.BlockingService
        newReflectiveBlockingService(final BlockingInterface impl) {
      return new com.google.protobuf.BlockingService() {
        public final com.google.protobuf.Descriptors.ServiceDescriptor
            getDescriptorForType() {
          return getDescriptor();
        }

        public final com.google.protobuf.Message callBlockingMethod(
            com.google.protobuf.Descriptors.MethodDescriptor method,
            com.google.protobuf.RpcController controller,
            com.google.protobuf.Message request)
            throws com.google.protobuf.ServiceException {
          if (method.getService() != getDescriptor()) {
            throw new java.lang.IllegalArgumentException(
              "Service.callBlockingMethod() given method descriptor for " +
              "wrong service type.");
          }
          switch(method.getIndex()) {
            case 0:
              return impl.startContainers(controller, (org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersRequestProto)request);
            case 1:
              return impl.stopContainers(controller, (org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersRequestProto)request);
            case 2:
              return impl.getContainerStatuses(controller, (org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesRequestProto)request);
            default:
              throw new java.lang.AssertionError("Can't get here.");
          }
        }

        public final com.google.protobuf.Message
            getRequestPrototype(
            com.google.protobuf.Descriptors.MethodDescriptor method) {
          if (method.getService() != getDescriptor()) {
            throw new java.lang.IllegalArgumentException(
              "Service.getRequestPrototype() given method " +
              "descriptor for wrong service type.");
          }
          switch(method.getIndex()) {
            case 0:
              return org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersRequestProto.getDefaultInstance();
            case 1:
              return org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersRequestProto.getDefaultInstance();
            case 2:
              return org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesRequestProto.getDefaultInstance();
            default:
              throw new java.lang.AssertionError("Can't get here.");
          }
        }

        public final com.google.protobuf.Message
            getResponsePrototype(
            com.google.protobuf.Descriptors.MethodDescriptor method) {
          if (method.getService() != getDescriptor()) {
            throw new java.lang.IllegalArgumentException(
              "Service.getResponsePrototype() given method " +
              "descriptor for wrong service type.");
          }
          switch(method.getIndex()) {
            case 0:
              return org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProto.getDefaultInstance();
            case 1:
              return org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersResponseProto.getDefaultInstance();
            case 2:
              return org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesResponseProto.getDefaultInstance();
            default:
              throw new java.lang.AssertionError("Can't get here.");
          }
        }

      };
    }

    /**
     * rpc startContainers(.hadoop.yarn.StartContainersRequestProto) returns (.hadoop.yarn.StartContainersResponseProto);
     */
    public abstract void startContainers(
        com.google.protobuf.RpcController controller,
        org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersRequestProto request,
        com.google.protobuf.RpcCallback done);

    /**
     * rpc stopContainers(.hadoop.yarn.StopContainersRequestProto) returns (.hadoop.yarn.StopContainersResponseProto);
     */
    public abstract void stopContainers(
        com.google.protobuf.RpcController controller,
        org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersRequestProto request,
        com.google.protobuf.RpcCallback done);

    /**
     * rpc getContainerStatuses(.hadoop.yarn.GetContainerStatusesRequestProto) returns (.hadoop.yarn.GetContainerStatusesResponseProto);
     */
    public abstract void getContainerStatuses(
        com.google.protobuf.RpcController controller,
        org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesRequestProto request,
        com.google.protobuf.RpcCallback done);

    public static final
        com.google.protobuf.Descriptors.ServiceDescriptor
        getDescriptor() {
      return org.apache.hadoop.yarn.proto.ContainerManagementProtocol.getDescriptor().getServices().get(0);
    }
    public final com.google.protobuf.Descriptors.ServiceDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }

    public final void callMethod(
        com.google.protobuf.Descriptors.MethodDescriptor method,
        com.google.protobuf.RpcController controller,
        com.google.protobuf.Message request,
        com.google.protobuf.RpcCallback<
          com.google.protobuf.Message> done) {
      if (method.getService() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "Service.callMethod() given method descriptor for wrong " +
          "service type.");
      }
      switch(method.getIndex()) {
        case 0:
          this.startContainers(controller, (org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersRequestProto)request,
            com.google.protobuf.RpcUtil.specializeCallback(
              done));
          return;
        case 1:
          this.stopContainers(controller, (org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersRequestProto)request,
            com.google.protobuf.RpcUtil.specializeCallback(
              done));
          return;
        case 2:
          this.getContainerStatuses(controller, (org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesRequestProto)request,
            com.google.protobuf.RpcUtil.specializeCallback(
              done));
          return;
        default:
          throw new java.lang.AssertionError("Can't get here.");
      }
    }

    public final com.google.protobuf.Message
        getRequestPrototype(
        com.google.protobuf.Descriptors.MethodDescriptor method) {
      if (method.getService() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "Service.getRequestPrototype() given method " +
          "descriptor for wrong service type.");
      }
      switch(method.getIndex()) {
        case 0:
          return org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersRequestProto.getDefaultInstance();
        case 1:
          return org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersRequestProto.getDefaultInstance();
        case 2:
          return org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesRequestProto.getDefaultInstance();
        default:
          throw new java.lang.AssertionError("Can't get here.");
      }
    }

    public final com.google.protobuf.Message
        getResponsePrototype(
        com.google.protobuf.Descriptors.MethodDescriptor method) {
      if (method.getService() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "Service.getResponsePrototype() given method " +
          "descriptor for wrong service type.");
      }
      switch(method.getIndex()) {
        case 0:
          return org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProto.getDefaultInstance();
        case 1:
          return org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersResponseProto.getDefaultInstance();
        case 2:
          return org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesResponseProto.getDefaultInstance();
        default:
          throw new java.lang.AssertionError("Can't get here.");
      }
    }

    public static Stub newStub(
        com.google.protobuf.RpcChannel channel) {
      return new Stub(channel);
    }

    public static final class Stub extends org.apache.hadoop.yarn.proto.ContainerManagementProtocol.ContainerManagementProtocolService implements Interface {
      private Stub(com.google.protobuf.RpcChannel channel) {
        this.channel = channel;
      }

      private final com.google.protobuf.RpcChannel channel;

      public com.google.protobuf.RpcChannel getChannel() {
        return channel;
      }

      public  void startContainers(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersRequestProto request,
          com.google.protobuf.RpcCallback done) {
        channel.callMethod(
          getDescriptor().getMethods().get(0),
          controller,
          request,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProto.getDefaultInstance(),
          com.google.protobuf.RpcUtil.generalizeCallback(
            done,
            org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProto.class,
            org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProto.getDefaultInstance()));
      }

      public  void stopContainers(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersRequestProto request,
          com.google.protobuf.RpcCallback done) {
        channel.callMethod(
          getDescriptor().getMethods().get(1),
          controller,
          request,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersResponseProto.getDefaultInstance(),
          com.google.protobuf.RpcUtil.generalizeCallback(
            done,
            org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersResponseProto.class,
            org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersResponseProto.getDefaultInstance()));
      }

      public  void getContainerStatuses(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesRequestProto request,
          com.google.protobuf.RpcCallback done) {
        channel.callMethod(
          getDescriptor().getMethods().get(2),
          controller,
          request,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesResponseProto.getDefaultInstance(),
          com.google.protobuf.RpcUtil.generalizeCallback(
            done,
            org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesResponseProto.class,
            org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesResponseProto.getDefaultInstance()));
      }
    }

    public static BlockingInterface newBlockingStub(
        com.google.protobuf.BlockingRpcChannel channel) {
      return new BlockingStub(channel);
    }

    public interface BlockingInterface {
      public org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProto startContainers(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersRequestProto request)
          throws com.google.protobuf.ServiceException;

      public org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersResponseProto stopContainers(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersRequestProto request)
          throws com.google.protobuf.ServiceException;

      public org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesResponseProto getContainerStatuses(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesRequestProto request)
          throws com.google.protobuf.ServiceException;
    }

    private static final class BlockingStub implements BlockingInterface {
      private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) {
        this.channel = channel;
      }

      private final com.google.protobuf.BlockingRpcChannel channel;

      public org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProto startContainers(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersRequestProto request)
          throws com.google.protobuf.ServiceException {
        return (org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProto) channel.callBlockingMethod(
          getDescriptor().getMethods().get(0),
          controller,
          request,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProto.getDefaultInstance());
      }


      public org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersResponseProto stopContainers(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersRequestProto request)
          throws com.google.protobuf.ServiceException {
        return (org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersResponseProto) channel.callBlockingMethod(
          getDescriptor().getMethods().get(1),
          controller,
          request,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersResponseProto.getDefaultInstance());
      }


      public org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesResponseProto getContainerStatuses(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesRequestProto request)
          throws com.google.protobuf.ServiceException {
        return (org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesResponseProto) channel.callBlockingMethod(
          getDescriptor().getMethods().get(2),
          controller,
          request,
          org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesResponseProto.getDefaultInstance());
      }

    }

    // @@protoc_insertion_point(class_scope:hadoop.yarn.ContainerManagementProtocolService)
  }


  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\"containermanagement_protocol.proto\022\013ha" +
      "doop.yarn\032\031yarn_service_protos.proto2\350\002\n" +
      "\"ContainerManagementProtocolService\022f\n\017s" +
      "tartContainers\022(.hadoop.yarn.StartContai" +
      "nersRequestProto\032).hadoop.yarn.StartCont" +
      "ainersResponseProto\022c\n\016stopContainers\022\'." +
      "hadoop.yarn.StopContainersRequestProto\032(" +
      ".hadoop.yarn.StopContainersResponseProto" +
      "\022u\n\024getContainerStatuses\022-.hadoop.yarn.G" +
      "etContainerStatusesRequestProto\032..hadoop",
      ".yarn.GetContainerStatusesResponseProtoB" +
      "A\n\034org.apache.hadoop.yarn.protoB\033Contain" +
      "erManagementProtocol\210\001\001\240\001\001"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
        public com.google.protobuf.ExtensionRegistry assignDescriptors(
            com.google.protobuf.Descriptors.FileDescriptor root) {
          descriptor = root;
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          org.apache.hadoop.yarn.proto.YarnServiceProtos.getDescriptor(),
        }, assigner);
  }

  // @@protoc_insertion_point(outer_class_scope)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy