Hive scan fails with "Failed to run async statement" after HiveServer2 restart

Restart the CMA Agent to clear stale Hive JDBC connections after HiveServer2 restarts.

Symptom: Hive scan fails immediately with HiveScannerException: Exception while querying database names - Exception message: Failed to run async statement. The scan was working before a HiveServer2 restart.

Cause: Cloudera Migration Assistant pools Hive JDBC connections for reuse across scans. When HiveServer2 is restarted, pooled connections become invalid because the server-side Thrift session no longer exists, but the client-side socket still appears open.

  1. Go to the CMA Agent service in Cloudera Manager.
  2. Click Actions > Restart.
  3. Retry the Hive scan.