Examples of pause()


Examples of org.apache.helix.PropertyKey.Builder.pause()

    // resume cluster
    ClusterSetup.processCommandLineArgs(new String[] { "--zkSvr", ZK_ADDR,
        "--enableCluster", clusterName, "true" });

    exists = _gZkClient.exists(keyBuilder.pause().getPath());
    Assert.assertFalse(exists, "pause node under controller should be removed");

    System.out.println("END " + clusterName + " at "
        + new Date(System.currentTimeMillis()));
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.pause()

        logger.warn("leader name does NOT match, my name: " + instanceName + ", leader: " + leader);
        return;
      }
    }

    PauseSignal pauseSignal = accessor.getProperty(keyBuilder.pause());
    if (pauseSignal != null) {
      _paused = true;
      logger.info("controller is now paused");
    } else {
      if (_paused) {
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.pause()

      Map<String, String> contentMap = new TreeMap<String, String>();
      contentMap.put("AdditionalInfo", "No leader exists");
      record.setMapField(Level.HELIX_INFO + "-" + time, contentMap);
    }

    boolean paused = (accessor.getProperty(keyBuilder.pause()) == null ? false : true);
    record.setSimpleField(PropertyType.PAUSE.toString(), "" + paused);

    String retVal = ClusterRepresentationUtil.ZNRecordToJson(record);
    StringRepresentation representation =
        new StringRepresentation(retVal, MediaType.APPLICATION_JSON);
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.pause()

        logger.warn("leader name does NOT match, my name: " + instanceName + ", leader: " + leader);
        return;
      }
    }

    PauseSignal pauseSignal = accessor.getProperty(keyBuilder.pause());
    if (pauseSignal != null) {
      _paused = true;
      logger.info("controller is now paused");
    } else {
      if (_paused) {
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.pause()

    ClusterSetup.processCommandLineArgs(new String[] {
        "--zkSvr", ZK_ADDR, "--enableCluster", clusterName, "false"
    });

    Builder keyBuilder = new Builder(clusterName);
    boolean exists = _gZkClient.exists(keyBuilder.pause().getPath());
    Assert.assertTrue(exists, "pause node under controller should be created");

    // resume cluster
    ClusterSetup.processCommandLineArgs(new String[] {
        "--zkSvr", ZK_ADDR, "--enableCluster", clusterName, "true"
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.pause()

    // resume cluster
    ClusterSetup.processCommandLineArgs(new String[] {
        "--zkSvr", ZK_ADDR, "--enableCluster", clusterName, "true"
    });

    exists = _gZkClient.exists(keyBuilder.pause().getPath());
    Assert.assertFalse(exists, "pause node under controller should be removed");

    System.out.println("END " + clusterName + " at " + new Date(System.currentTimeMillis()));

  }
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.pause()

    HelixDataAccessor accessor =
        new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor<ZNRecord>(_zkClient));
    Builder keyBuilder = accessor.keyBuilder();

    if (enabled) {
      accessor.removeProperty(keyBuilder.pause());
    } else {
      accessor.createProperty(keyBuilder.pause(), new PauseSignal("pause"));
    }
  }
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.pause()

    Builder keyBuilder = accessor.keyBuilder();

    if (enabled) {
      accessor.removeProperty(keyBuilder.pause());
    } else {
      accessor.createProperty(keyBuilder.pause(), new PauseSignal("pause"));
    }
  }

  @Override
  public void resetPartition(String clusterName, String instanceName, String resourceName,
View Full Code Here

Examples of org.apache.lucene.store.RateLimiter.SimpleRateLimiter.pause()

*/
public final class TestRateLimiter extends LuceneTestCase {

  public void testPause() {
    SimpleRateLimiter limiter = new SimpleRateLimiter(10); // 10 MB / Sec
    limiter.pause(2);//init
    long pause = 0;
    for (int i = 0; i < 3; i++) {
      pause += limiter.pause(4 * 1024 * 1024); // fire up 3 * 4 MB
    }
    final long convert = TimeUnit.MILLISECONDS.convert(pause, TimeUnit.NANOSECONDS);
View Full Code Here

Examples of org.apache.oodt.cas.workflow.engine.IterativeWorkflowProcessorThread.pause()

                                    + ", however, this engine is not tracking its execution");
            return;
        }

        // otherwise, all good
        worker.pause();

    }

    /*
     * (non-Javadoc)
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.