@Override
  public ImportTableDesc tableDesc(String dbName) throws SemanticException {
    try {
      Table table = new Table(metadata.getTable());
      ImportTableDesc tableDesc
              = new ImportTableDesc(StringUtils.isBlank(dbName) ? table.getDbName() : dbName, table);
      if (TableType.EXTERNAL_TABLE.equals(table.getTableType())) {
        tableDesc.setLocation(
            table.getDataLocation() == null ? null : table.getDataLocation().toString());
        tableDesc.setExternal(true);
      }
      tableDesc.setReplicationSpec(replicationSpec());
      if (table.getOwner() != null) {
        tableDesc.setOwnerName(table.getOwner());
      }
      return tableDesc;
    } catch (Exception e) {
      throw new SemanticException(e);
    }
  }
To determine if the tableDesc is for an external table,
use {@link ImportTableDesc#isExternal()}
and not {@link ImportTableDesc#tableType()} method.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/events/filesystem/FSTableEvent.java