Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 67 lines (56 sloc) 2.726 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
// Code generated by protoc-gen-go.
// source: containermanagement_protocol.proto
// DO NOT EDIT!

package hadoop_yarn

import proto "code.google.com/p/goprotobuf/proto"
import json "encoding/json"
import math "math"

import (
  "net"
  "strconv"
  "github.com/hortonworks/gohadoop"
  hadoop_ipc_client "github.com/hortonworks/gohadoop/hadoop_common/ipc/client"
  "github.com/nu7hatch/gouuid"
)

// Reference proto, json, and math imports to suppress error if they are not otherwise used.
var _ = proto.Marshal
var _ = &json.SyntaxError{}
var _ = math.Inf

var protocolName = "org.apache.hadoop.yarn.api.ContainerManagementProtocolPB"

func init() {
}

type ContainerManagementProtocolService interface {
StartContainers(in *StartContainersRequestProto, out *StartContainersResponseProto) error
StopContainers(in *StopContainersRequestProto, out *StopContainersResponseProto) error
GetContainerStatuses(in *GetContainerStatusesRequestProto, out *GetContainerStatusesResponseProto) error
}

type ContainerManagementProtocolServiceClient struct {
*hadoop_ipc_client.Client
}

func (c *ContainerManagementProtocolServiceClient) StartContainers(in *StartContainersRequestProto, out *StartContainersResponseProto) error {
return c.Call(gohadoop.GetCalleeRPCRequestHeaderProto(&protocolName), in, out)
}
func (c *ContainerManagementProtocolServiceClient) StopContainers(in *StopContainersRequestProto, out *StopContainersResponseProto) error {
return c.Call(gohadoop.GetCalleeRPCRequestHeaderProto(&protocolName), in, out)
}
func (c *ContainerManagementProtocolServiceClient) GetContainerStatuses(in *GetContainerStatusesRequestProto, out *GetContainerStatusesResponseProto) error {
return c.Call(gohadoop.GetCalleeRPCRequestHeaderProto(&protocolName), in, out)
}

// DialContainerManagementProtocolService connects to an ContainerManagementProtocolService at the specified network address.
func DialContainerManagementProtocolService(host string, port int) (ContainerManagementProtocolService, error) {
  clientId, _ := uuid.NewV4()
  ugi, _ := gohadoop.CreateSimpleUGIProto()
  c := &hadoop_ipc_client.Client{ClientId: clientId, Ugi: ugi, ServerAddress: net.JoinHostPort(host, strconv.Itoa(port))}
return &ContainerManagementProtocolServiceClient{c}, nil
}

/*
// DialContainerManagementProtocolServiceTimeout connects to an ContainerManagementProtocolService at the specified network address.
func DialContainerManagementProtocolServiceTimeout(network, addr string,
timeout time.Duration) (*ContainerManagementProtocolServiceClient, *rpc.Client, error) {
c, err := protorpc.DialTimeout(network, addr, timeout)
if err != nil {
return nil, nil, err
}
return &ContainerManagementProtocolServiceClient{c}, c, nil
}
*/
Something went wrong with that request. Please try again.