Package org.apache.hdt.core.internal.model

Examples of org.apache.hdt.core.internal.model.ZooKeeperServer


        @SuppressWarnings("rawtypes")
        Iterator itr = sSelection.iterator();
        while (itr.hasNext()) {
          Object object = itr.next();
          if (object instanceof ZooKeeperServer) {
            ZooKeeperServer r = (ZooKeeperServer) object;
            if (logger.isDebugEnabled())
              logger.debug("Deleting: " + r);
            try {
              ZooKeeperManager.INSTANCE.disconnect(r);
            } catch (CoreException e) {
View Full Code Here


      Iterator itr = sSelection.iterator();
      while (itr.hasNext()) {
        Object object = itr.next();
        enabled = false;
        if (object instanceof ZooKeeperServer) {
          ZooKeeperServer server = (ZooKeeperServer) object;
          enabled = server != null;
        } else if (object instanceof ZNode) {
          ZNode zkn = (ZNode) object;
          enabled = zkn != null;
        }
View Full Code Here

        @SuppressWarnings("rawtypes")
        Iterator itr = sSelection.iterator();
        while (itr.hasNext()) {
          Object object = itr.next();
          if (object instanceof ZooKeeperServer) {
            ZooKeeperServer r = (ZooKeeperServer) object;
            if(logger.isDebugEnabled())
              logger.debug("Reconnecting: "+r);
            try {
              ZooKeeperManager.INSTANCE.reconnect(r);
            } catch (CoreException e) {
View Full Code Here

      @SuppressWarnings("rawtypes")
      Iterator itr = sSelection.iterator();
      while (itr.hasNext()) {
        Object object = itr.next();
        if (object instanceof ZooKeeperServer) {
          ZooKeeperServer server = (ZooKeeperServer) object;
          try {
            enabled = server == null ? false : server.getStatusCode() == ServerStatus.DISCONNECTED_VALUE;
          } catch (Throwable t) {
            enabled = false;
          }
        } else
          enabled = false;
View Full Code Here

        @SuppressWarnings("rawtypes")
        Iterator itr = sSelection.iterator();
        while (itr.hasNext()) {
          Object object = itr.next();
          if (object instanceof ZooKeeperServer) {
            ZooKeeperServer r = (ZooKeeperServer) object;
            if(logger.isDebugEnabled())
              logger.debug("Disconnecting: "+r);
            try {
              ZooKeeperManager.INSTANCE.disconnect(r);
            } catch (CoreException e) {
View Full Code Here

      @SuppressWarnings("rawtypes")
      Iterator itr = sSelection.iterator();
      while (itr.hasNext()) {
        Object object = itr.next();
        if (object instanceof ZooKeeperServer) {
          ZooKeeperServer server = (ZooKeeperServer) object;
          try {
            enabled = server == null ? false : server.getStatusCode() != ServerStatus.DISCONNECTED_VALUE;
          } catch (Throwable t) {
            enabled = false;
          }
        } else
          enabled = false;
View Full Code Here

   * @throws CoreException
   * @throws InterruptedException
   * @throws IOException
   */
  public ZooKeeperServer createServer(String zkServerName, String zkServerLocation) throws  CoreException {
    ZooKeeperServer zkServer = HadoopFactory.eINSTANCE.createZooKeeperServer();
    zkServer.setName(zkServerName);
    zkServer.setUri(zkServerLocation);
    try {
      ZooKeeperManager.INSTANCE.getClient(zkServer).connect();
    } catch (Exception e) {
      logger.error("Error getting children of node", e);
      throw new CoreException(new Status(Status.ERROR, Activator.BUNDLE_ID, "Error in creating server",e));
View Full Code Here

TOP

Related Classes of org.apache.hdt.core.internal.model.ZooKeeperServer

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.