http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/INTRODUCTION.md ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/INTRODUCTION.md b/thirdparty/librdkafka-0.11.4/INTRODUCTION.md new file mode 100644 index 0000000..9b712a5 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/INTRODUCTION.md @@ -0,0 +1,735 @@ +//@file INTRODUCTION.md +# Introduction to librdkafka - the Apache Kafka C/C++ client library + + +librdkafka is a high performance C implementation of the Apache +Kafka client, providing a reliable and performant client for production use. +librdkafka also provides a native C++ interface. + +## Contents + +The following chapters are available in this document + + * Performance + * Performance numbers + * High throughput + * Low latency + * Compression + * Message reliability + * Usage + * Documentation + * Initialization + * Configuration + * Threads and callbacks + * Brokers + * Producer API + * Consumer API + * Appendix + * Test detailts + + + + +## Performance + +librdkafka is a multi-threaded library designed for use on modern hardware and +it attempts to keep memory copying at a minimal. The payload of produced or +consumed messages may pass through without any copying +(if so desired by the application) putting no limit on message sizes. + +librdkafka allows you to decide if high throughput is the name of the game, +or if a low latency service is required, all through the configuration +property interface. + +The two most important configuration properties for performance tuning are: + + * `batch.num.messages` - the minimum number of messages to wait for to + accumulate in the local queue before sending off a message set. + * `queue.buffering.max.ms` - how long to wait for batch.num.messages to + fill up in the local queue. A lower value improves latency at the + cost of lower throughput and higher per-message overhead. + A higher value improves throughput at the expense of latency. + The recommended value for high throughput is > 50ms. + + +### Performance numbers + +The following performance numbers stem from tests using the following setup: + + * Intel Quad Core i7 at 3.4GHz, 8GB of memory + * Disk performance has been shortcut by setting the brokers' flush + configuration properties as so: + * `log.flush.interval.messages=10000000` + * `log.flush.interval.ms=100000` + * Two brokers running on the same machine as librdkafka. + * One topic with two partitions. + * Each broker is leader for one partition each. + * Using `rdkafka_performance` program available in the `examples` subdir. + + + + + +**Test results** + + * **Test1**: 2 brokers, 2 partitions, required.acks=2, 100 byte messages: + **850000 messages/second**, **85 MB/second** + + * **Test2**: 1 broker, 1 partition, required.acks=0, 100 byte messages: + **710000 messages/second**, **71 MB/second** + + * **Test3**: 2 broker2, 2 partitions, required.acks=2, 100 byte messages, + snappy compression: + **300000 messages/second**, **30 MB/second** + + * **Test4**: 2 broker2, 2 partitions, required.acks=2, 100 byte messages, + gzip compression: + **230000 messages/second**, **23 MB/second** + + + +**Note**: See the *Test details* chapter at the end of this document for + information about the commands executed, etc. + +**Note**: Consumer performance tests will be announced soon. + + +### High throughput + +The key to high throughput is message batching - waiting for a certain amount +of messages to accumulate in the local queue before sending them off in +one large message set or batch to the peer. This amortizes the messaging +overhead and eliminates the adverse effect of the round trip time (rtt). + +`queue.buffering.max.ms` (also called `linger.ms`) allows librdkafka to +wait up to the specified amount of time to accumulate up to +`batch.num.messages` in a single batch (MessageSet) before sending +to the broker. The larger the batch the higher the throughput. +Enabling `msg` debugging (set `debug` property to `msg`) will emit log +messages for the accumulation process which lets you see what batch sizes +are being produced. + +Example using `queue.buffering.max.ms=1`: + +``` +... test [0]: MessageSet with 1514 message(s) delivered +... test [3]: MessageSet with 1690 message(s) delivered +... test [0]: MessageSet with 1720 message(s) delivered +... test [3]: MessageSet with 2 message(s) delivered +... test [3]: MessageSet with 4 message(s) delivered +... test [0]: MessageSet with 4 message(s) delivered +... test [3]: MessageSet with 11 message(s) delivered +``` + +Example using `queue.buffering.max.ms=1000`: +``` +... test [0]: MessageSet with 10000 message(s) delivered +... test [0]: MessageSet with 10000 message(s) delivered +... test [0]: MessageSet with 4667 message(s) delivered +... test [3]: MessageSet with 10000 message(s) delivered +... test [3]: MessageSet with 10000 message(s) delivered +... test [3]: MessageSet with 4476 message(s) delivered + +``` + + +The default setting of `queue.buffering.max.ms=1` is not suitable for +high throughput, it is recommended to set this value to >50ms, with +throughput leveling out somewhere around 100-1000ms depending on +message produce pattern and sizes. + +These setting are set globally (`rd_kafka_conf_t`) but applies on a +per topic+partition basis. + + +### Low latency + +When low latency messaging is required the `queue.buffering.max.ms` should be +tuned to the maximum permitted producer-side latency. +Setting queue.buffering.max.ms to 1 will make sure messages are sent as +soon as possible. You could check out [How to decrease message latency](https://github.com/edenhill/librdkafka/wiki/How-to-decrease-message-latency) +to find more details. +Lower buffering time leads to smaller batches and larger per-message overheads, +increasing network, memory and CPU usage for producers, brokers and consumers. + + +### Compression + +Producer message compression is enabled through the `compression.codec` +configuration property. + +Compression is performed on the batch of messages in the local queue, the +larger the batch the higher likelyhood of a higher compression ratio. +The local batch queue size is controlled through the `batch.num.messages` and +`queue.buffering.max.ms` configuration properties as described in the +**High throughput** chapter above. + + + +## Message reliability + +Message reliability is an important factor of librdkafka - an application +can rely fully on librdkafka to deliver a message according to the specified +configuration (`request.required.acks` and `message.send.max.retries`, etc). + +If the topic configuration property `request.required.acks` is set to wait +for message commit acknowledgements from brokers (any value but 0, see +[`CONFIGURATION.md`](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md) +for specifics) then librdkafka will hold on to the message until +all expected acks have been received, gracefully handling the following events: + + * Broker connection failure + * Topic leader change + * Produce errors signaled by the broker + * Network problems + +This is handled automatically by librdkafka and the application does not need +to take any action at any of the above events. +The message will be resent up to `message.send.max.retries` times before +reporting a failure back to the application. + +The delivery report callback is used by librdkafka to signal the status of +a message back to the application, it will be called once for each message +to report the status of message delivery: + + * If `error_code` is non-zero the message delivery failed and the error_code + indicates the nature of the failure (`rd_kafka_resp_err_t` enum). + * If `error_code` is zero the message has been successfully delivered. + +See Producer API chapter for more details on delivery report callback usage. + +The delivery report callback is optional but highly recommended. + + +### Producer message delivery success + +When a ProduceRequest is successfully handled by the broker and a +ProduceResponse is received (also called the ack) without an error code +the messages from the ProduceRequest are enqueued on the delivery report +queue (if a delivery report callback has been set) and will be passed to +the application on the next invocation rd_kafka_poll(). + + +### Producer message delivery failure + +The following sub-chapters explains how different produce errors +are handled. + +If the error is retryable and there are remaining retry attempts for +the given message(s), an automatic retry will be scheduled by librdkafka, +these retries are not visible to the application. + +Only permanent errors and temporary errors that have reached their maximum +retry count will generate a delivery report event to the application with an +error code set. + +The application should typically not attempt to retry producing the message +on failure, but instead configure librdkafka to perform these retries +using the `retries` and `retry.backoff.ms` configuration properties. + + +#### Error: Timed out in transmission queue + +Internal error ERR__TIMED_OUT_QUEUE. + +The connectivity to the broker may be stalled due to networking contention, +local or remote system issues, etc, and the request has not yet been sent. + +The producer can be certain that the message has not been sent to the broker. + +This is a retryable error, but is not counted as a retry attempt +since the message was never actually transmitted. + +A retry by librdkafka at this point will not cause duplicate messages. + + +#### Error: Timed out in flight to/from broker + +Internal error ERR__TIMED_OUT, ERR__TRANSPORT. + +Same reasons as for `Timed out in transmission queue` above, with the +difference that the message may have been sent to the broker and might +be stalling waiting for broker replicas to ack the message, or the response +could be stalled due to networking issues. +At this point the producer can't know if the message reached the broker, +nor if the broker wrote the message to disk and replicas. + +This is a retryable error. + +A retry by librdkafka at this point may cause duplicate messages. + + +#### Error: Temporary broker-side error + +Broker errors ERR_REQUEST_TIMED_OUT, ERR_NOT_ENOUGH_REPLICAS, +ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND. + +These errors are considered temporary and librdkafka is will retry them +if permitted by configuration. + + +#### Error: Temporary errors due to stale metadata + +Broker errors ERR_LEADER_NOT_AVAILABLE, ERR_NOT_LEADER_FOR_PARTITION. + +These errors are considered temporary and a retry is warranted, a metadata +request is automatically sent to find a new leader for the partition. + +A retry by librdkafka at this point will not cause duplicate messages. + + +#### Error: Local time out + +Internal error ERR__MSG_TIMED_OUT. + +The message could not be successfully transmitted before `message.timeout.ms` +expired, typically due to no leader being available or no broker connection. +The message may have been retried due to other errors but +those error messages are abstracted by the ERR__MSG_TIMED_OUT error code. + +Since the `message.timeout.ms` has passed there will be no more retries +by librdkafka. + + +#### Error: Permanent errors + +Any other error is considered a permanent error and the message +will fail immediately, generating a delivery report event with the +distinctive error code. + +The full list of permanent errors depend on the broker version and +will likely grow in the future. + +Typical permanent broker errors are: + * ERR_CORRUPT_MESSAGE + * ERR_MSG_SIZE_TOO_LARGE - adjust client's or broker's `message.max.bytes`. + * ERR_UNKNOWN_TOPIC_OR_PART - topic or partition does not exist, + automatic topic creation is disabled on the + broker or the application is specifying a + partition that does not exist. + * ERR_RECORD_LIST_TOO_LARGE + * ERR_INVALID_REQUIRED_ACKS + * ERR_TOPIC_AUTHORIZATION_FAILED + * ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT + * ERR_CLUSTER_AUTHORIZATION_FAILED + + +### Producer retries + +The ProduceRequest itself is not retried, instead the messages +are put back on the internal partition queue by an insert sort +that maintains their original position (the message order is defined +at the time a message is initially appended to a partition queue, i.e., after +partitioning). +A backoff time (`retry.backoff.ms`) is set on the retried messages which +effectively blocks retry attempts until the backoff time has expired. + + +### Reordering + +As for all retries, if `max.in.flight` > 1 and `retries` > 0, retried messages +may be produced out of order, since a sub-sequent message in a sub-sequent +ProduceRequest may already be in-flight (and accepted by the broker) +by the time the retry for the failing message is sent. + + + + +## Usage + +### Documentation + +The librdkafka API is documented in the +[`rdkafka.h`](https://github.com/edenhill/librdkafka/blob/master/src/rdkafka.h) +header file, the configuration properties are documented in +[`CONFIGURATION.md`](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md) + +### Initialization + +The application needs to instantiate a top-level object `rd_kafka_t` which is +the base container, providing global configuration and shared state. +It is created by calling `rd_kafka_new()`. + +It also needs to instantiate one or more topics (`rd_kafka_topic_t`) to be used +for producing to or consuming from. The topic object holds topic-specific +configuration and will be internally populated with a mapping of all available +partitions and their leader brokers. +It is created by calling `rd_kafka_topic_new()`. + +Both `rd_kafka_t` and `rd_kafka_topic_t` comes with a configuration API which +is optional. +Not using the API will cause librdkafka to use its default values which are +documented in [`CONFIGURATION.md`](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md). + +**Note**: An application may create multiple `rd_kafka_t` objects and + they share no state. + +**Note**: An `rd_kafka_topic_t` object may only be used with the `rd_kafka_t` + object it was created from. + + + +### Configuration + +To ease integration with the official Apache Kafka software and lower +the learning curve, librdkafka implements identical configuration +properties as found in the official clients of Apache Kafka. + +Configuration is applied prior to object creation using the +`rd_kafka_conf_set()` and `rd_kafka_topic_conf_set()` APIs. + +**Note**: The `rd_kafka.._conf_t` objects are not reusable after they have been + passed to `rd_kafka.._new()`. + The application does not need to free any config resources after a + `rd_kafka.._new()` call. + +#### Example + + rd_kafka_conf_t *conf; + char errstr[512]; + + conf = rd_kafka_conf_new(); + rd_kafka_conf_set(conf, "compression.codec", "snappy", errstr, sizeof(errstr)); + rd_kafka_conf_set(conf, "batch.num.messages", "100", errstr, sizeof(errstr)); + + rd_kafka_new(RD_KAFKA_PRODUCER, conf); + + +### Threads and callbacks + +librdkafka uses multiple threads internally to fully utilize modern hardware. +The API is completely thread-safe and the calling application may call any +of the API functions from any of its own threads at any time. + +A poll-based API is used to provide signaling back to the application, +the application should call rd_kafka_poll() at regular intervals. +The poll API will call the following configured callbacks (optional): + + * message delivery report callback - signals that a message has been + delivered or failed delivery, allowing the application to take action + and to release any application resources used in the message. + * error callback - signals an error. These errors are usually of an + informational nature, i.e., failure to connect to a broker, and the + application usually does not need to take any action. + The type of error is passed as a rd_kafka_resp_err_t enum value, + including both remote broker errors as well as local failures. + + +Optional callbacks not triggered by poll, these may be called from any thread: + + * Logging callback - allows the application to output log messages + generated by librdkafka. + * partitioner callback - application provided message partitioner. + The partitioner may be called in any thread at any time, it may be + called multiple times for the same key. + Partitioner function contraints: + * MUST NOT call any rd_kafka_*() functions + * MUST NOT block or execute for prolonged periods of time. + * MUST return a value between 0 and partition_cnt-1, or the + special RD_KAFKA_PARTITION_UA value if partitioning + could not be performed. + + + +### Brokers + +librdkafka only needs an initial list of brokers (at least one), called the +bootstrap brokers. +It will connect to all the bootstrap brokers, specified by the +`metadata.broker.list` configuration property or by `rd_kafka_brokers_add()`, +and query each one for Metadata information which contains the full list of +brokers, topic, partitions and their leaders in the Kafka cluster. + +Broker names are specified as `host[:port]` where the port is optional +(default 9092) and the host is either a resolvable hostname or an IPv4 or IPv6 +address. +If host resolves to multiple addresses librdkafka will round-robin the +addresses for each connection attempt. +A DNS record containing all broker address can thus be used to provide a +reliable bootstrap broker. + +### Feature discovery + +Apache Kafka broker version 0.10.0 added support for the ApiVersionRequest API +which allows a client to query a broker for its range of supported API versions. + +librdkafka supports this functionality and will query each broker on connect +for this information (if `api.version.request=true`) and use it to enable or disable +various protocol features, such as MessageVersion 1 (timestamps), KafkaConsumer, etc. + +If the broker fails to respond to the ApiVersionRequest librdkafka will +assume the broker is too old to support the API and fall back to an older +broker version's API. These fallback versions are hardcoded in librdkafka +and is controlled by the `broker.version.fallback` configuration property. + + + +### Producer API + +After setting up the `rd_kafka_t` object with type `RD_KAFKA_PRODUCER` and one +or more `rd_kafka_topic_t` objects librdkafka is ready for accepting messages +to be produced and sent to brokers. + +The `rd_kafka_produce()` function takes the following arguments: + + * `rkt` - the topic to produce to, previously created with + `rd_kafka_topic_new()` + * `partition` - partition to produce to. If this is set to + `RD_KAFKA_PARTITION_UA` (UnAssigned) then the configured partitioner + function will be used to select a target partition. + * `msgflags` - 0, or one of: + * `RD_KAFKA_MSG_F_COPY` - librdkafka will immediately make a copy of + the payload. Use this when the payload is in non-persistent + memory, such as the stack. + * `RD_KAFKA_MSG_F_FREE` - let librdkafka free the payload using + `free(3)` when it is done with it. + + These two flags are mutually exclusive and neither need to be set in + which case the payload is neither copied nor freed by librdkafka. + + If `RD_KAFKA_MSG_F_COPY` flag is not set no data copying will be + performed and librdkafka will hold on the payload pointer until + the message has been delivered or fails. + The delivery report callback will be called when librdkafka is done + with the message to let the application regain ownership of the + payload memory. + The application must not free the payload in the delivery report + callback if `RD_KAFKA_MSG_F_FREE is set`. + * `payload`,`len` - the message payload + * `key`,`keylen` - an optional message key which can be used for partitioning. + It will be passed to the topic partitioner callback, if any, and + will be attached to the message when sending to the broker. + * `msg_opaque` - an optional application-provided per-message opaque pointer + that will be provided in the message delivery callback to let + the application reference a specific message. + + +`rd_kafka_produce()` is a non-blocking API, it will enqueue the message +on an internal queue and return immediately. +If the number of queued messages would exceed the `queue.buffering.max.messages` +configuration property then `rd_kafka_produce()` returns -1 and sets errno +to `ENOBUFS` and last_error to `RD_KAFKA_RESP_ERR__QUEUE_FULL`, thus +providing a backpressure mechanism. + + +**Note**: See `examples/rdkafka_performance.c` for a producer implementation. + + +### Simple Consumer API (legacy) + +NOTE: For the high-level KafkaConsumer interface see rd_kafka_subscribe (rdkafka.h) or KafkaConsumer (rdkafkacpp.h) + +The consumer API is a bit more stateful than the producer API. +After creating `rd_kafka_t` with type `RD_KAFKA_CONSUMER` and +`rd_kafka_topic_t` instances the application must also start the consumer +for a given partition by calling `rd_kafka_consume_start()`. + +`rd_kafka_consume_start()` arguments: + + * `rkt` - the topic to start consuming from, previously created with + `rd_kafka_topic_new()`. + * `partition` - partition to consume from. + * `offset` - message offset to start consuming from. This may either be an + absolute message offset or one of the two special offsets: + `RD_KAFKA_OFFSET_BEGINNING` to start consuming from the beginning + of the partition's queue (oldest message), or + `RD_KAFKA_OFFSET_END` to start consuming at the next message to be + produced to the partition, or + `RD_KAFKA_OFFSET_STORED` to use the offset store. + +After a topic+partition consumer has been started librdkafka will attempt +to keep `queued.min.messages` messages in the local queue by repeatedly +fetching batches of messages from the broker. + +This local message queue is then served to the application through three +different consume APIs: + + * `rd_kafka_consume()` - consumes a single message + * `rd_kafka_consume_batch()` - consumes one or more messages + * `rd_kafka_consume_callback()` - consumes all messages in the local + queue and calls a callback function for each one. + +These three APIs are listed above the ascending order of performance, +`rd_kafka_consume()` being the slowest and `rd_kafka_consume_callback()` being +the fastest. The different consume variants are provided to cater for different +application needs. + +A consumed message, as provided or returned by each of the consume functions, +is represented by the `rd_kafka_message_t` type. + +`rd_kafka_message_t` members: + + * `err` - Error signaling back to the application. If this field is non-zero + the `payload` field should be considered an error message and + `err` is an error code (`rd_kafka_resp_err_t`). + If `err` is zero then the message is a proper fetched message + and `payload` et.al contains message payload data. + * `rkt`,`partition` - Topic and partition for this message or error. + * `payload`,`len` - Message payload data or error message (err!=0). + * `key`,`key_len` - Optional message key as specified by the producer + * `offset` - Message offset + +Both the `payload` and `key` memory, as well as the message as a whole, is +owned by librdkafka and must not be used after an `rd_kafka_message_destroy()` +call. librdkafka will share the same messageset receive buffer memory for all +message payloads of that messageset to avoid excessive copying which means +that if the application decides to hang on to a single `rd_kafka_message_t` +it will hinder the backing memory to be released for all other messages +from the same messageset. + +When the application is done consuming messages from a topic+partition it +should call `rd_kafka_consume_stop()` to stop the consumer. This will also +purge any messages currently in the local queue. + + +**Note**: See `examples/rdkafka_performance.c` for a consumer implementation. + + +#### Offset management + +Broker based offset management is available for broker version >= 0.9.0 +in conjunction with using the high-level KafkaConsumer interface (see +rdkafka.h or rdkafkacpp.h) + +Offset management is also available through a local offset file store, where the +offset is periodically written to a local file for each topic+partition +according to the following topic configuration properties: + + * `auto.commit.enable` + * `auto.commit.interval.ms` + * `offset.store.path` + * `offset.store.sync.interval.ms` + +There is currently no support for offset management with ZooKeeper. + + + +#### Consumer groups + +Broker based consumer groups (requires Apache Kafka broker >=0.9) are supported, +see KafkaConsumer in rdkafka.h or rdkafkacpp.h + + +### Topics + +#### Topic auto creation + +Topic auto creation is supported by librdkafka. +The broker needs to be configured with `auto.create.topics.enable=true`. + + + +### Metadata + +#### < 0.9.3 +Previous to the 0.9.3 release librdkafka's metadata handling +was chatty and excessive, which usually isn't a problem in small +to medium-sized clusters, but in large clusters with a large amount +of librdkafka clients the metadata requests could hog broker CPU and bandwidth. + +#### > 0.9.3 + +The remaining Metadata sections describe the current behaviour. + +**Note:** "Known topics" in the following section means topics for + locally created `rd_kafka_topic_t` objects. + + +#### Query reasons + +There are four reasons to query metadata: + + * brokers - update/populate cluster broker list, so the client can + find and connect to any new brokers added. + + * specific topic - find leader or partition count for specific topic + + * known topics - same, but for all locally known topics. + + * all topics - get topic names for consumer group wildcard subscription + matching + +The above list is sorted so that the sub-sequent entries contain the +information above, e.g., 'known topics' contains enough information to +also satisfy 'specific topic' and 'brokers'. + + +#### Caching strategy + +The prevalent cache timeout is `metadata.max.age.ms`, any cached entry +will remain authoritative for this long or until a relevant broker error +is returned. + + + * brokers - eternally cached, the broker list is additative. + + * topics - cached for `metadata.max.age.ms` + + + + +## Appendix + +### Test details + +#### Test1: Produce to two brokers, two partitions, required.acks=2, 100 byte messages + +Each broker is leader for one of the two partitions. +The random partitioner is used (default) and each broker and partition is +assigned approximately 250000 messages each. + +**Command:** + + # examples/rdkafka_performance -P -t test2 -s 100 -c 500000 -m "_____________Test1:TwoBrokers:500kmsgs:100bytes" -S 1 -a 2 + .... + % 500000 messages and 50000000 bytes sent in 587ms: 851531 msgs/s and 85.15 Mb/s, 0 messages failed, no compression + +**Result:** + +Message transfer rate is approximately **850000 messages per second**, +**85 megabytes per second**. + + + +#### Test2: Produce to one broker, one partition, required.acks=0, 100 byte messages + +**Command:** + + # examples/rdkafka_performance -P -t test2 -s 100 -c 500000 -m "_____________Test2:OneBrokers:500kmsgs:100bytes" -S 1 -a 0 -p 1 + .... + % 500000 messages and 50000000 bytes sent in 698ms: 715994 msgs/s and 71.60 Mb/s, 0 messages failed, no compression + +**Result:** + +Message transfer rate is approximately **710000 messages per second**, +**71 megabytes per second**. + + + +#### Test3: Produce to two brokers, two partitions, required.acks=2, 100 byte messages, snappy compression + +**Command:** + + # examples/rdkafka_performance -P -t test2 -s 100 -c 500000 -m "_____________Test3:TwoBrokers:500kmsgs:100bytes:snappy" -S 1 -a 2 -z snappy + .... + % 500000 messages and 50000000 bytes sent in 1672ms: 298915 msgs/s and 29.89 Mb/s, 0 messages failed, snappy compression + +**Result:** + +Message transfer rate is approximately **300000 messages per second**, +**30 megabytes per second**. + + +#### Test4: Produce to two brokers, two partitions, required.acks=2, 100 byte messages, gzip compression + +**Command:** + + # examples/rdkafka_performance -P -t test2 -s 100 -c 500000 -m "_____________Test3:TwoBrokers:500kmsgs:100bytes:gzip" -S 1 -a 2 -z gzip + .... + % 500000 messages and 50000000 bytes sent in 2111ms: 236812 msgs/s and 23.68 Mb/s, 0 messages failed, gzip compression + +**Result:** + +Message transfer rate is approximately **230000 messages per second**, +**23 megabytes per second**. +
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/LICENSE ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/LICENSE b/thirdparty/librdkafka-0.11.4/LICENSE new file mode 100644 index 0000000..ba78cc2 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/LICENSE @@ -0,0 +1,25 @@ +librdkafka - Apache Kafka C driver library + +Copyright (c) 2012, Magnus Edenhill +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/LICENSE.crc32c ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/LICENSE.crc32c b/thirdparty/librdkafka-0.11.4/LICENSE.crc32c new file mode 100644 index 0000000..482a345 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/LICENSE.crc32c @@ -0,0 +1,28 @@ +# For src/crc32c.c copied (with modifications) from +# http://stackoverflow.com/a/17646775/1821055 + +/* crc32c.c -- compute CRC-32C using the Intel crc32 instruction + * Copyright (C) 2013 Mark Adler + * Version 1.1 1 Aug 2013 Mark Adler + */ + +/* + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Mark Adler + [email protected] + */ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/LICENSE.lz4 ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/LICENSE.lz4 b/thirdparty/librdkafka-0.11.4/LICENSE.lz4 new file mode 100644 index 0000000..353dfb4 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/LICENSE.lz4 @@ -0,0 +1,26 @@ +src/xxhash.[ch] src/lz4*.[ch]: [email protected]:lz4/lz4.git e2827775ee80d2ef985858727575df31fc60f1f3 + +LZ4 Library +Copyright (c) 2011-2016, Yann Collet +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/LICENSE.murmur2 ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/LICENSE.murmur2 b/thirdparty/librdkafka-0.11.4/LICENSE.murmur2 new file mode 100644 index 0000000..296fffa --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/LICENSE.murmur2 @@ -0,0 +1,25 @@ +parts of src/rdmurmur2.c: [email protected]:abrandoned/murmur2.git + + +MurMurHash2 Library +//----------------------------------------------------------------------------- +// MurmurHash2 was written by Austin Appleby, and is placed in the public +// domain. The author hereby disclaims copyright to this source code. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/LICENSE.pycrc ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/LICENSE.pycrc b/thirdparty/librdkafka-0.11.4/LICENSE.pycrc new file mode 100644 index 0000000..71baded --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/LICENSE.pycrc @@ -0,0 +1,23 @@ +The following license applies to the files rdcrc32.c and rdcrc32.h which +have been generated by the pycrc tool. +============================================================================ + +Copyright (c) 2006-2012, Thomas Pircher <[email protected]> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/LICENSE.queue ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/LICENSE.queue b/thirdparty/librdkafka-0.11.4/LICENSE.queue new file mode 100644 index 0000000..14bbf93 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/LICENSE.queue @@ -0,0 +1,31 @@ +For sys/queue.h: + + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)queue.h 8.5 (Berkeley) 8/20/94 + * $FreeBSD$ \ No newline at end of file http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/LICENSE.regexp ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/LICENSE.regexp b/thirdparty/librdkafka-0.11.4/LICENSE.regexp new file mode 100644 index 0000000..5fa0b10 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/LICENSE.regexp @@ -0,0 +1,5 @@ +regexp.c and regexp.h from https://github.com/ccxvii/minilibs sha 875c33568b5a4aa4fb3dd0c52ea98f7f0e5ca684 + +" +These libraries are in the public domain (or the equivalent where that is not possible). You can do anything you want with them. You have no legal obligation to do anything else, although I appreciate attribution. +" http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/LICENSE.snappy ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/LICENSE.snappy b/thirdparty/librdkafka-0.11.4/LICENSE.snappy new file mode 100644 index 0000000..baa6cfe --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/LICENSE.snappy @@ -0,0 +1,36 @@ +###################################################################### +# LICENSE.snappy covers files: snappy.c, snappy.h, snappy_compat.h # +# originally retrieved from http://github.com/andikleen/snappy-c # +# git revision 8015f2d28739b9a6076ebaa6c53fe27bc238d219 # +###################################################################### + +The snappy-c code is under the same license as the original snappy source + +Copyright 2011 Intel Corporation All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Intel Corporation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/LICENSE.tinycthread ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/LICENSE.tinycthread b/thirdparty/librdkafka-0.11.4/LICENSE.tinycthread new file mode 100644 index 0000000..0ceadef --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/LICENSE.tinycthread @@ -0,0 +1,26 @@ +From https://github.com/tinycthread/tinycthread/README.txt c57166cd510ffb5022dd5f127489b131b61441b9 + +License +------- + +Copyright (c) 2012 Marcus Geelnard + 2013-2014 Evan Nemerson + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/LICENSE.wingetopt ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/LICENSE.wingetopt b/thirdparty/librdkafka-0.11.4/LICENSE.wingetopt new file mode 100644 index 0000000..4c28701 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/LICENSE.wingetopt @@ -0,0 +1,49 @@ +For the files wingetopt.c wingetopt.h downloaded from https://github.com/alex85k/wingetopt + +/* + * Copyright (c) 2002 Todd C. Miller <[email protected]> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Sponsored in part by the Defense Advanced Research Projects + * Agency (DARPA) and Air Force Research Laboratory, Air Force + * Materiel Command, USAF, under agreement number F39502-99-1-0512. + */ +/*- + * Copyright (c) 2000 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Dieter Baron and Thomas Klausner. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/LICENSES.txt ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/LICENSES.txt b/thirdparty/librdkafka-0.11.4/LICENSES.txt new file mode 100644 index 0000000..ee8a6f4 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/LICENSES.txt @@ -0,0 +1,313 @@ +LICENSE +-------------------------------------------------------------- +librdkafka - Apache Kafka C driver library + +Copyright (c) 2012, Magnus Edenhill +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +LICENSE.crc32c +-------------------------------------------------------------- +# For src/crc32c.c copied (with modifications) from +# http://stackoverflow.com/a/17646775/1821055 + +/* crc32c.c -- compute CRC-32C using the Intel crc32 instruction + * Copyright (C) 2013 Mark Adler + * Version 1.1 1 Aug 2013 Mark Adler + */ + +/* + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Mark Adler + [email protected] + */ + + +LICENSE.lz4 +-------------------------------------------------------------- +src/xxhash.[ch] src/lz4*.[ch]: [email protected]:lz4/lz4.git e2827775ee80d2ef985858727575df31fc60f1f3 + +LZ4 Library +Copyright (c) 2011-2016, Yann Collet +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +LICENSE.murmur2 +-------------------------------------------------------------- +parts of src/rdmurmur2.c: [email protected]:abrandoned/murmur2.git + + +MurMurHash2 Library +//----------------------------------------------------------------------------- +// MurmurHash2 was written by Austin Appleby, and is placed in the public +// domain. The author hereby disclaims copyright to this source code. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +LICENSE.pycrc +-------------------------------------------------------------- +The following license applies to the files rdcrc32.c and rdcrc32.h which +have been generated by the pycrc tool. +============================================================================ + +Copyright (c) 2006-2012, Thomas Pircher <[email protected]> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +LICENSE.queue +-------------------------------------------------------------- +For sys/queue.h: + + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)queue.h 8.5 (Berkeley) 8/20/94 + * $FreeBSD$ + +LICENSE.regexp +-------------------------------------------------------------- +regexp.c and regexp.h from https://github.com/ccxvii/minilibs sha 875c33568b5a4aa4fb3dd0c52ea98f7f0e5ca684 + +" +These libraries are in the public domain (or the equivalent where that is not possible). You can do anything you want with them. You have no legal obligation to do anything else, although I appreciate attribution. +" + + +LICENSE.snappy +-------------------------------------------------------------- +###################################################################### +# LICENSE.snappy covers files: snappy.c, snappy.h, snappy_compat.h # +# originally retrieved from http://github.com/andikleen/snappy-c # +# git revision 8015f2d28739b9a6076ebaa6c53fe27bc238d219 # +###################################################################### + +The snappy-c code is under the same license as the original snappy source + +Copyright 2011 Intel Corporation All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Intel Corporation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +LICENSE.tinycthread +-------------------------------------------------------------- +From https://github.com/tinycthread/tinycthread/README.txt c57166cd510ffb5022dd5f127489b131b61441b9 + +License +------- + +Copyright (c) 2012 Marcus Geelnard + 2013-2014 Evan Nemerson + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + +LICENSE.wingetopt +-------------------------------------------------------------- +For the files wingetopt.c wingetopt.h downloaded from https://github.com/alex85k/wingetopt + +/* + * Copyright (c) 2002 Todd C. Miller <[email protected]> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Sponsored in part by the Defense Advanced Research Projects + * Agency (DARPA) and Air Force Research Laboratory, Air Force + * Materiel Command, USAF, under agreement number F39502-99-1-0512. + */ +/*- + * Copyright (c) 2000 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Dieter Baron and Thomas Klausner. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + + http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/Makefile ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/Makefile b/thirdparty/librdkafka-0.11.4/Makefile new file mode 100755 index 0000000..e428c83 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/Makefile @@ -0,0 +1,68 @@ +LIBSUBDIRS= src src-cpp + +CHECK_FILES+= CONFIGURATION.md \ + examples/rdkafka_example examples/rdkafka_performance \ + examples/rdkafka_example_cpp + +PACKAGE_NAME?= librdkafka +VERSION?= $(shell python packaging/get_version.py src/rdkafka.h) + +# Jenkins CI integration +BUILD_NUMBER ?= 1 + +.PHONY: + +all: mklove-check libs CONFIGURATION.md check + +include mklove/Makefile.base + +libs: + @(for d in $(LIBSUBDIRS); do $(MAKE) -C $$d || exit $?; done) + +CONFIGURATION.md: src/rdkafka.h examples + @printf "$(MKL_YELLOW)Updating$(MKL_CLR_RESET)\n" + @echo '//@file' > CONFIGURATION.md.tmp + @(examples/rdkafka_performance -X list >> CONFIGURATION.md.tmp; \ + cmp CONFIGURATION.md CONFIGURATION.md.tmp || \ + mv CONFIGURATION.md.tmp CONFIGURATION.md; \ + rm -f CONFIGURATION.md.tmp) + +file-check: CONFIGURATION.md LICENSES.txt examples +check: file-check + @(for d in $(LIBSUBDIRS); do $(MAKE) -C $$d $@ || exit $?; done) + +install: + @(for d in $(LIBSUBDIRS); do $(MAKE) -C $$d $@ || exit $?; done) + +examples tests: .PHONY libs + $(MAKE) -C $@ + +docs: + doxygen Doxyfile + @echo "Documentation generated in staging-docs" + +clean-docs: + rm -rf staging-docs + +clean: + @$(MAKE) -C tests $@ + @$(MAKE) -C examples $@ + @(for d in $(LIBSUBDIRS); do $(MAKE) -C $$d $@ ; done) + +distclean: clean + ./configure --clean + rm -f config.log config.log.old + +archive: + git archive --prefix=$(PACKAGE_NAME)-$(VERSION)/ \ + -o $(PACKAGE_NAME)-$(VERSION).tar.gz HEAD + git archive --prefix=$(PACKAGE_NAME)-$(VERSION)/ \ + -o $(PACKAGE_NAME)-$(VERSION).zip HEAD + +rpm: distclean + $(MAKE) -C packaging/rpm + +LICENSES.txt: .PHONY + @(for i in LICENSE LICENSE.*[^~] ; do (echo "$$i" ; echo "--------------------------------------------------------------" ; cat $$i ; echo "" ; echo "") ; done) > [email protected] + @cmp $@ [email protected] || mv [email protected] $@ ; rm -f [email protected] + http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/README.md ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/README.md b/thirdparty/librdkafka-0.11.4/README.md new file mode 100644 index 0000000..1c3a804 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/README.md @@ -0,0 +1,168 @@ +librdkafka - the Apache Kafka C/C++ client library +================================================== + +Copyright (c) 2012-2018, [Magnus Edenhill](http://www.edenhill.se/). + +[https://github.com/edenhill/librdkafka](https://github.com/edenhill/librdkafka) + +[](https://gitter.im/edenhill/librdkafka) [](https://doozer.io/user/edenhill/librdkafka) + + +**librdkafka** is a C library implementation of the +[Apache Kafka](http://kafka.apache.org/) protocol, containing both +Producer and Consumer support. It was designed with message delivery reliability +and high performance in mind, current figures exceed 1 million msgs/second for +the producer and 3 million msgs/second for the consumer. + +**librdkafka** is licensed under the 2-clause BSD license. + +For an introduction to the performance and usage of librdkafka, see +[INTRODUCTION.md](https://github.com/edenhill/librdkafka/blob/master/INTRODUCTION.md) + +See the [wiki](https://github.com/edenhill/librdkafka/wiki) for a FAQ. + +**NOTE**: The `master` branch is actively developed, use latest release for production use. + + +# Overview # + * High-level producer + * High-level balanced KafkaConsumer (requires broker >= 0.9) + * Simple (legacy) consumer + * Compression: snappy, gzip, lz4 + * [SSL](https://github.com/edenhill/librdkafka/wiki/Using-SSL-with-librdkafka) support + * [SASL](https://github.com/edenhill/librdkafka/wiki/Using-SASL-with-librdkafka) (GSSAPI/Kerberos/SSPI, PLAIN, SCRAM) support + * Broker version support: >=0.8 (see [Broker version compatibility](https://github.com/edenhill/librdkafka/wiki/Broker-version-compatibility)) + * Stable C & C++ APIs (ABI safety guaranteed for C) + * [Statistics](https://github.com/edenhill/librdkafka/wiki/Statistics) metrics + * Debian package: librdkafka1 and librdkafka-dev in Debian and Ubuntu + * RPM package: librdkafka and librdkafka-devel + * Gentoo package: dev-libs/librdkafka + * Portable: runs on Linux, OSX, Win32, Solaris, FreeBSD, AIX, ... + + +# Language bindings # + + * C#/.NET: [confluent-kafka-dotnet](https://github.com/confluentinc/confluent-kafka-dotnet) (based on [rdkafka-dotnet](https://github.com/ah-/rdkafka-dotnet)) + * C++: [cppkafka](https://github.com/mfontanini/cppkafka) + * D (C-like): [librdkafka](https://github.com/DlangApache/librdkafka/) + * D (C++-like): [librdkafkad](https://github.com/tamediadigital/librdkafka-d) + * Erlang: [erlkaf](https://github.com/silviucpp/erlkaf) + * Go: [confluent-kafka-go](https://github.com/confluentinc/confluent-kafka-go) + * Haskell (kafka, conduit, avro, schema registry): [hw-kafka](https://github.com/haskell-works/hw-kafka) + * Haskell: [haskakafka](https://github.com/cosbynator/haskakafka) + * Haskell: [haskell-kafka](https://github.com/yanatan16/haskell-kafka) + * Lua: [luardkafka](https://github.com/mistsv/luardkafka) + * Node.js: [node-rdkafka](https://github.com/Blizzard/node-rdkafka) + * Node.js: [node-kafka](https://github.com/sutoiku/node-kafka) + * Node.js: [kafka-native](https://github.com/jut-io/node-kafka-native) + * OCaml: [ocaml-kafka](https://github.com/didier-wenzek/ocaml-kafka) + * PHP: [phpkafka](https://github.com/EVODelavega/phpkafka) + * PHP: [php-rdkafka](https://github.com/arnaud-lb/php-rdkafka) + * Python: [confluent-kafka-python](https://github.com/confluentinc/confluent-kafka-python) + * Python: [PyKafka](https://github.com/Parsely/pykafka) + * Ruby: [Hermann](https://github.com/reiseburo/hermann) + * Ruby: [rdkafka-ruby](https://github.com/appsignal/rdkafka-ruby) + * Rust: [rust-rdkafka](https://github.com/fede1024/rust-rdkafka) + * Tcl: [KafkaTcl](https://github.com/flightaware/kafkatcl) + * Swift: [Perfect-Kafka](https://github.com/PerfectlySoft/Perfect-Kafka) + +# Users of librdkafka # + + * [kafkacat](https://github.com/edenhill/kafkacat) - Apache Kafka swiss army knife + * [Wikimedia's varnishkafka](https://github.com/wikimedia/varnishkafka) - Varnish cache web log producer + * [Wikimedia's kafkatee](https://github.com/wikimedia/analytics-kafkatee) - Kafka multi consumer with filtering and fanout + * [rsyslog](http://www.rsyslog.com) + * [syslog-ng](http://syslog-ng.org) + * [collectd](http://collectd.org) + * [logkafka](https://github.com/Qihoo360/logkafka) - Collect logs and send to Kafka + * [redBorder](http://www.redborder.net) + * [Headweb](http://www.headweb.com/) + * [Produban's log2kafka](https://github.com/Produban/log2kafka) - Web log producer + * [fuse_kafka](https://github.com/yazgoo/fuse_kafka) - FUSE file system layer + * [node-kafkacat](https://github.com/Rafflecopter/node-kafkacat) + * [OVH](http://ovh.com) - [AntiDDOS](http://www.slideshare.net/hugfrance/hugfr-6-oct2014ovhantiddos) + * [otto.de](http://otto.de)'s [trackdrd](https://github.com/otto-de/trackrdrd) - Varnish log reader + * [Microwish](https://github.com/microwish) has a range of Kafka utilites for log aggregation, HDFS integration, etc. + * [aidp](https://github.com/weiboad/aidp) - kafka consumer embedded Lua scripting language in data process framework + * [Yandex ClickHouse](https://github.com/yandex/ClickHouse) + * [NXLog](http://nxlog.co/) - Enterprise logging system, Kafka input/output plugin. + * large unnamed financial institutions + * and many more.. + * *Let [me](mailto:[email protected]) know if you are using librdkafka* + + + +# Usage + +## Requirements + The GNU toolchain + GNU make + pthreads + zlib (optional, for gzip compression support) + libssl-dev (optional, for SSL and SASL SCRAM support) + libsasl2-dev (optional, for SASL GSSAPI support) + +## Instructions + +### Building + + ./configure + make + sudo make install + + +**NOTE**: See [README.win32](README.win32) for instructions how to build + on Windows with Microsoft Visual Studio. + +**NOTE**: See [CMake instructions](packaging/cmake/README.md) for experimental + CMake build (unsupported). + + +### Usage in code + +See [examples/rdkafka_example.c](https://github.com/edenhill/librdkafka/blob/master/examples/rdkafka_example.c) for an example producer and consumer. + +Link your program with `-lrdkafka -lz -lpthread -lrt`. + + +## Documentation + +The public APIs are documented in their respective header files: + * The **C** API is documented in [src/rdkafka.h](src/rdkafka.h) + * The **C++** API is documented in [src-cpp/rdkafkacpp.h](src-cpp/rdkafkacpp.h) + +To generate Doxygen documents for the API, type: + + make docs + + +Configuration properties are documented in +[CONFIGURATION.md](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md) + +For a librdkafka introduction, see +[INTRODUCTION.md](https://github.com/edenhill/librdkafka/blob/master/INTRODUCTION.md) + + +## Examples + +See the `examples/`sub-directory. + + +## Tests + +See the `tests/`sub-directory. + + +## Support + +File bug reports, feature requests and questions using +[GitHub Issues](https://github.com/edenhill/librdkafka/issues) + + +Questions and discussions are also welcome on irc.freenode.org, #apache-kafka, +nickname Snaps. + + +### Commercial support + +Commercial support is available from [Edenhill services](http://www.edenhill.se) http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/README.win32 ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/README.win32 b/thirdparty/librdkafka-0.11.4/README.win32 new file mode 100644 index 0000000..de9b5e4 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/README.win32 @@ -0,0 +1,28 @@ + +Native win32 build instructions using Microsoft Visual Studio 2013 (MSVC). + +Requirements: + * zlib is installed automatically from NuGet, + but probably requires the NuGet VS extension. + * OpenSSL-win32 must be installed in C:\OpenSSL-win32. + Download and install the latest v1.0.2 non-light package from: + https://slproweb.com/products/Win32OpenSSL.html + (This would be using NuGet too but the current + OpenSSL packages are outdated and with broken + dependencies, so no luck) + +The Visual Studio solution file for librdkafka resides in win32/librdkafka.sln + +Artifacts: + - C library + - C++ library + - rdkafka_example + - tests + + Missing: + - remaining tools (rdkafka_performance, etc) + - SASL support (no official Cyrus libsasl2 DLLs available) + +If you build librdkafka with an external tool (ie CMake) you can get rid of the +__declspec(dllexport) / __declspec(dllimport) decorations by adding a define +-DLIBRDKAFKA_STATICLIB to your CFLAGS http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/configure ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/configure b/thirdparty/librdkafka-0.11.4/configure new file mode 100755 index 0000000..a76452a --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/configure @@ -0,0 +1,214 @@ +#!/usr/bin/env bash +# + +BASHVER=$(expr ${BASH_VERSINFO[0]} \* 1000 + ${BASH_VERSINFO[1]}) + +if [ "$BASHVER" -lt 3002 ]; then + echo "ERROR: mklove requires bash version 3.2 or later but you are using $BASH_VERSION ($BASHVER)" + echo " See https://github.com/edenhill/mklove/issues/15" + exit 1 +fi + +MKL_CONFIGURE_ARGS="$0 $*" + +# Load base module +source mklove/modules/configure.base + +# Read some special command line options right away that must be known prior to +# sourcing modules. +mkl_in_list "$*" "--no-download" && MKL_NO_DOWNLOAD=1 +# Disable downloads when --help is used to avoid blocking calls. +mkl_in_list "$*" "--help" && MKL_NO_DOWNLOAD=1 +mkl_in_list "$*" "--debug" && MKL_DEBUG=1 + +# This is the earliest possible time to check for color support in +# terminal because mkl_check_terminal_color_support uses mkl_dbg which +# needs to know if MKL_DEBUG is set +mkl_check_terminal_color_support + +# Delete temporary Makefile and header files on exit. +trap "{ rm -f $MKL_OUTMK $MKL_OUTH; }" EXIT + + + +## +## Load builtin modules +## + +# Builtin options, etc. +mkl_require builtin + +# Host/target support +mkl_require host + +# Compiler detection +mkl_require cc + + +# Load application provided modules (in current directory), if any. +for fname in configure.* ; do + if [[ $fname = 'configure.*' ]]; then + continue + fi + + # Skip temporary files + if [[ $fname = *~ ]]; then + continue + fi + + mkl_require $fname +done + + + + +## +## Argument parsing (options) +## +## + +_SAVE_ARGS="$*" + +# Parse arguments +while [[ ! -z $@ ]]; do + if [[ $1 != --* ]]; then + mkl_err "Unknown non-option argument: $1" + mkl_usage + exit 1 + fi + + opt=${1#--} + shift + + if [[ $opt = *=* ]]; then + name="${opt%=*}" + arg="${opt#*=}" + eqarg=1 + else + name="$opt" + arg="" + eqarg=0 + fi + + safeopt="$(mkl_env_esc $name)" + + if ! mkl_func_exists opt_$safeopt ; then + mkl_err "Unknown option $opt" + mkl_usage + exit 1 + fi + + # Check if this option needs an argument. + reqarg=$(mkl_meta_get "MKL_OPT_ARGS" "$(mkl_env_esc $name)") + if [[ ! -z $reqarg ]]; then + if [[ $eqarg == 0 && -z $arg ]]; then + arg=$1 + shift + + if [[ -z $arg ]]; then + mkl_err "Missing argument to option --$name $reqarg" + exit 1 + fi + fi + else + if [[ ! -z $arg ]]; then + mkl_err "Option --$name expects no argument" + exit 1 + fi + arg=y + fi + + case $name in + re|reconfigure) + oldcmd=$(head -1 config.log | grep '^# configure exec: ' | \ + sed -e 's/^\# configure exec: [^ ]*configure//') + echo "Reconfiguring: $0 $oldcmd" + exec $0 $oldcmd + ;; + + list-modules) + echo "Modules loaded:" + for mod in $MKL_MODULES ; do + echo " $mod" + done + exit 0 + ;; + + list-checks) + echo "Check functions in calling order:" + for mf in $MKL_CHECKS ; do + mod=${mf%:*} + func=${mf#*:} + echo -e "${MKL_GREEN}From module $mod:$MKL_CLR_RESET" + declare -f $func + echo "" + done + exit 0 + ;; + + update-modules) + fails=0 + echo "Updating modules" + for mod in $MKL_MODULES ; do + echo -n "Updating $mod..." + if mkl_module_download "$mod" > /dev/null ; then + echo -e "${MKL_GREEN}ok${MKL_CLR_RESET}" + else + echo -e "${MKL_RED}failed${MKL_CLR_RESET}" + fails=$(expr $fails + 1) + fi + done + exit $fails + ;; + + help) + mkl_usage + exit 0 + ;; + + *) + opt_$safeopt $arg || exit 1 + mkl_var_append MKL_OPTS_SET "$safeopt" + ;; + esac +done + +if [[ ! -z $MKL_CLEAN ]]; then + mkl_clean + exit 0 +fi + +# Move away previous log file +[[ -f $MKL_OUTDBG ]] && mv $MKL_OUTDBG ${MKL_OUTDBG}.old + + +# Create output files +echo "# configure exec: $0 $_SAVE_ARGS" >> $MKL_OUTDBG +echo "# On $(date)" >> $MKL_OUTDBG + +rm -f $MKL_OUTMK $MKL_OUTH + + +# Load cache file +mkl_cache_read + +# Run checks +mkl_checks_run + +# Check accumulated failures, will not return on failure. +mkl_check_fails + +# Generate outputs +mkl_generate + +# Summarize what happened +mkl_summary + +# Write cache file +mkl_cache_write + + +echo "" +echo "Now type 'make' to build" +trap - EXIT +exit 0 http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/configure.librdkafka ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/configure.librdkafka b/thirdparty/librdkafka-0.11.4/configure.librdkafka new file mode 100644 index 0000000..500d1e0 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/configure.librdkafka @@ -0,0 +1,215 @@ +#!/bin/bash +# + +mkl_meta_set "description" "name" "librdkafka" +mkl_meta_set "description" "oneline" "The Apache Kafka C/C++ library" +mkl_meta_set "description" "long" "Full Apache Kafka protocol support, including producer and consumer" +mkl_meta_set "description" "copyright" "Copyright (c) 2012-2015 Magnus Edenhill" + +# Enable generation of pkg-config .pc file +mkl_mkvar_set "" GEN_PKG_CONFIG y + + +mkl_require cxx +mkl_require lib +mkl_require pic +mkl_require atomics +mkl_require good_cflags +mkl_require socket + +# Generate version variables from rdkafka.h hex version define +# so we can use it as string version when generating a pkg-config file. + +verdef=$(grep '^#define *RD_KAFKA_VERSION *0x' src/rdkafka.h | sed 's/^#define *RD_KAFKA_VERSION *\(0x[a-f0-9]*\)\.*$/\1/') +mkl_require parseversion hex2str "%d.%d.%d" "$verdef" RDKAFKA_VERSION_STR + +mkl_toggle_option "Development" ENABLE_DEVEL "--enable-devel" "Enable development asserts, checks, etc" "n" +mkl_toggle_option "Development" ENABLE_VALGRIND "--enable-valgrind" "Enable in-code valgrind suppressions" "n" + +mkl_toggle_option "Development" ENABLE_REFCNT_DEBUG "--enable-refcnt-debug" "Enable refcnt debugging" "n" + +mkl_toggle_option "Development" ENABLE_SHAREDPTR_DEBUG "--enable-sharedptr-debug" "Enable sharedptr debugging" "n" + +mkl_toggle_option "Feature" ENABLE_LZ4_EXT "--enable-lz4" "Enable external LZ4 library support" "y" + +mkl_toggle_option "Feature" ENABLE_SSL "--enable-ssl" "Enable SSL support" "y" +mkl_toggle_option "Feature" ENABLE_SASL "--enable-sasl" "Enable SASL support with Cyrus libsasl2" "y" + + +function checks { + + # -lrt is needed on linux for clock_gettime: link it if it exists. + mkl_lib_check "librt" "" cont CC "-lrt" + + # required libs + mkl_lib_check "libpthread" "" fail CC "-lpthread" \ + "#include <pthread.h>" + + # Check if dlopen() is available + mkl_lib_check "libdl" "WITH_LIBDL" disable CC "-ldl" \ +" +#include <stdlib.h> +#include <dlfcn.h> +void foo (void) { + void *h = dlopen(\"__bad_lib\", 0); + void *p = dlsym(h, \"sym\"); + if (p) + p = NULL; + dlclose(h); +}" + + if [[ $WITH_LIBDL == "y" ]]; then + mkl_allvar_set WITH_PLUGINS WITH_PLUGINS y + fi + + # optional libs + mkl_lib_check "zlib" "WITH_ZLIB" disable CC "-lz" \ + "#include <zlib.h>" + mkl_lib_check "libcrypto" "" disable CC "-lcrypto" + + if [[ "$ENABLE_LZ4_EXT" == "y" ]]; then + mkl_lib_check --static=-llz4 "liblz4" "WITH_LZ4_EXT" disable CC "-llz4" \ + "#include <lz4frame.h>" + fi + + # Snappy support is built-in + mkl_allvar_set WITH_SNAPPY WITH_SNAPPY y + + # Enable sockem (tests) + mkl_allvar_set WITH_SOCKEM WITH_SOCKEM y + + if [[ "$ENABLE_SSL" == "y" ]]; then + mkl_meta_set "libssl" "deb" "libssl-dev" + if [[ $MKL_DISTRO == "osx" ]]; then + # Add brew's OpenSSL pkg-config path on OSX + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig" + fi + mkl_lib_check "libssl" "WITH_SSL" disable CC "-lssl" \ + "#include <openssl/ssl.h>" + fi + + if [[ "$ENABLE_SASL" == "y" ]]; then + mkl_meta_set "libsasl2" "deb" "libsasl2-dev" + if ! mkl_lib_check "libsasl2" "WITH_SASL_CYRUS" disable CC "-lsasl2" "#include <sasl/sasl.h>" ; then + mkl_lib_check "libsasl" "WITH_SASL_CYRUS" disable CC "-lsasl" \ + "#include <sasl/sasl.h>" + fi + fi + + if [[ "$WITH_SSL" == "y" ]]; then + # SASL SCRAM requires base64 encoding from OpenSSL + mkl_allvar_set WITH_SASL_SCRAM WITH_SASL_SCRAM y + fi + + # CRC32C: check for crc32 instruction support. + # This is also checked during runtime using cpuid. + mkl_compile_check crc32chw WITH_CRC32C_HW disable CC "" \ + " +#include <inttypes.h> +#include <stdio.h> +#define LONGx1 \"8192\" +#define LONGx2 \"16384\" +void foo (void) { + const char *n = \"abcdefghijklmnopqrstuvwxyz0123456789\"; + uint64_t c0 = 0, c1 = 1, c2 = 2; + uint64_t s; + uint32_t eax = 1, ecx; + __asm__(\"cpuid\" + : \"=c\"(ecx) + : \"a\"(eax) + : \"%ebx\", \"%edx\"); + __asm__(\"crc32b\t\" \"(%1), %0\" + : \"=r\"(c0) + : \"r\"(n), \"0\"(c0)); + __asm__(\"crc32q\t\" \"(%3), %0\n\t\" + \"crc32q\t\" LONGx1 \"(%3), %1\n\t\" + \"crc32q\t\" LONGx2 \"(%3), %2\" + : \"=r\"(c0), \"=r\"(c1), \"=r\"(c2) + : \"r\"(n), \"0\"(c0), \"1\"(c1), \"2\"(c2)); + s = c0 + c1 + c2; + printf(\"avoiding unused code removal by printing %d, %d, %d\n\", (int)s, (int)eax, (int)ecx); +} +" + + + # Check for libc regex + mkl_compile_check "regex" "HAVE_REGEX" disable CC "" \ +" +#include <stddef.h> +#include <regex.h> +void foo (void) { + regcomp(NULL, NULL, 0); + regexec(NULL, NULL, 0, NULL, 0); + regerror(0, NULL, NULL, 0); + regfree(NULL); +}" + + + # Older g++ (<=4.1?) gives invalid warnings for the C++ code. + mkl_mkvar_append CXXFLAGS CXXFLAGS "-Wno-non-virtual-dtor" + + # Required on SunOS + if [[ $MKL_DISTRO == "SunOS" ]]; then + mkl_mkvar_append CPPFLAGS CPPFLAGS "-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D__EXTENSIONS__" + # Source defines _POSIX_C_SOURCE to 200809L for Solaris, and this is + # incompatible on that platform with compilers < c99. + mkl_mkvar_append CFLAGS CFLAGS "-std=c99" + fi + + # Check if strndup() is available (isn't on Solaris 10) + mkl_compile_check "strndup" "HAVE_STRNDUP" disable CC "" \ +"#include <string.h> +int foo (void) { + return strndup(\"hi\", 2) ? 0 : 1; +}" + + # Check if strerror_r() is available. + # The check for GNU vs XSI is done in rdposix.h since + # we can't rely on all defines to be set here (_GNU_SOURCE). + mkl_compile_check "strerror_r" "HAVE_STRERROR_R" disable CC "" \ +"#include <string.h> +const char *foo (void) { + static char buf[64]; + strerror_r(1, buf, sizeof(buf)); + return buf; +}" + + + # See if GNU's pthread_setname_np() is available, and in what form. + mkl_compile_check "pthread_setname_gnu" "HAVE_PTHREAD_SETNAME_GNU" disable CC "-D_GNU_SOURCE -lpthread" \ +' +#include <pthread.h> + +void foo (void) { + pthread_setname_np(pthread_self(), "abc"); +} +' + + # Figure out what tool to use for dumping public symbols. + # We rely on configure.cc setting up $NM if it exists. + if mkl_env_check "nm" "" cont "NM" ; then + # nm by future mk var + if [[ $MKL_DISTRO == "osx" || $MKL_DISTRO == "AIX" ]]; then + mkl_mkvar_set SYMDUMPER SYMDUMPER '$(NM) -g' + else + mkl_mkvar_set SYMDUMPER SYMDUMPER '$(NM) -D' + fi + else + # Fake symdumper + mkl_mkvar_set SYMDUMPER SYMDUMPER 'echo' + fi + + # The linker-script generator (lds-gen.py) requires python + if [[ $WITH_LDS == y ]]; then + if ! mkl_command_check python "HAVE_PYTHON" "disable" "python -V"; then + mkl_err "disabling linker-script since python is not available" + mkl_mkvar_set WITH_LDS WITH_LDS "n" + fi + fi + + if [[ "$ENABLE_VALGRIND" == "y" ]]; then + mkl_compile_check valgrind WITH_VALGRIND disable CC "" \ + "#include <valgrind/memcheck.h>" + fi +} + http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/dev-conf.sh ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/dev-conf.sh b/thirdparty/librdkafka-0.11.4/dev-conf.sh new file mode 100755 index 0000000..c334f97 --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/dev-conf.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# +# Configure librdkafka for development + +set -e +./configure --clean + +# enable pedantic +#export CFLAGS='-std=c99 -pedantic -Wshadow' +#export CXXFLAGS='-std=c++98 -pedantic' + +# enable FSAN +#FSAN="-fsanitize=address" +#export CPPFLAGS="$CPPFLAGS $FSAN" +#export LDFLAGS="$LDFLAGS $FSAN" + +OPTS="" + +# enable devel asserts +OPTS="$OPTS --enable-devel" + +# disable optimizations +OPTS="$OPTS --disable-optimization" + +# gprof +#OPTS="$OPTS --enable-profiling --disable-optimization" + +# disable lz4 +#OPTS="$OPTS --disable-lz4" + +# disable cyrus-sasl +#OPTS="$OPTS --disable-sasl" + +# enable sharedptr debugging +#OPTS="$OPTS --enable-sharedptr-debug" + +#enable refcnt debugging +#OPTS="$OPTS --enable-refcnt-debug" + +echo "Devel configuration options: $OPTS" +./configure $OPTS + +make clean +make -j +(cd tests ; make -j build) http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7528d23e/thirdparty/librdkafka-0.11.4/examples/.gitignore ---------------------------------------------------------------------- diff --git a/thirdparty/librdkafka-0.11.4/examples/.gitignore b/thirdparty/librdkafka-0.11.4/examples/.gitignore new file mode 100644 index 0000000..3dc3aab --- /dev/null +++ b/thirdparty/librdkafka-0.11.4/examples/.gitignore @@ -0,0 +1,8 @@ +rdkafka_example +rdkafka_performance +rdkafka_example_cpp +rdkafka_consumer_example +rdkafka_consumer_example_cpp +kafkatest_verifiable_client +rdkafka_simple_producer +rdkafka_consume_batch
