zeroflag commented on a change in pull request #2194:
URL: https://github.com/apache/hive/pull/2194#discussion_r620046903
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -10548,13 +10565,20 @@ public void
drop_stored_procedure(StoredProcedureRequest request) throws MetaExc
}
}
-public Package find_package(GetPackageRequest request) throws MetaException {
+public Package find_package(GetPackageRequest request) throws MetaException,
NoSuchObjectException {
startFunction("find_package");
Exception ex = null;
try {
- return getMS().findPackage(request);
+ Package pkg = getMS().findPackage(request);
+ if (pkg == null) {
+ throw new NoSuchObjectException(
+ "HPL/SQL package " + request.getDbName() + "." +
request.getPackageName() + " does not exist");
+ }
+ return pkg;
} catch (Exception e) {
- LOG.error("Caught exception", e);
+ if (!(e instanceof NoSuchObjectException)) {
+ LOG.error("Caught exception", e);
Review comment:
No, but this is happening on HMS side. We log the exception in the
client side. The former is written to metastore logs while the latter in hs2
logs and the stacktraces are not the same. Many of the other methods of hms
handler do this as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]