@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>(); for (int i = 0; i < batchSize; i++) { events.add(EventBuilder.withBody("evt: " + i, Charset.forName("UTF8"))); } client.appendBatch(events); } finally { RpcTestUtils.stopServer(server); if (client != null) client.close(); } }
public static RpcClient getDefaultInstance(String hostname, Integer port) throws FlumeException { return getDefaultInstance(hostname, port, 0); }
RpcClientFactory { public static RpcClient getDefaultInstance(String hostname, Integer port) throws FlumeException { return getDefaultInstance(hostname, port, 0); } }
RpcClientFactory { public static RpcClient getDefaultInstance(String hostname, Integer port) throws FlumeException { return getDefaultInstance(hostname, port, 0); }  }
RpcClientFactory { public static RpcClient getDefaultInstance(String hostname, Integer port) throws FlumeException { return getDefaultInstance(hostname, port, 0); }  @SuppressWarnings("unchecked") static RpcClient getInstance(Properties properties); static RpcClient getInstance(File propertiesFile); @Deprecated static RpcClient getInstance(String hostname, Integer port); static RpcClient getDefaultInstance(String hostname, Integer port); @Deprecated static RpcClient getInstance(String hostname, Integer port,
      Integer batchSize); static RpcClient getDefaultInstance(String hostname, Integer port,
      Integer batchSize); static RpcClient getThriftInstance(String hostname, Integer port,
    Integer batchSize); static RpcClient getThriftInstance(String hostname, Integer port); static RpcClient getThriftInstance(Properties props); }
RpcClientFactory { public static RpcClient getDefaultInstance(String hostname, Integer port) throws FlumeException { return getDefaultInstance(hostname, port, 0); }  @SuppressWarnings("unchecked") static RpcClient getInstance(Properties properties); static RpcClient getInstance(File propertiesFile); @Deprecated static RpcClient getInstance(String hostname, Integer port); static RpcClient getDefaultInstance(String hostname, Integer port); @Deprecated static RpcClient getInstance(String hostname, Integer port,
      Integer batchSize); static RpcClient getDefaultInstance(String hostname, Integer port,
      Integer batchSize); static RpcClient getThriftInstance(String hostname, Integer port,
    Integer batchSize); static RpcClient getThriftInstance(String hostname, Integer port); static RpcClient getThriftInstance(Properties props);  }