Examples of TNonblockingServerSocket


Examples of com.facebook.thrift.transport.TNonblockingServerSocket

        new TestHandler();
      ThriftTest.Processor testProcessor =
        new ThriftTest.Processor(testHandler);

      // Transport
      TNonblockingServerSocket tServerSocket =
        new TNonblockingServerSocket(port);

      TServer serverEngine;

      if (hsha) {
        // HsHa Server
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.transport.TNonblockingServerSocket

  public void start() throws TTransportException {
    _executorService = Executors.newThreadPool("thrift-processors", _threadCount);
    Blur.Processor<Blur.Iface> processor = new Blur.Processor<Blur.Iface>(_iface);

    TNonblockingServerSocket serverTransport = new TNonblockingServerSocket(getBindInetSocketAddress(_configuration));
    TThreadedSelectorServer.Args args = new TThreadedSelectorServer.Args(serverTransport);
    args.processor(processor);
    args.executorService(_executorService);
    args.transportFactory(new TFramedTransport.Factory());
    args.protocolFactory(new TBinaryProtocol.Factory(true, true));
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.transport.TNonblockingServerSocket

    int bindPort = configuration.getInt(BLUR_CONTROLLER_BIND_PORT, -1);
    bindPort += serverIndex;
    if (randomPort) {
      bindPort = 0;
    }
    TNonblockingServerSocket tNonblockingServerSocket = ThriftServer.getTNonblockingServerSocket(bindAddress, bindPort);
    if (randomPort) {
      bindPort = tNonblockingServerSocket.getServerSocket().getLocalPort();
    }

    LOG.info("Controller Server using index [{0}] bind address [{1}] random port assignment [{2}]", serverIndex,
        bindAddress + ":" + bindPort, randomPort);
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.transport.TNonblockingServerSocket

    int bindPort = configuration.getInt(BLUR_SHARD_BIND_PORT, -1);
    bindPort += serverIndex;
    if (randomPort) {
      bindPort = 0;
    }
    TNonblockingServerSocket tNonblockingServerSocket = ThriftServer.getTNonblockingServerSocket(bindAddress, bindPort);
    if (randomPort) {
      bindPort = tNonblockingServerSocket.getServerSocket().getLocalPort();
    }

    int baseGuiPort = Integer.parseInt(configuration.get(BLUR_GUI_SHARD_PORT));
    final HttpJettyServer httpServer;
    if (baseGuiPort > 0) {
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.transport.TNonblockingServerSocket

  }

  public static TNonblockingServerSocket getTNonblockingServerSocket(String bindAddress, int bindPort)
      throws TTransportException {
    InetSocketAddress bindInetSocketAddress = getBindInetSocketAddress(bindAddress, bindPort);
    return new TNonblockingServerSocket(bindInetSocketAddress);
  }
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingServerSocket

    if (implType == ImplType.HS_HA || implType == ImplType.NONBLOCKING ||
        implType == ImplType.THREADED_SELECTOR) {

      TNonblockingServerTransport serverTransport =
          new TNonblockingServerSocket(listenPort);

      if (implType == ImplType.NONBLOCKING) {
        TNonblockingServer.Args serverArgs =
            new TNonblockingServer.Args(serverTransport);
        serverArgs.processor(processor)
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingServerSocket

  private class Startup extends Thread {

    public void run() {
      try {
        Scribe.Processor processor = new Scribe.Processor(new Receiver());
        TNonblockingServerTransport transport = new TNonblockingServerSocket(port);
        THsHaServer.Args args = new THsHaServer.Args(transport);

        args.workerThreads(workers);
        args.processor(processor);
        args.transportFactory(new TFramedTransport.Factory());
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingServerSocket

  public void startServer(final TProcessor processor, final TProtocolFactory protoFactory) throws Exception {
    serverThread = new Thread() {
      public void run() {
        try {
          // Transport
          TNonblockingServerSocket tServerSocket =
            new TNonblockingServerSocket(PORT);

          server = getServer(processor, tServerSocket, protoFactory);

          // Run it
          System.out.println("Starting the server on port " + PORT + "...");
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingServerSocket

  public void startServer(final TProcessor processor, final TProtocolFactory protoFactory) throws Exception {
    serverThread = new Thread() {
      public void run() {
        try {
          // Transport
          TNonblockingServerSocket tServerSocket =
            new TNonblockingServerSocket(PORT);

          server = getServer(processor, tServerSocket, protoFactory);

          // Run it
          System.out.println("Starting the server on port " + PORT + "...");
View Full Code Here

Examples of org.apache.thrift.transport.TNonblockingServerSocket

  private class Startup extends Thread {

    public void run() {
      try {
        Scribe.Processor processor = new Scribe.Processor(new Receiver());
        TNonblockingServerTransport transport = new TNonblockingServerSocket(port);
        THsHaServer.Args args = new THsHaServer.Args(transport);

        args.workerThreads(workers);
        args.processor(processor);
        args.transportFactory(new TFramedTransport.Factory(maxReadBufferBytes));
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.