Examples of OKAvroHandler


Examples of org.apache.flume.api.RpcTestUtils.OKAvroHandler

   */
  @Test
  public void testAppendWithMaxIOWorkersSimpleCompressionLevel0() throws FlumeException,
      EventDeliveryException {
    NettyAvroRpcClient client = null;
    Server server = RpcTestUtils.startServer(new OKAvroHandler(), 0, true);
    Properties props = new Properties();
    props.setProperty(RpcClientConfigurationConstants.CONFIG_HOSTS, "localhost");
    props.setProperty(RpcClientConfigurationConstants.CONFIG_HOSTS_PREFIX + "localhost", localhost
        + ":" + server.getPort());
    props.setProperty(RpcClientConfigurationConstants.MAX_IO_WORKERS, Integer.toString(2));
View Full Code Here

Examples of org.apache.flume.api.RpcTestUtils.OKAvroHandler

  @Test(expected=FlumeException.class)
  public void testCreatingLbClientSingleHost() {
    Server server1 = null;
    RpcClient c = null;
    try {
      server1 = RpcTestUtils.startServer(new OKAvroHandler());
      Properties p = new Properties();
      p.put("host1", "127.0.0.1:" + server1.getPort());
      p.put("hosts", "host1");
      p.put("client.type", "default_loadbalance");
      RpcClientFactory.getInstance(p);
View Full Code Here

Examples of org.apache.flume.api.RpcTestUtils.OKAvroHandler

  @Test
  public void testTwoParamSimpleAppend() throws FlumeException,
      EventDeliveryException {
    RpcClient client = null;
    Server server = RpcTestUtils.startServer(new OKAvroHandler());
    try {
      client = RpcClientFactory.getDefaultInstance(localhost, server.getPort());
      client.append(EventBuilder.withBody("wheee!!!", Charset.forName("UTF8")));
    } finally {
      RpcTestUtils.stopServer(server);
View Full Code Here

Examples of org.apache.flume.api.RpcTestUtils.OKAvroHandler

  // testing deprecated API
  @Test
  public void testTwoParamDeprecatedAppend() throws FlumeException,
      EventDeliveryException {
    RpcClient client = null;
    Server server = RpcTestUtils.startServer(new OKAvroHandler());
    try {
      client = RpcClientFactory.getInstance(localhost, server.getPort());
      client.append(EventBuilder.withBody("wheee!!!", Charset.forName("UTF8")));
    } finally {
      RpcTestUtils.stopServer(server);
View Full Code Here

Examples of org.apache.flume.api.RpcTestUtils.OKAvroHandler

  // testing deprecated API
  @Test
  public void testThreeParamDeprecatedAppend() throws FlumeException,
      EventDeliveryException {
    RpcClient client = null;
    Server server = RpcTestUtils.startServer(new OKAvroHandler());
    try {
      client = RpcClientFactory.getInstance(localhost, server.getPort(), 3);
      Assert.assertEquals("Batch size was specified", 3, client.getBatchSize());
      client.append(EventBuilder.withBody("wheee!!!", Charset.forName("UTF8")));
    } finally {
View Full Code Here

Examples of org.apache.flume.api.RpcTestUtils.OKAvroHandler

  @Test
  public void testThreeParamBatchAppend() throws FlumeException,
      EventDeliveryException {
    int batchSize = 7;
    RpcClient client = null;
    Server server = RpcTestUtils.startServer(new OKAvroHandler());
    try {
      client = RpcClientFactory.getDefaultInstance(localhost, server.getPort(),
          batchSize);

      List<Event> events = new ArrayList<Event>();
View Full Code Here

Examples of org.apache.flume.api.RpcTestUtils.OKAvroHandler

  @Test
  public void testPropertiesBatchAppend() throws FlumeException,
      EventDeliveryException {
    int batchSize = 7;
    RpcClient client = null;
    Server server = RpcTestUtils.startServer(new OKAvroHandler());
    try {
      Properties p = new Properties();
      p.put("hosts", "host1");
      p.put("hosts.host1", localhost + ":" + String.valueOf(server.getPort()));
      p.put("batch-size", String.valueOf(batchSize));
View Full Code Here

Examples of org.apache.flume.api.RpcTestUtils.OKAvroHandler

  // we are supposed to handle this gracefully
  @Test
  public void testTwoParamBatchAppendOverflow() throws FlumeException,
      EventDeliveryException {
    RpcClient client = null;
    Server server = RpcTestUtils.startServer(new OKAvroHandler());
    try {
      client = RpcClientFactory.getDefaultInstance(localhost, server.getPort());
      int batchSize = client.getBatchSize();
      int moreThanBatch = batchSize + 1;
      List<Event> events = new ArrayList<Event>();
View Full Code Here

Examples of org.apache.flume.api.RpcTestUtils.OKAvroHandler

  @Test(expected=FlumeException.class)
  public void testCreatingLbClientSingleHost() {
    Server server1 = null;
    RpcClient c = null;
    try {
      server1 = RpcTestUtils.startServer(new OKAvroHandler());
      Properties p = new Properties();
      p.put("host1", "127.0.0.1:" + server1.getPort());
      p.put("hosts", "host1");
      p.put("client.type", "default_loadbalance");
      RpcClientFactory.getInstance(p);
View Full Code Here

Examples of org.apache.flume.api.RpcTestUtils.OKAvroHandler

   * @throws EventDeliveryException
   */
  @Test
  public void testOKServerSimple() throws FlumeException,
      EventDeliveryException {
    RpcTestUtils.handlerSimpleAppendTest(new OKAvroHandler());
  }
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.