belugabehr commented on a change in pull request #2291:
URL: https://github.com/apache/hive/pull/2291#discussion_r646596253



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
##########
@@ -656,10 +656,9 @@ public void createCatalog(Catalog cat) throws 
MetaException {
   }
 
   @Override
-  public void alterCatalog(String catName, Catalog cat)
-      throws MetaException, InvalidOperationException {
+  public void alterCatalog(String catName, Catalog cat) {
     if (!cat.getName().equals(catName)) {
-      throw new InvalidOperationException("You cannot change a catalog's 
name");
+      throw new HiveMetaRuntimeException("You cannot change a catalog's name: 
" + cat.getName() + " -> " + catName);

Review comment:
       @nrg4878 `InvalidOperationException` is a Thrift exception, so I'm 
trying to get it out of this class.
   
   I am open to also making this a POJO `IllegalArgumentException` as well, but 
this would apply to quite a few methods so it probably should be done in 
another PR.




-- 
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]

Reply via email to