[ 
https://issues.apache.org/jira/browse/HIVE-25128?focusedWorklogId=607862&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-607862
 ]

ASF GitHub Bot logged work on HIVE-25128:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Jun/21 13:36
            Start Date: 07/Jun/21 13:36
    Worklog Time Spent: 10m 
      Work Description: belugabehr commented on a change in pull request #2291:
URL: https://github.com/apache/hive/pull/2291#discussion_r646593817



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaRuntimeException.java
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.metastore;
+
+import com.google.errorprone.annotations.FormatMethod;
+
+/**
+ * This is the root of all Hive Runtime Exceptions. If a client can reasonably
+ * be expected to recover from an exception, make it a checked exception. If a
+ * client cannot do anything to recover from the exception, make it an 
unchecked
+ * exception.
+ */
+public class HiveMetaRuntimeException extends RuntimeException {

Review comment:
       @nrg4878 Yes.  My hope would be to use this as the base class for all 
HMS Runtime Exceptions.  DataAccess is just one such type which also serves to 
demonstrate the pattern I'm going for.




-- 
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 607862)
    Time Spent: 2h  (was: 1h 50m)

> Remove Thrift Exceptions From RawStore alterCatalog
> ---------------------------------------------------
>
>                 Key: HIVE-25128
>                 URL: https://issues.apache.org/jira/browse/HIVE-25128
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> {code:java|title=RawStore.java}
>   /**
>    * Alter an existing catalog.  Only description and location can be 
> changed, and the change of
>    * location is for internal use only.
>    * @param catName name of the catalog to alter.
>    * @param cat new version of the catalog.
>    * @throws MetaException something went wrong, usually in the database.
>    * @throws InvalidOperationException attempt to change something about the 
> catalog that is not
>    * changeable, like the name.
>    */
>   void alterCatalog(String catName, Catalog cat) throws MetaException, 
> InvalidOperationException;
> {code}
> Please check out parent task [HIVE-25126] for the motivation here, but I 
> would like to remove all Thrift-based Exceptions from the {{RawStore}} 
> interface to include MetaException and InvalidOperationException. These 
> should be replaced with something that is specific to Hive and not tied to 
> the RPC layer.
> I propose instead introducing RuntimeExceptions called 
> HiveMetaRuntimeException and sub-class HiveMetaDataAccessException to replace 
> these.
> HiveMetaDataAccessException  = Unable to load data from underlying data store
> HiveMetaRuntimeException = Generic exception for something that was thrown by 
> the RawStore but not specifically handled



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to