fe/src/main/java/com/cloudera/impala/catalog/TableLoadingMgr.java
/**
   * Loads a table asynchronously, returning a LoadRequest that can be used to get
   * the result (a Table). If there is already a load in flight for this table name,
   * the same underlying loading task (Future) will be used, helping to prevent duplicate
   * loads of the same table.
   * Can also be used to perform an incremental refresh of an existing table, by passing
   * the previous Table value in previousTbl. This may speedup the loading process, but
   * may return a stale object.
   */
Loads a table asynchronously, returning a LoadRequest that can be used to get
the result (a Table). If there is already a load in flight for this table name,
the same underlying loading task (Future) will be used, helping to prevent duplicate
loads of the same table.
Can also be used to perform an incremental refresh of an existing table, by passing
the previous Table value in previousTbl. This may speedup the loading process, but
may return a stale object.
Loads a table asynchronously returning a LoadRequest that can be used to get the result ( a Table ) . If there is already a load in flight for this table name the same underlying loading task ( Future ) will be used helping to prevent duplicate loads of the same table . Can also be used to perform an incremental refresh of an existing table by passing the previous Table value in previousTbl . This may speedup the loading process but may return a stale object .
public LoadRequest loadAsync(final TTableName tblName, final Table previousTbl)
      throws DatabaseNotFoundException {
    final Db parentDb = catalog_.getDb(tblName.getDb_name());
    if (parentDb == null) {
      throw new DatabaseNotFoundException(
          "Database '" + tblName.getDb_name() + "' was not found.");
    }
    FutureTask<Table> tableLoadTask = new FutureTask<Table>(new Callable<Table>() {
        @Override
        public Table call() throws Exception {
          return tblLoader_.load(parentDb, tblName.table_name,
              previousTbl);
        }});
    FutureTask<Table> existingValue = loadingTables_.putIfAbsent(tblName, tableLoadTask);
    if (existingValue == null) {
      tblLoadingPool_.execute(tableLoadTask);
    } else {
      tableLoadTask = existingValue;
    }
    return new LoadRequest(tblName, tableLoadTask);
  }
public LoadRequest loadAsync ( final TTableName tblName , final Table previousTbl ) throws DatabaseNotFoundException { final Db parentDb = catalog_ . getDb ( tblName . getDb_name ( ) ) ; if ( parentDb == null ) { throw new DatabaseNotFoundException ( "Database '" + tblName . getDb_name ( ) + "' was not found." ) ; } FutureTask < Table > tableLoadTask = new FutureTask < Table > ( new Callable < Table > ( ) { @ Override public Table call ( ) throws Exception { return tblLoader_ . load ( parentDb , tblName . table_name , previousTbl ) ; } } ) ; FutureTask < Table > existingValue = loadingTables_ . putIfAbsent ( tblName , tableLoadTask ) ; if ( existingValue == null ) { tblLoadingPool_ . execute ( tableLoadTask ) ; } else { tableLoadTask = existingValue ; } return new LoadRequest ( tblName , tableLoadTask ) ; }
Loads a table asynchronously, returning a LoadRequest that can be used to get
 the result (a Table).
Loads a table asynchronously returning a LoadRequest that can be used to get the result ( a Table ) .
// There was no existing value, submit a new load request.