public List < HBaseDataWrapper > loadAll ( final Table hTable , final List < Object > rows , final String columnFamily , final String [ ] columns ) throws IOException { setTableName ( hTable ) ; List < HBaseDataWrapper > results = new ArrayList < HBaseDataWrapper > ( ) ; List < Get > getRequest = new ArrayList < Get > ( ) ; for ( Object rowKey : rows ) { if ( rowKey != null ) { byte [ ] rowKeyBytes = HBaseUtils . getBytes ( rowKey ) ; Get request = new Get ( rowKeyBytes ) ; getRequest . add ( request ) ; } } Result [ ] rawResult = hTable . get ( getRequest ) ; for ( Result result : rawResult ) { List < Cell > cells = result . listCells ( ) ; if ( cells != null ) { HBaseDataWrapper data = new HBaseDataWrapper ( tableName , result . getRow ( ) ) ; data . setColumns ( cells ) ; results . add ( data ) ; } } return results ; }
Load all .