You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by bl...@apache.org on 2019/05/17 23:38:00 UTC
[flink] branch master updated: [FLINK-12549][hive] include
exceptions thrown by Hive metastore client in CatalogException in
HiveCatalogBase
This is an automated email from the ASF dual-hosted git repository.
bli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new bd85d25 [FLINK-12549][hive] include exceptions thrown by Hive metastore client in CatalogException in HiveCatalogBase
bd85d25 is described below
commit bd85d25b4684d4f9c6c277b2d34ac61ddc24b454
Author: bowen.li <bo...@gmail.com>
AuthorDate: Fri May 17 16:37:39 2019 -0700
[FLINK-12549][hive] include exceptions thrown by Hive metastore client in CatalogException in HiveCatalogBase
---
.../apache/flink/table/catalog/hive/HiveCatalogBase.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalogBase.java b/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalogBase.java
index 4180308..ea7e221 100644
--- a/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalogBase.java
+++ b/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalogBase.java
@@ -218,7 +218,7 @@ public abstract class HiveCatalogBase implements Catalog {
client.dropDatabase(name, true, ignoreIfNotExists);
} catch (NoSuchObjectException e) {
if (!ignoreIfNotExists) {
- throw new DatabaseNotExistException(catalogName, name);
+ throw new DatabaseNotExistException(catalogName, name, e);
}
} catch (InvalidOperationException e) {
throw new DatabaseNotEmptyException(catalogName, name);
@@ -234,7 +234,7 @@ public abstract class HiveCatalogBase implements Catalog {
client.createDatabase(createHiveDatabase(name, database));
} catch (AlreadyExistsException e) {
if (!ignoreIfExists) {
- throw new DatabaseAlreadyExistException(catalogName, name);
+ throw new DatabaseAlreadyExistException(catalogName, name, e);
}
} catch (TException e) {
throw new CatalogException(String.format("Failed to create database %s", name), e);
@@ -275,7 +275,7 @@ public abstract class HiveCatalogBase implements Catalog {
client.createTable(createHiveTable(tablePath, table));
} catch (AlreadyExistsException e) {
if (!ignoreIfExists) {
- throw new TableAlreadyExistException(catalogName, tablePath);
+ throw new TableAlreadyExistException(catalogName, tablePath, e);
}
} catch (TException e) {
throw new CatalogException(String.format("Failed to create table %s", tablePath.getFullName()), e);
@@ -371,7 +371,7 @@ public abstract class HiveCatalogBase implements Catalog {
ignoreIfNotExists);
} catch (NoSuchObjectException e) {
if (!ignoreIfNotExists) {
- throw new TableNotExistException(catalogName, tablePath);
+ throw new TableNotExistException(catalogName, tablePath, e);
}
} catch (TException e) {
throw new CatalogException(
@@ -385,7 +385,7 @@ public abstract class HiveCatalogBase implements Catalog {
try {
return client.getAllTables(databaseName);
} catch (UnknownDBException e) {
- throw new DatabaseNotExistException(catalogName, databaseName);
+ throw new DatabaseNotExistException(catalogName, databaseName, e);
} catch (TException e) {
throw new CatalogException(
String.format("Failed to list tables in database %s", databaseName), e);
@@ -400,7 +400,7 @@ public abstract class HiveCatalogBase implements Catalog {
null, // table pattern
TableType.VIRTUAL_VIEW);
} catch (UnknownDBException e) {
- throw new DatabaseNotExistException(catalogName, databaseName);
+ throw new DatabaseNotExistException(catalogName, databaseName, e);
} catch (TException e) {
throw new CatalogException(
String.format("Failed to list views in database %s", databaseName), e);
@@ -423,7 +423,7 @@ public abstract class HiveCatalogBase implements Catalog {
try {
return client.getTable(tablePath.getDatabaseName(), tablePath.getObjectName());
} catch (NoSuchObjectException e) {
- throw new TableNotExistException(catalogName, tablePath);
+ throw new TableNotExistException(catalogName, tablePath, e);
} catch (TException e) {
throw new CatalogException(
String.format("Failed to get table %s from Hive metastore", tablePath.getFullName()), e);