[ https://issues.apache.org/jira/browse/HIVE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000683#comment-13000683 ]
Sushanth Sowmyan commented on HIVE-2002: ---------------------------------------- +1. Tested, and useful patch. I'd actually like to ask to extend this so that startup issues are also covered - Right now, for example, if the db server is down when the hive metastore server is brought up, HiveMetaStore.main does a System.exit(1) - it'd be useful for it to be resilient there too. I can open a separate jira if needed. > Expand exceptions caught for metastore operations > ------------------------------------------------- > > Key: HIVE-2002 > URL: https://issues.apache.org/jira/browse/HIVE-2002 > Project: Hive > Issue Type: Improvement > Components: Metastore > Affects Versions: 0.8.0 > Reporter: Paul Yang > Assignee: Paul Yang > Priority: Minor > Attachments: HIVE-2002.1.patch > > > Currently, HiveMetaStore.executeWithRetry() catches two classes of exceptions > and retries the metastore call when such exceptions occur. However, it does > not catch some exceptions that could benefit from a retry: > {code} > Failed with exception javax.jdo.JDOException: Couldnt obtain a new sequence > (unique id) : The MySQL server is running with the --read-only option so it > cannot execute this statement > NestedThrowables: > java.sql.SQLException: The MySQL server is running with the --read-only > option so it cannot execute this statement > FAILED: Execution Error, return code 1 from > org.apache.hadoop.hive.ql.exec.MoveTask > {code} > In this case, the MySQL server could be temporarily in a read-only mode, and > a later DB call may succeed. To handle these situations, this JIRA proposes > to expand the class of exceptions caught for retries. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira