コード例 #1
0
ファイル: Query.cs プロジェクト: ahweb/CS4Hadoop
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder("Query(");

            sb.Append("QueryId: ");
            sb.Append(QueryId);
            sb.Append(",QueryType: ");
            sb.Append(QueryType);
            sb.Append(",QueryAttributes: ");
            sb.Append(QueryAttributes);
            sb.Append(",QueryCounters: ");
            sb.Append(QueryCounters);
            sb.Append(",StageGraph: ");
            sb.Append(StageGraph == null ? "<null>" : StageGraph.ToString());
            sb.Append(",StageList: ");
            sb.Append(StageList);
            sb.Append(",Done: ");
            sb.Append(Done);
            sb.Append(",Started: ");
            sb.Append(Started);
            sb.Append(")");
            return(sb.ToString());
        }
コード例 #2
0
ファイル: Query.cs プロジェクト: ahweb/CS4Hadoop
        public void Write(TProtocol oprot)
        {
            TStruct struc = new TStruct("Query");

            oprot.WriteStructBegin(struc);
            TField field = new TField();

            if (QueryId != null && __isset.queryId)
            {
                field.Name = "queryId";
                field.Type = TType.String;
                field.ID   = 1;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(QueryId);
                oprot.WriteFieldEnd();
            }
            if (QueryType != null && __isset.queryType)
            {
                field.Name = "queryType";
                field.Type = TType.String;
                field.ID   = 2;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(QueryType);
                oprot.WriteFieldEnd();
            }
            if (QueryAttributes != null && __isset.queryAttributes)
            {
                field.Name = "queryAttributes";
                field.Type = TType.Map;
                field.ID   = 3;
                oprot.WriteFieldBegin(field);
                {
                    oprot.WriteMapBegin(new TMap(TType.String, TType.String, QueryAttributes.Count));
                    foreach (string _iter61 in QueryAttributes.Keys)
                    {
                        oprot.WriteString(_iter61);
                        oprot.WriteString(QueryAttributes[_iter61]);
                    }
                    oprot.WriteMapEnd();
                }
                oprot.WriteFieldEnd();
            }
            if (QueryCounters != null && __isset.queryCounters)
            {
                field.Name = "queryCounters";
                field.Type = TType.Map;
                field.ID   = 4;
                oprot.WriteFieldBegin(field);
                {
                    oprot.WriteMapBegin(new TMap(TType.String, TType.I64, QueryCounters.Count));
                    foreach (string _iter62 in QueryCounters.Keys)
                    {
                        oprot.WriteString(_iter62);
                        oprot.WriteI64(QueryCounters[_iter62]);
                    }
                    oprot.WriteMapEnd();
                }
                oprot.WriteFieldEnd();
            }
            if (StageGraph != null && __isset.stageGraph)
            {
                field.Name = "stageGraph";
                field.Type = TType.Struct;
                field.ID   = 5;
                oprot.WriteFieldBegin(field);
                StageGraph.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (StageList != null && __isset.stageList)
            {
                field.Name = "stageList";
                field.Type = TType.List;
                field.ID   = 6;
                oprot.WriteFieldBegin(field);
                {
                    oprot.WriteListBegin(new TList(TType.Struct, StageList.Count));
                    foreach (Stage _iter63 in StageList)
                    {
                        _iter63.Write(oprot);
                    }
                    oprot.WriteListEnd();
                }
                oprot.WriteFieldEnd();
            }
            if (__isset.done)
            {
                field.Name = "done";
                field.Type = TType.Bool;
                field.ID   = 7;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(Done);
                oprot.WriteFieldEnd();
            }
            if (__isset.started)
            {
                field.Name = "started";
                field.Type = TType.Bool;
                field.ID   = 8;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(Started);
                oprot.WriteFieldEnd();
            }
            oprot.WriteFieldStop();
            oprot.WriteStructEnd();
        }