示例#1
0
文件: htype.go 项目: mohanarpit/goh
func toRegionsList(list thrift.TList) []*TRegionInfo {
	l := list.Len()
	regions := make([]*TRegionInfo, l)
	//fmt.Println("ElemType", ret.ElemType())
	//fmt.Println("len", l)

	for i := 0; i < l; i++ {
		value := list.At(i)
		regions[i] = toRegion(value.(*Hbase.TRegionInfo))
	}

	return regions
}
示例#2
0
文件: htype.go 项目: mohanarpit/goh
func toListStr(list thrift.TList) []string {
	if list == nil {
		return make([]string, 0)
	}

	l := list.Len()
	data := make([]string, l)
	for i := 0; i < l; i++ {
		data[i] = list.At(i).(string)
	}

	return data
}
示例#3
0
文件: htype.go 项目: mohanarpit/goh
func toListRowResult(list thrift.TList) []*TRowResult {
	if list == nil {
		return nil
	}

	l := list.Len()
	data := make([]*TRowResult, l)

	for i := 0; i < l; i++ {
		value := list.At(i)
		data[i] = toRowResult(value.(*Hbase.TRowResult))
	}

	return data
}
示例#4
0
文件: htype.go 项目: mohanarpit/goh
func toListCell(list thrift.TList) []*TCell {
	if list == nil {
		return nil
	}

	l := list.Len()
	data := make([]*TCell, l)

	for i := 0; i < l; i++ {
		value := list.At(i)
		data[i] = toCell(value.(*Hbase.TCell))
	}

	return data
}