LOG.error("Too many repeated deadlocks in " + caller + ", giving up."); } else if (isRetryable(conf, e)) {
@Test public void testRetryableRegex() throws Exception { SQLException sqlException = new SQLException("ORA-08177: can't serialize access for this transaction", "72000"); // Note that we have 3 regex'es below conf.setVar(HiveConf.ConfVars.HIVE_TXN_RETRYABLE_SQLEX_REGEX, "^Deadlock detected, roll back,.*08177.*,.*08178.*"); boolean result = TxnHandler.isRetryable(conf, sqlException); Assert.assertTrue("regex should be retryable", result); sqlException = new SQLException("This error message, has comma in it"); conf.setVar(HiveConf.ConfVars.HIVE_TXN_RETRYABLE_SQLEX_REGEX, ".*comma.*"); result = TxnHandler.isRetryable(conf, sqlException); Assert.assertTrue("regex should be retryable", result); }
else if(isRetryable(e)) {
else if(isRetryable(e)) {