Package co.cask.cdap.explore.service

Examples of co.cask.cdap.explore.service.UnexpectedQueryStatusException


      } else if (t instanceof HandleNotFoundException) {
        // Cannot happen unless explore server restarted, or someone calls close in between.
        LOG.error("Error running enable explore", e);
        throw Throwables.propagate(e);
      } else if (t instanceof UnexpectedQueryStatusException) {
        UnexpectedQueryStatusException sE = (UnexpectedQueryStatusException) t;
        LOG.error("Enable explore operation ended in an unexpected state - {}", sE.getStatus().name(), e);
        throw Throwables.propagate(e);
      }
    } catch (TimeoutException e) {
      LOG.error("Error running enable explore - operation timed out", e);
      throw Throwables.propagate(e);
View Full Code Here


      } else if (t instanceof HandleNotFoundException) {
        // Cannot happen unless explore server restarted, or someone calls close in between.
        LOG.error("Error running disable explore", e);
        throw Throwables.propagate(e);
      } else if (t instanceof UnexpectedQueryStatusException) {
        UnexpectedQueryStatusException sE = (UnexpectedQueryStatusException) t;
        LOG.error("Disable explore operation ended in an unexpected state - {}", sE.getStatus().name(), e);
        throw Throwables.propagate(e);
      }
    } catch (TimeoutException e) {
      LOG.error("Error running disable explore - operation timed out", e);
      throw Throwables.propagate(e);
View Full Code Here

      Throwable t = Throwables.getRootCause(e);
      if (t instanceof HandleNotFoundException) {
        LOG.error("Error executing query", e);
        throw new SQLException("Unknown state");
      } else if (t instanceof UnexpectedQueryStatusException) {
        UnexpectedQueryStatusException sE = (UnexpectedQueryStatusException) t;
        if (QueryStatus.OpStatus.CANCELED.equals(sE.getStatus())) {
          // The query execution may have been canceled without calling futureResults.cancel(), using the right
          // REST endpoint with the handle for eg.
          return false;
        }
        throw new SQLException(String.format("Statement '%s' execution did not finish successfully. " +
                                             "Got final state - %s", sql, sE.getStatus().toString()));
      }
      LOG.error("Caught exception", e);
      throw new SQLException(Throwables.getRootCause(e));
    } catch (CancellationException e) {
      // If futureResults has been cancelled
View Full Code Here

TOP

Related Classes of co.cask.cdap.explore.service.UnexpectedQueryStatusException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.