Exemple #1
0
func (p *HiveServerException) ReadField2(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v14, err15 := iprot.ReadI32()
	if err15 != nil {
		return thrift.NewTProtocolExceptionReadField(2, "errorCode", p.ThriftName(), err15)
	}
	p.ErrorCode = v14
	return err
}
Exemple #2
0
func (p *HiveServerException) ReadField3(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v16, err17 := iprot.ReadString()
	if err17 != nil {
		return thrift.NewTProtocolExceptionReadField(3, "SQLState", p.ThriftName(), err17)
	}
	p.SQLState = v16
	return err
}
Exemple #3
0
func (p *HiveClusterStatus) ReadField2(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v2, err3 := iprot.ReadI32()
	if err3 != nil {
		return thrift.NewTProtocolExceptionReadField(2, "mapTasks", p.ThriftName(), err3)
	}
	p.MapTasks = v2
	return err
}
Exemple #4
0
func (p *HiveServerException) ReadField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v12, err13 := iprot.ReadString()
	if err13 != nil {
		return thrift.NewTProtocolExceptionReadField(1, "message", p.ThriftName(), err13)
	}
	p.Message = v12
	return err
}
Exemple #5
0
func (p *HiveClusterStatus) ReadField6(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v10, err11 := iprot.ReadI32()
	if err11 != nil {
		return thrift.NewTProtocolExceptionReadField(6, "state", p.ThriftName(), err11)
	}
	p.State = JobTrackerState(v10)
	return err
}
Exemple #6
0
func (p *HiveClusterStatus) ReadField5(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v8, err9 := iprot.ReadI32()
	if err9 != nil {
		return thrift.NewTProtocolExceptionReadField(5, "maxReduceTasks", p.ThriftName(), err9)
	}
	p.MaxReduceTasks = v8
	return err
}
Exemple #7
0
func (p *HiveClusterStatus) ReadField4(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v6, err7 := iprot.ReadI32()
	if err7 != nil {
		return thrift.NewTProtocolExceptionReadField(4, "maxMapTasks", p.ThriftName(), err7)
	}
	p.MaxMapTasks = v6
	return err
}
Exemple #8
0
func (p *HiveClusterStatus) ReadField3(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v4, err5 := iprot.ReadI32()
	if err5 != nil {
		return thrift.NewTProtocolExceptionReadField(3, "reduceTasks", p.ThriftName(), err5)
	}
	p.ReduceTasks = v4
	return err
}
Exemple #9
0
func (p *HiveClusterStatus) ReadField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v0, err1 := iprot.ReadI32()
	if err1 != nil {
		return thrift.NewTProtocolExceptionReadField(1, "taskTrackers", p.ThriftName(), err1)
	}
	p.TaskTrackers = v0
	return err
}
Exemple #10
0
func (p *HiveServerException) Write(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteStructBegin("HiveServerException")
	if err != nil {
		return thrift.NewTProtocolExceptionWriteStruct(p.ThriftName(), err)
	}
	err = p.WriteField1(oprot)
	if err != nil {
		return err
	}
	err = p.WriteField2(oprot)
	if err != nil {
		return err
	}
	err = p.WriteField3(oprot)
	if err != nil {
		return err
	}
	err = oprot.WriteFieldStop()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(-1, "STOP", p.ThriftName(), err)
	}
	err = oprot.WriteStructEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteStruct(p.ThriftName(), err)
	}
	return err
}
Exemple #11
0
func (p *HiveClusterStatus) WriteField6(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("state", thrift.I32, 6)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(6, "state", p.ThriftName(), err)
	}
	err = oprot.WriteI32(int32(p.State))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(6, "state", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(6, "state", p.ThriftName(), err)
	}
	return err
}
Exemple #12
0
func (p *HiveServerException) WriteField2(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if int64(p.ErrorCode) == 0 {
		return nil
	}
	err = oprot.WriteFieldBegin("errorCode", thrift.I32, 2)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(2, "errorCode", p.ThriftName(), err)
	}
	err = oprot.WriteI32(int32(p.ErrorCode))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(2, "errorCode", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(2, "errorCode", p.ThriftName(), err)
	}
	return err
}
Exemple #13
0
func (p *HiveServerException) WriteField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if len(p.Message) < 1 {
		return nil
	}
	err = oprot.WriteFieldBegin("message", thrift.STRING, 1)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "message", p.ThriftName(), err)
	}
	err = oprot.WriteString(string(p.Message))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "message", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "message", p.ThriftName(), err)
	}
	return err
}
Exemple #14
0
func (p *HiveClusterStatus) WriteField5(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if int64(p.MaxReduceTasks) == 0 {
		return nil
	}
	err = oprot.WriteFieldBegin("maxReduceTasks", thrift.I32, 5)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(5, "maxReduceTasks", p.ThriftName(), err)
	}
	err = oprot.WriteI32(int32(p.MaxReduceTasks))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(5, "maxReduceTasks", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(5, "maxReduceTasks", p.ThriftName(), err)
	}
	return err
}
Exemple #15
0
func (p *HiveClusterStatus) WriteField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if int64(p.TaskTrackers) == 0 {
		return nil
	}
	err = oprot.WriteFieldBegin("taskTrackers", thrift.I32, 1)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "taskTrackers", p.ThriftName(), err)
	}
	err = oprot.WriteI32(int32(p.TaskTrackers))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "taskTrackers", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "taskTrackers", p.ThriftName(), err)
	}
	return err
}
Exemple #16
0
func (p *HiveServerException) WriteField3(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if len(p.SQLState) < 1 {
		return nil
	}
	err = oprot.WriteFieldBegin("SQLState", thrift.STRING, 3)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(3, "SQLState", p.ThriftName(), err)
	}
	err = oprot.WriteString(string(p.SQLState))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(3, "SQLState", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(3, "SQLState", p.ThriftName(), err)
	}
	return err
}
Exemple #17
0
func (p *HiveClusterStatus) Read(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_, err = iprot.ReadStructBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	for {
		fieldName, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
		if fieldId < 0 {
			fieldId = int16(p.FieldIdFromFieldName(fieldName))
		} else if fieldName == "" {
			fieldName = p.FieldNameFromFieldId(int(fieldId))
		}
		if fieldTypeId == thrift.GENERIC {
			fieldTypeId = p.FieldFromFieldId(int(fieldId)).TypeId()
		}
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
		if fieldTypeId == thrift.STOP {
			break
		}
		if fieldId == 1 || fieldName == "taskTrackers" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField1(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField1(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 2 || fieldName == "mapTasks" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField2(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField2(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 3 || fieldName == "reduceTasks" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField3(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField3(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 4 || fieldName == "maxMapTasks" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField4(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField4(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 5 || fieldName == "maxReduceTasks" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField5(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField5(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 6 || fieldName == "state" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField6(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField6(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else {
			err = iprot.Skip(fieldTypeId)
			if err != nil {
				return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
			}
		}
		err = iprot.ReadFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
	}
	err = iprot.ReadStructEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	return err
}
Exemple #18
0
func (p *HiveServerException) Read(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_, err = iprot.ReadStructBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	for {
		fieldName, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
		if fieldId < 0 {
			fieldId = int16(p.FieldIdFromFieldName(fieldName))
		} else if fieldName == "" {
			fieldName = p.FieldNameFromFieldId(int(fieldId))
		}
		if fieldTypeId == thrift.GENERIC {
			fieldTypeId = p.FieldFromFieldId(int(fieldId)).TypeId()
		}
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
		if fieldTypeId == thrift.STOP {
			break
		}
		if fieldId == 1 || fieldName == "message" {
			if fieldTypeId == thrift.STRING {
				err = p.ReadField1(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField1(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 2 || fieldName == "errorCode" {
			if fieldTypeId == thrift.I32 {
				err = p.ReadField2(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField2(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else if fieldId == 3 || fieldName == "SQLState" {
			if fieldTypeId == thrift.STRING {
				err = p.ReadField3(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else if fieldTypeId == thrift.VOID {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = p.ReadField3(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		} else {
			err = iprot.Skip(fieldTypeId)
			if err != nil {
				return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
			}
		}
		err = iprot.ReadFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
	}
	err = iprot.ReadStructEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	return err
}