@Override public <E>QueryResult<E> queryById(List<String> ids,EntityDefinition entityDefinition) throws IOException {
  List<byte[]> rowkeys=new ArrayList<>(ids.size());
  QueryResult<E> result=new QueryResult<E>();
  for (  String id : ids) {
    rowkeys.add(EagleBase64Wrapper.decode(id));
  }
  RowKeyLogReader reader=null;
  try {
    reader=new RowKeyLogReader(entityDefinition,rowkeys,null);
    reader.open();
    List<TaggedLogAPIEntity> entities=new LinkedList<>();
    while (true) {
      InternalLog log=reader.read();
      if (log == null) {
        break;
      }
      TaggedLogAPIEntity entity=HBaseInternalLogHelper.buildEntity(log,entityDefinition);
      entities.add(entity);
    }
    result.setData((List<E>)entities);
    result.setSuccess(true);
    result.setSize(entities.size());
    return result;
  }
 catch (  Exception e) {
    LOG.error(e.getMessage(),e);
    throw new IOException(e);
  }
 finally {
    if (reader != null) {
      reader.close();
    }
  }
}

@ Override public < E > QueryResult < E > queryById ( List < String > ids , EntityDefinition entityDefinition ) throws IOException { List < byte [ ] > rowkeys = new ArrayList < > ( ids . size ( ) ) ; QueryResult < E > result = new QueryResult < E > ( ) ; for ( String id : ids ) { rowkeys . add ( EagleBase64Wrapper . decode ( id ) ) ; } RowKeyLogReader reader = null ; try { reader = new RowKeyLogReader ( entityDefinition , rowkeys , null ) ; reader . open ( ) ; List < TaggedLogAPIEntity > entities = new LinkedList < > ( ) ; while ( true ) { InternalLog log = reader . read ( ) ; if ( log == null ) { break ; } TaggedLogAPIEntity entity = HBaseInternalLogHelper . buildEntity ( log , entityDefinition ) ; entities . add ( entity ) ; } result . setData ( ( List < E > ) entities ) ; result . setSuccess ( true ) ; result . setSize ( entities . size ( ) ) ; return result ; } catch ( Exception e ) { LOG . error ( e . getMessage ( ) , e ) ; throw new IOException ( e ) ; } finally { if ( reader != null ) { reader . close ( ) ; } } }
query by hbase rowkey .
