当前位置: 首页>>代码示例>>Java>>正文


Java SiteToSiteClient.Builder方法代码示例

本文整理汇总了Java中org.apache.nifi.remote.client.SiteToSiteClient.Builder方法的典型用法代码示例。如果您正苦于以下问题:Java SiteToSiteClient.Builder方法的具体用法?Java SiteToSiteClient.Builder怎么用?Java SiteToSiteClient.Builder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.nifi.remote.client.SiteToSiteClient的用法示例。


在下文中一共展示了SiteToSiteClient.Builder方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getClient

import org.apache.nifi.remote.client.SiteToSiteClient; //导入方法依赖的package包/类
private SiteToSiteClient getClient(String url, String port, boolean useCompression, SSLContext sslContext) {
  SiteToSiteClient.Builder configBuilder = new SiteToSiteClient.Builder()
      .url(url)
      .portName(port)
      .useCompression(useCompression);

  if (sslContext != null) {
      configBuilder = configBuilder.sslContext(sslContext);
  }

  final SiteToSiteClientConfig config = configBuilder.buildConfig();

  final SiteToSiteClient client = new SiteToSiteClient.Builder()
     .fromConfig(config)
     .build();

  return client;
}
 
开发者ID:jfrazee,项目名称:nifi-put-site-to-site-bundle,代码行数:19,代码来源:PutSiteToSite.java

示例2: populateDAG

import org.apache.nifi.remote.client.SiteToSiteClient; //导入方法依赖的package包/类
@Override
public void populateDAG(DAG dag, Configuration conf)
{
  final SiteToSiteClientConfig clientConfig = new SiteToSiteClient.Builder()
      .url("http://localhost:8080/nifi")
      .portName("Apex")
      .requestBatchCount(5)
      .buildConfig();

  final SiteToSiteClient.Builder builder = new SiteToSiteClient.Builder().fromConfig(clientConfig);

  final WindowDataManager windowDataManager = new WindowDataManager.NoopWindowDataManager();

  NiFiSinglePortInputOperator nifi = dag.addOperator("nifi", new NiFiSinglePortInputOperator(builder, windowDataManager));
  ConsoleOutputOperator console = dag.addOperator("console", new ConsoleOutputOperator());
  dag.addStream("nifi_console", nifi.outputPort, console.input).setLocality(null);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:18,代码来源:TestNiFiInputApplication.java

示例3: populateDAG

import org.apache.nifi.remote.client.SiteToSiteClient; //导入方法依赖的package包/类
@Override
public void populateDAG(DAG dag, Configuration conf)
{
  final SiteToSiteClientConfig clientConfig = new SiteToSiteClient.Builder()
      .url("http://localhost:8080/nifi")
      .portName("Apex")
      .buildConfig();

  final int batchSize = 1;
  final SiteToSiteClient.Builder builder = new SiteToSiteClient.Builder().fromConfig(clientConfig);
  final NiFiDataPacketBuilder<String> dataPacketBuilder = new StringNiFiDataPacketBuilder();
  final WindowDataManager windowDataManager = new WindowDataManager.NoopWindowDataManager();

  RandomEventGenerator rand = dag.addOperator("rand", new RandomEventGenerator());

  NiFiSinglePortOutputOperator nifi = dag.addOperator("nifi",
      new NiFiSinglePortOutputOperator(builder, dataPacketBuilder, windowDataManager, batchSize));

  dag.addStream("rand_nifi", rand.string_data, nifi.inputPort).setLocality(null);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:21,代码来源:TestNiFiOutputApplication.java

示例4: getNiFiInput

import org.apache.nifi.remote.client.SiteToSiteClient; //导入方法依赖的package包/类
private NiFiSinglePortInputOperator getNiFiInput(DAG dag, LogLevelProperties props, WindowDataManager windowDataManager) {
    final SiteToSiteClient.Builder inputConfig = new SiteToSiteClient.Builder()
            .url(props.getNifiUrl())
            .portName(props.getNifiInputPort())
            .requestBatchCount(props.getNifiRequestBatch());

    return dag.addOperator("nifi-in", new NiFiSinglePortInputOperator(inputConfig, windowDataManager));
}
 
开发者ID:bbende,项目名称:nifi-streaming-examples,代码行数:9,代码来源:LogLevelApplication.java

示例5: getNiFiOutput

import org.apache.nifi.remote.client.SiteToSiteClient; //导入方法依赖的package包/类
private NiFiSinglePortOutputOperator getNiFiOutput(DAG dag, LogLevelProperties props, WindowDataManager windowDataManager) {
    final SiteToSiteClient.Builder outputConfig = new SiteToSiteClient.Builder()
            .url(props.getNifiUrl())
            .portName(props.getNifiOutputPort());

    final int batchSize = 1;
    final NiFiDataPacketBuilder<LogLevels> dataPacketBuilder = new DictionaryBuilder(
            props.getWindowMillis(), props.getLogLevelThreshold());

    return dag.addOperator("nifi-out", new NiFiSinglePortOutputOperator(
            outputConfig, dataPacketBuilder, windowDataManager ,batchSize));
}
 
开发者ID:bbende,项目名称:nifi-streaming-examples,代码行数:13,代码来源:LogLevelApplication.java

示例6: AbstractNiFiOutputOperator

import org.apache.nifi.remote.client.SiteToSiteClient; //导入方法依赖的package包/类
/**
 * @param siteToSiteBuilder the builder for a NiFi SiteToSiteClient
 * @param dataPacketBuilder a builder to produce NiFiDataPackets from incoming data
 * @param windowDataManager  a WindowDataManager to save and load state for windows of tuples
 */
public AbstractNiFiOutputOperator(final SiteToSiteClient.Builder siteToSiteBuilder,
    final NiFiDataPacketBuilder<T> dataPacketBuilder, final WindowDataManager windowDataManager)
{
  this.siteToSiteBuilder = siteToSiteBuilder;
  this.dataPacketBuilder = dataPacketBuilder;
  this.windowDataManager = windowDataManager;
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:13,代码来源:AbstractNiFiOutputOperator.java

示例7: AbstractNiFiInputOperator

import org.apache.nifi.remote.client.SiteToSiteClient; //导入方法依赖的package包/类
/**
 * @param siteToSiteBuilder the builder for a NiFi SiteToSiteClient
 * @param windowDataManager a WindowDataManager to save and load state for windows of tuples
 */
public AbstractNiFiInputOperator(final SiteToSiteClient.Builder siteToSiteBuilder,
    final WindowDataManager windowDataManager)
{
  this.siteToSiteBuilder = siteToSiteBuilder;
  this.windowDataManager = windowDataManager;
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:11,代码来源:AbstractNiFiInputOperator.java

示例8: NiFiSinglePortOutputOperator

import org.apache.nifi.remote.client.SiteToSiteClient; //导入方法依赖的package包/类
/**
 * @param siteToSiteBuilder the builder for a NiFi SiteToSiteClient
 * @param dataPacketBuilder a builder to produce NiFiDataPackets from incoming data
 * @param windowDataManager  a WindowDataManager to save and load state for windows of tuples
 * @param batchSize the maximum number of tuples to send to NiFi in a single transaction
 */
public NiFiSinglePortOutputOperator(
    final SiteToSiteClient.Builder siteToSiteBuilder,
    final NiFiDataPacketBuilder<T> dataPacketBuilder,
    final WindowDataManager windowDataManager,
    final int batchSize)
{
  super(siteToSiteBuilder, dataPacketBuilder, windowDataManager);
  this.inputPort = new BufferingInputPort(batchSize);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:16,代码来源:NiFiSinglePortOutputOperator.java

示例9: NiFiSinglePortInputOperator

import org.apache.nifi.remote.client.SiteToSiteClient; //导入方法依赖的package包/类
/**
 *
 * @param siteToSiteBuilder the builder for a NiFi SiteToSiteClient
 * @param windowDataManager a WindowDataManager to save and load state for windows of tuples
 */
public NiFiSinglePortInputOperator(final SiteToSiteClient.Builder siteToSiteBuilder,
    final WindowDataManager windowDataManager)
{
  super(siteToSiteBuilder, windowDataManager);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:11,代码来源:NiFiSinglePortInputOperator.java

示例10: AbstractNiFiSinglePortInputOperator

import org.apache.nifi.remote.client.SiteToSiteClient; //导入方法依赖的package包/类
/**
 *
 * @param siteToSiteBuilder the builder for a NiFi SiteToSiteClient
 * @param windowDataManager a WindowDataManager to save and load state for windows of tuples
 */
public AbstractNiFiSinglePortInputOperator(final SiteToSiteClient.Builder siteToSiteBuilder,
    final WindowDataManager windowDataManager)
{
  super(siteToSiteBuilder, windowDataManager);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:11,代码来源:AbstractNiFiSinglePortInputOperator.java


注:本文中的org.apache.nifi.remote.client.SiteToSiteClient.Builder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。