Package org.apache.blur.thrift

Examples of org.apache.blur.thrift.ThriftServer


    StringBuilder builder = new StringBuilder();
    BlurConfiguration localConf = getBlurConfiguration(configuration);
    int controllerPort = localConf.getInt(BLUR_CONTROLLER_BIND_PORT, 40010);
    for (int i = 0; i < num; i++) {
      try {
        ThriftServer server = ThriftBlurControllerServer.createServer(i, localConf);
        controllers.add(server);
        Connection connection = new Connection("localhost", controllerPort + i);
        if (builder.length() != 0) {
          builder.append(',');
        }
View Full Code Here


      }));
    }
    int shardPort = localConf.getInt(BLUR_SHARD_BIND_PORT, 40020);
    for (int i = 0; i < num; i++) {
      try {
        ThriftServer server = futures.get(i).get();
        shards.add(server);
        Connection connection = new Connection("localhost", shardPort + i);
        startServer(server, connection);
      } catch (Exception e) {
        LOG.error(e);
View Full Code Here

  public void startControllers(BlurConfiguration configuration, int num, boolean randomPort) {
    BlurConfiguration localConf = getBlurConfiguration(configuration);
    for (int i = 0; i < num; i++) {
      try {
        ThriftServer server = ThriftBlurControllerServer.createServer(i, localConf, randomPort);
        controllers.add(server);
        startServer(server);
      } catch (Exception e) {
        LOG.error(e);
        throw new RuntimeException(e);
View Full Code Here

        }
      }));
    }
    for (int i = 0; i < num; i++) {
      try {
        ThriftServer server = futures.get(i).get();
        shards.add(server);
        startServer(server);
      } catch (Exception e) {
        LOG.error(e);
        throw new RuntimeException(e);
View Full Code Here

    killShardServer(getBlurConfiguration(), shardServer);
  }

  public void killShardServer(final BlurConfiguration configuration, int shardServer) throws IOException,
      InterruptedException, KeeperException {
    ThriftServer thriftServer = shards.get(shardServer);
    int shardPort = thriftServer.getServerTransport().getServerSocket().getLocalPort();
    String nodeNameHostname = ThriftServer.getNodeName(configuration, BLUR_SHARD_HOSTNAME);
    String nodeName = nodeNameHostname + ":" + shardPort;
    ZooKeeper zk = new ZooKeeperClient(getZkConnectionString(), 30000, new Watcher() {
      @Override
      public void process(WatchedEvent event) {
View Full Code Here

TOP

Related Classes of org.apache.blur.thrift.ThriftServer

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.