Package org.apache.giraph.comm.netty.handler

Examples of org.apache.giraph.comm.netty.handler.RequestEncoder


          // SASL tokens. It is replaced with a FixedLengthFrameDecoder (same
          // as used with the non-authenticated pipeline) after authentication
          // completes (as in non-auth pipeline below).
          pipeline.addLast("length-field-based-frame-decoder",
              new LengthFieldBasedFrameDecoder(1024, 0, 4, 0, 4));
          pipeline.addLast("request-encoder", new RequestEncoder(conf));
          // The following pipeline component responds to the server's SASL
          // tokens with its own responses. Both client and server share the
          // same Hadoop Job token, which is used to create the SASL tokens to
          // authenticate with each other.
          // After authentication finishes, this pipeline component is removed.
          pipeline.addLast("sasl-client-handler",
              new SaslClientHandler(conf));
          pipeline.addLast("response-handler",
              new ResponseClientHandler(clientRequestIdRequestInfoMap, conf));
          return pipeline;
        } else {
          LOG.info("Using Netty without authentication.");
/*end[HADOOP_NON_SECURE]*/
          ChannelPipeline pipeline = pipeline();
          pipeline.addLast("clientByteCounter", byteCounter);
          pipeline.addLast("responseFrameDecoder",
              new FixedLengthFrameDecoder(RequestServerHandler.RESPONSE_BYTES));
          pipeline.addLast("requestEncoder", new RequestEncoder(conf));
          pipeline.addLast("responseClientHandler",
              new ResponseClientHandler(clientRequestIdRequestInfoMap, conf));
          if (executionHandler != null) {
            pipeline.addAfter(handlerBeforeExecutionHandler,
                "executionHandler", executionHandler);
View Full Code Here


              PipelineUtils.addLastWithExecutorCheck(
                  "length-field-based-frame-decoder",
                  new LengthFieldBasedFrameDecoder(1024, 0, 4, 0, 4),
                  handlerToUseExecutionGroup, executionGroup, ch);
              PipelineUtils.addLastWithExecutorCheck("request-encoder",
                  new RequestEncoder(conf), handlerToUseExecutionGroup,
                  executionGroup, ch);
              // The following pipeline component responds to the server's SASL
              // tokens with its own responses. Both client and server share the
              // same Hadoop Job token, which is used to create the SASL
              // tokens to authenticate with each other.
              // After authentication finishes, this pipeline component
              // is removed.
              PipelineUtils.addLastWithExecutorCheck("sasl-client-handler",
                  new SaslClientHandler(conf), handlerToUseExecutionGroup,
                  executionGroup, ch);
              PipelineUtils.addLastWithExecutorCheck("response-handler",
                  new ResponseClientHandler(clientRequestIdRequestInfoMap,
                      conf), handlerToUseExecutionGroup, executionGroup, ch);
            } else {
              LOG.info("Using Netty without authentication.");
/*end[HADOOP_NON_SECURE]*/
              PipelineUtils.addLastWithExecutorCheck("clientInboundByteCounter",
                  inboundByteCounter, handlerToUseExecutionGroup,
                  executionGroup, ch);
              if (conf.doCompression()) {
                PipelineUtils.addLastWithExecutorCheck("compressionDecoder",
                    conf.getNettyCompressionDecoder(),
                    handlerToUseExecutionGroup, executionGroup, ch);
              }
              PipelineUtils.addLastWithExecutorCheck(
                  "clientOutboundByteCounter",
                  outboundByteCounter, handlerToUseExecutionGroup,
                  executionGroup, ch);
              if (conf.doCompression()) {
                PipelineUtils.addLastWithExecutorCheck("compressionEncoder",
                    conf.getNettyCompressionEncoder(),
                    handlerToUseExecutionGroup, executionGroup, ch);
              }
              PipelineUtils.addLastWithExecutorCheck(
                  "fixed-length-frame-decoder",
                  new FixedLengthFrameDecoder(
                      RequestServerHandler.RESPONSE_BYTES),
                 handlerToUseExecutionGroup, executionGroup, ch);
              PipelineUtils.addLastWithExecutorCheck("request-encoder",
                    new RequestEncoder(conf), handlerToUseExecutionGroup,
                  executionGroup, ch);
              PipelineUtils.addLastWithExecutorCheck("response-handler",
                    new ResponseClientHandler(clientRequestIdRequestInfoMap,
                        conf), handlerToUseExecutionGroup, executionGroup, ch);

View Full Code Here

TOP

Related Classes of org.apache.giraph.comm.netty.handler.RequestEncoder

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.