Beispiel #1
0
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
}
Beispiel #2
0
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
}
Beispiel #3
0
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
}
Beispiel #4
0
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
}