Package org.apache.avro.ipc

Examples of org.apache.avro.ipc.RPCContext


  @Test
  public void testMultipleRPCs() throws IOException {
    FakeTicks t = new FakeTicks();
    StatsPlugin statsPlugin = new StatsPlugin(t, StatsPlugin.LATENCY_SEGMENTER,
        StatsPlugin.PAYLOAD_SEGMENTER);
    RPCContext context1 = makeContext();
    RPCContext context2 = makeContext();
    statsPlugin.serverReceiveRequest(context1);
    t.passTime(100*MS); // first takes 100ms
    statsPlugin.serverReceiveRequest(context2);
    String r = generateServletResponse(statsPlugin);
    // Check in progress RPCs
View Full Code Here


    assertTrue(resp.contains("Average: 2.0"));
  }
 
  private RPCContext makeContext() {
    RPCContext context = new RPCContext();
    context.setMessage(message);
    return context;
  }
View Full Code Here

  @Test
  public void testMultipleRPCs() throws IOException {
    FakeTicks t = new FakeTicks();
    StatsPlugin statsPlugin = new StatsPlugin(t, StatsPlugin.LATENCY_SEGMENTER,
        StatsPlugin.PAYLOAD_SEGMENTER);
    RPCContext context1 = makeContext();
    RPCContext context2 = makeContext();
    statsPlugin.serverReceiveRequest(context1);
    t.passTime(100*MS); // first takes 100ms
    statsPlugin.serverReceiveRequest(context2);
    String r = generateServletResponse(statsPlugin);
    // Check in progress RPCs
View Full Code Here

    assertTrue(resp.contains("Average: 2.0"));
  }
 
  private RPCContext makeContext() {
    RPCContext context = new RPCContext();
    context.setMessage(message);
    return context;
  }
View Full Code Here

  @Test
  public void testMultipleRPCs() throws IOException {
    FakeTicks t = new FakeTicks();
    StatsPlugin statsPlugin = new StatsPlugin(t, StatsPlugin.DEFAULT_SEGMENTER);
    RPCContext context1 = makeContext();
    RPCContext context2 = makeContext();
    statsPlugin.serverReceiveRequest(context1);
    t.passTime(100*MS); // first takes 100ms
    statsPlugin.serverReceiveRequest(context2);
    String r = generateServletResponse(statsPlugin);
    // Check in progress RPCs
View Full Code Here

    r = generateServletResponse(statsPlugin);
    assertTrue(r.contains("Average Duration: 500ms"));
  }

  private RPCContext makeContext() {
    RPCContext context = new RPCContext();
    context.setMessage(message);
    return context;
  }
View Full Code Here

TOP

Related Classes of org.apache.avro.ipc.RPCContext

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.