code: @Override
    public void activateOptions() throws FlumeException {
      Properties props = new Properties();
      props.setProperty(RpcClientConfigurationConstants.CONFIG_HOSTS, "h1");
      props.setProperty(RpcClientConfigurationConstants.CONFIG_HOSTS_PREFIX + "h1",
          hostname + ":" + port);
      props.setProperty(RpcClientConfigurationConstants.CONFIG_CONNECT_TIMEOUT,
          String.valueOf(timeout));
      props.setProperty(RpcClientConfigurationConstants.CONFIG_REQUEST_TIMEOUT,
          String.valueOf(timeout));
      try {
        rpcClient = RpcClientFactory.getInstance(props);
        if (layout != null) {
          layout.activateOptions();
        }
      } catch (FlumeException e) {
        String errormsg = "RPC client creation failed! " +
            e.getMessage();
        LogLog.error(errormsg);
        throw e;
      }
    }
docs: Activate the options set using <tt>setPort()</tt>
  and <tt>setHostname()</tt>
  @throws FlumeException if the <tt>hostname</tt> and
  <tt>port</tt> combination is invalid.