예제 #1
0
파일: hclient.go 프로젝트: mohanarpit/goh
/**
 * Returns, starting at the scanner's current row value nbRows worth of
 * rows and advances to the next row in the table.  When there are no more
 * rows in the table, or a key greater-than-or-equal-to the scanner's
 * specified stopRow is reached,  an empty list is returned.
 *
 * @return a TRowResult containing the current row and a map of the columns to TCells.
 *
 * @throws IllegalArgument if ScannerID is invalid
 *
 * @throws NotFound when the scanner reaches the end
 *
 * Parameters:
 *  - Id: id of a scanner returned by scannerOpen
 *  - NbRows: number of results to return
 */
func (client *HClient) ScannerGetList(id int32, nbRows int32) (data []*Hbase.TRowResult, err error) {
	ret, io, ia, e1 := client.hbase.ScannerGetList(Hbase.ScannerID(id), nbRows)
	if err = checkHbaseArgError(io, ia, e1); err != nil {
		return
	}

	data = ret
	return
}
예제 #2
0
파일: hclient.go 프로젝트: mohanarpit/goh
/**
 * Closes the server-state associated with an open scanner.
 *
 * @throws IllegalArgument if ScannerID is invalid
 *
 * Parameters:
 *  - Id: id of a scanner returned by scannerOpen
 */
func (client *HClient) ScannerClose(id int32) error {
	return checkHbaseArgError(client.hbase.ScannerClose(Hbase.ScannerID(id)))
}