Example #1
0
        public void heartbeat_Process(int seqid, TProtocol iprot, TProtocol oprot)
        {
            heartbeat_args args = new heartbeat_args();

            args.Read(iprot);
            iprot.ReadMessageEnd();
            heartbeat_result result = new heartbeat_result();

            try {
                result.Success = iface_.heartbeat(args.WorkerId, args.PersistedFiles);
            } catch (AlluxioTException e) {
                result.E = e;
            }
            oprot.WriteMessageBegin(new TMessage("heartbeat", TMessageType.Reply, seqid));
            result.Write(oprot);
            oprot.WriteMessageEnd();
            oprot.Transport.Flush();
        }
Example #2
0
        public FileSystemCommand recv_heartbeat()
        {
            TMessage msg = iprot_.ReadMessageBegin();

            if (msg.Type == TMessageType.Exception)
            {
                TApplicationException x = TApplicationException.Read(iprot_);
                iprot_.ReadMessageEnd();
                throw x;
            }
            heartbeat_result result = new heartbeat_result();

            result.Read(iprot_);
            iprot_.ReadMessageEnd();
            if (result.__isset.success)
            {
                return(result.Success);
            }
            if (result.__isset.e)
            {
                throw result.E;
            }
            throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "heartbeat failed: unknown result");
        }