Package org.apache.thrift

Examples of org.apache.thrift.TException


  private void addSomeNodes(int count) throws TException {
    for (int i=0; i<count; i++) {
      try {
        cm.nodeHeartbeat(nodes[i]);
      } catch (DisallowedNode e) {
        throw new TException(e);
      } catch (SafeModeException e) {
        LOG.info("Cluster Manager is in Safe Mode");
      }
    }
  }
View Full Code Here


  private void addSomeNodes(int count) throws TException {
    for (int i=0; i<count; i++) {
      try {
        cm.nodeHeartbeat(nodes[i]);
      } catch (DisallowedNode e) {
        throw new TException(e);
      } catch (SafeModeException e) {
        LOG.info("Cluster Manager is in Safe Mode");
      }
    }
  }
View Full Code Here

  private void addSomeNodes(int count) throws TException {
    for (int i=0; i<count; i++) {
      try {
        cm.nodeHeartbeat(nodes[i]);
      } catch (DisallowedNode e) {
        throw new TException(e);
      } catch (SafeModeException e) {
        LOG.info("Cluster Manager is in Safe Mode");
      }
    }
  }
View Full Code Here

  public void refreshNodes() throws TException, SafeModeException {
    checkSafeMode("refreshNodes");
    try {
      nodeManager.refreshNodes();
    } catch (IOException e) {
      throw new TException(e);
    }
  }
View Full Code Here

    checkSafeMode("killSession");
    try {
      LOG.info("Killing session " + sessionId);
      sessionEnd(sessionId, SessionStatus.KILLED);
    } catch (InvalidSessionHandle e) {
      throw new TException(e);
    }
  }
View Full Code Here

  public TQuerySubmitResponse submitQuery(String query, Map<String, String> options)
      throws TException {
    try {
      return mExecEnv.submitQuery(query, options).toThrift();
    } catch (Exception e) {
      throw new TException(e);
    }
  }
View Full Code Here

  }

  @Override
  public void cancelFlow(TFlowId id) throws TException {
    if (null == id) {
      throw new TException("cancelFlow() requires non-null id");
    }

    try {
      mExecEnv.cancelFlow(FlowId.fromThrift(id));
    } catch (Exception e) {
      throw new TException(e);
    }
  }
View Full Code Here

        out.put(entry.getKey().toThrift(), entry.getValue().toThrift());
      }

      return out;
    } catch (Exception e) {
      throw new TException(e);
    }
  }
View Full Code Here

  }

  @Override
  public boolean joinFlow(TFlowId id, long timeout) throws TException {
    if (null == id) {
      throw new TException("joinFlow() requires non-null id");
    }

    try {
      return mExecEnv.joinFlow(FlowId.fromThrift(id), timeout);
    } catch (Exception e) {
      throw new TException(e);
    }
  }
View Full Code Here

  @Override
  public void watchFlow(TSessionId sessionId, TFlowId flowId) throws TException {
    try {
      mExecEnv.watchFlow(SessionId.fromThrift(sessionId), FlowId.fromThrift(flowId));
    } catch (Exception e) {
      throw new TException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.thrift.TException

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.