Такой метод
Код: Выделить всё
public Stream getResultStream(String tableName,Scan scan, RowMapper mapper){
scan.setCaching(5000);//set number of rows to fetch for each rpc
Table table=this.getConnection().getTable(tableName);
ResultScanner scanner = table.getScanner(scan);
return StreamSupport.stream(scanner.spliterator(),false).map(mapper::mapRow);
// scanner.close(); where to close it ?
}
Подробнее здесь: https://stackoverflow.com/questions/655 ... ine-source
Мобильная версия