- Measuring performance of a streaming application is difficult. GenerateFlowFile can be useful but understanding NiFi backpressure and scheduling is important.
- Push provides better load distribution than Pull.
- Pull can provide the same level of throughput with Push, but latency is bigger. Increasing backpressure threshold is encouraged.
- Fewer larger flow-files provide better throughput than many smaller flow-files.
- HTTP provides identical throughput with RAW Site-to-Site, but use slightly more CPU resources.
- Be careful with Provenance repository max.storage.time, if it's too long for your use-case, CPU will be occupied to rollover the provenance storage and other tasks can't be executed. Once provenance storage starts having too many journal files, it starts backpressure mechanism and holds lock until it clears old events.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onTrigger(final ProcessContext context, final ProcessSession session) { | |
final ComponentLog logger = getLogger(); | |
final List<FlowFile> invalidFlowFilesList = new ArrayList<>(); | |
final List<FlowFile> processedFlowFilesList = new ArrayList<>(); | |
final FlowFile originalFlowFile = session.get(); | |
if (originalFlowFile == null) { | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<template> | |
<description>This template generates messages, puts it to Kafka topic. Then another processor gets messages from | |
Kafka and put it on HDFS. | |
</description> | |
<name>Kerberized Kafka and HDFS</name> | |
<snippet> | |
<connections> | |
<id>2b93ffcd-0698-44a9-86f6-ce0ea6fc4145</id> | |
<parentGroupId>3bdd324d-db87-4a21-8149-f88d7a46741e</parentGroupId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Licensed to the Apache Software Foundation (ASF) under one or more | |
# contributor license agreements. See the NOTICE file distributed with | |
# this work for additional information regarding copyright ownership. | |
# The ASF licenses this file to You under the Apache License, Version 2.0 | |
# (the "License"); you may not use this file except in compliance with | |
# the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"\\@context": { | |
"name": "&1.Name", | |
"ingredient": "&1.Inputs", | |
"yield": "\\@context.Makes", | |
"*": "&1.&" | |
}, | |
"name": "Name", | |
"ingredient": "Inputs", | |
"yield": "Makes", |
In order to use HttpAsyncRequestProducer correctly, it's important to know how it works. This Gist has two examples one uses it right, while the other one does it wrong.
Please be careful with specifying the right bucket name, region and credential.
When I misconfigured region, I got the following error:
2016-11-17 10:51:07,828 ERROR [Timer-Driven Process Thread-9] o.a.nifi.processors.aws.s3.PutS3Object
com.amazonaws.services.s3.model.AmazonS3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. (Service: Amazon S3; Status Code: 301; ErrorCode: PermanentRedirect; Request ID: 99A62426D8544997)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" ?> | |
<template encoding-version="1.0"> | |
<description>A Process Group using Get/Modify/PutHTMLElement processors.</description> | |
<groupId>d3fed114-0156-1000-5b68-63e2f6052f7a</groupId> | |
<name>HTML Processors Test</name> | |
<snippet> | |
<processGroups> | |
<id>9a9dbd8e-0158-1000-0000-000000000000</id> | |
<parentGroupId>d3fed114-0156-1000-0000-000000000000</parentGroupId> | |
<position> |