├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── HEADER ├── LICENSE ├── NOTICE ├── README.md ├── Vagrantfile ├── bin ├── connect-distributed.sh ├── connect-standalone.sh ├── kafka-acls.sh ├── kafka-broker-api-versions.sh ├── kafka-configs.sh ├── kafka-console-consumer.sh ├── kafka-console-producer.sh ├── kafka-consumer-groups.sh ├── kafka-consumer-offset-checker.sh ├── kafka-consumer-perf-test.sh ├── kafka-delete-records.sh ├── kafka-mirror-maker.sh ├── kafka-preferred-replica-election.sh ├── kafka-producer-perf-test.sh ├── kafka-reassign-partitions.sh ├── kafka-replay-log-producer.sh ├── kafka-replica-verification.sh ├── kafka-run-class.sh ├── kafka-server-start.sh ├── kafka-server-stop.sh ├── kafka-simple-consumer-shell.sh ├── kafka-streams-application-reset.sh ├── kafka-topics.sh ├── kafka-verifiable-consumer.sh ├── kafka-verifiable-producer.sh ├── windows │ ├── connect-distributed.bat │ ├── connect-standalone.bat │ ├── kafka-acls.bat │ ├── kafka-broker-api-versions.bat │ ├── kafka-configs.bat │ ├── kafka-console-consumer.bat │ ├── kafka-console-producer.bat │ ├── kafka-consumer-groups.bat │ ├── kafka-consumer-offset-checker.bat │ ├── kafka-consumer-perf-test.bat │ ├── kafka-mirror-maker.bat │ ├── kafka-preferred-replica-election.bat │ ├── kafka-producer-perf-test.bat │ ├── kafka-reassign-partitions.bat │ ├── kafka-replay-log-producer.bat │ ├── kafka-replica-verification.bat │ ├── kafka-run-class.bat │ ├── kafka-server-start.bat │ ├── kafka-server-stop.bat │ ├── kafka-simple-consumer-shell.bat │ ├── kafka-topics.bat │ ├── zookeeper-server-start.bat │ ├── zookeeper-server-stop.bat │ └── zookeeper-shell.bat ├── zookeeper-security-migration.sh ├── zookeeper-server-start.sh ├── zookeeper-server-stop.sh └── zookeeper-shell.sh ├── build.gradle ├── checkstyle ├── checkstyle.xml ├── import-control-core.xml ├── import-control.xml ├── java.header └── suppressions.xml ├── clients ├── .gitignore └── src │ ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── kafka │ │ ├── clients │ │ ├── ApiVersions.java │ │ ├── ClientRequest.java │ │ ├── ClientResponse.java │ │ ├── ClientUtils.java │ │ ├── ClusterConnectionStates.java │ │ ├── CommonClientConfigs.java │ │ ├── ConnectionState.java │ │ ├── InFlightRequests.java │ │ ├── KafkaClient.java │ │ ├── ManualMetadataUpdater.java │ │ ├── Metadata.java │ │ ├── MetadataUpdater.java │ │ ├── NetworkClient.java │ │ ├── NetworkClientUtils.java │ │ ├── NodeApiVersions.java │ │ ├── RequestCompletionHandler.java │ │ ├── admin │ │ │ ├── AdminClient.java │ │ │ ├── AdminClientConfig.java │ │ │ ├── AlterConfigsOptions.java │ │ │ ├── AlterConfigsResult.java │ │ │ ├── Config.java │ │ │ ├── ConfigEntry.java │ │ │ ├── CreateAclsOptions.java │ │ │ ├── CreateAclsResult.java │ │ │ ├── CreateTopicsOptions.java │ │ │ ├── CreateTopicsResult.java │ │ │ ├── DeleteAclsOptions.java │ │ │ ├── DeleteAclsResult.java │ │ │ ├── DeleteTopicsOptions.java │ │ │ ├── DeleteTopicsResult.java │ │ │ ├── DescribeAclsOptions.java │ │ │ ├── DescribeAclsResult.java │ │ │ ├── DescribeClusterOptions.java │ │ │ ├── DescribeClusterResult.java │ │ │ ├── DescribeConfigsOptions.java │ │ │ ├── DescribeConfigsResult.java │ │ │ ├── DescribeTopicsOptions.java │ │ │ ├── DescribeTopicsResult.java │ │ │ ├── KafkaAdminClient.java │ │ │ ├── ListTopicsOptions.java │ │ │ ├── ListTopicsResult.java │ │ │ ├── NewTopic.java │ │ │ ├── TopicDescription.java │ │ │ └── TopicListing.java │ │ ├── consumer │ │ │ ├── CommitFailedException.java │ │ │ ├── Consumer.java │ │ │ ├── ConsumerConfig.java │ │ │ ├── ConsumerInterceptor.java │ │ │ ├── ConsumerRebalanceListener.java │ │ │ ├── ConsumerRecord.java │ │ │ ├── ConsumerRecords.java │ │ │ ├── InvalidOffsetException.java │ │ │ ├── KafkaConsumer.java │ │ │ ├── MockConsumer.java │ │ │ ├── NoOffsetForPartitionException.java │ │ │ ├── OffsetAndMetadata.java │ │ │ ├── OffsetAndTimestamp.java │ │ │ ├── OffsetCommitCallback.java │ │ │ ├── OffsetOutOfRangeException.java │ │ │ ├── OffsetResetStrategy.java │ │ │ ├── RangeAssignor.java │ │ │ ├── RetriableCommitFailedException.java │ │ │ ├── RoundRobinAssignor.java │ │ │ ├── StickyAssignor.java │ │ │ └── internals │ │ │ │ ├── AbstractCoordinator.java │ │ │ │ ├── AbstractPartitionAssignor.java │ │ │ │ ├── ConsumerCoordinator.java │ │ │ │ ├── ConsumerInterceptors.java │ │ │ │ ├── ConsumerMetrics.java │ │ │ │ ├── ConsumerNetworkClient.java │ │ │ │ ├── ConsumerProtocol.java │ │ │ │ ├── Fetcher.java │ │ │ │ ├── FetcherMetricsRegistry.java │ │ │ │ ├── Heartbeat.java │ │ │ │ ├── NoAvailableBrokersException.java │ │ │ │ ├── NoOpConsumerRebalanceListener.java │ │ │ │ ├── PartitionAssignor.java │ │ │ │ ├── RequestFuture.java │ │ │ │ ├── RequestFutureAdapter.java │ │ │ │ ├── RequestFutureListener.java │ │ │ │ ├── StaleMetadataException.java │ │ │ │ └── SubscriptionState.java │ │ └── producer │ │ │ ├── BufferExhaustedException.java │ │ │ ├── Callback.java │ │ │ ├── KafkaProducer.java │ │ │ ├── MockProducer.java │ │ │ ├── Partitioner.java │ │ │ ├── Producer.java │ │ │ ├── ProducerConfig.java │ │ │ ├── ProducerInterceptor.java │ │ │ ├── ProducerRecord.java │ │ │ ├── RecordMetadata.java │ │ │ └── internals │ │ │ ├── BufferPool.java │ │ │ ├── DefaultPartitioner.java │ │ │ ├── ErrorLoggingCallback.java │ │ │ ├── FutureRecordMetadata.java │ │ │ ├── IncompleteBatches.java │ │ │ ├── ProduceRequestResult.java │ │ │ ├── ProducerBatch.java │ │ │ ├── ProducerIdAndEpoch.java │ │ │ ├── ProducerInterceptors.java │ │ │ ├── RecordAccumulator.java │ │ │ ├── Sender.java │ │ │ ├── TransactionManager.java │ │ │ └── TransactionalRequestResult.java │ │ ├── common │ │ ├── Cluster.java │ │ ├── ClusterResource.java │ │ ├── ClusterResourceListener.java │ │ ├── Configurable.java │ │ ├── KafkaException.java │ │ ├── KafkaFuture.java │ │ ├── Metric.java │ │ ├── MetricName.java │ │ ├── MetricNameTemplate.java │ │ ├── Node.java │ │ ├── PartitionInfo.java │ │ ├── TopicPartition.java │ │ ├── TopicPartitionInfo.java │ │ ├── acl │ │ │ ├── AccessControlEntry.java │ │ │ ├── AccessControlEntryData.java │ │ │ ├── AccessControlEntryFilter.java │ │ │ ├── AclBinding.java │ │ │ ├── AclBindingFilter.java │ │ │ ├── AclOperation.java │ │ │ └── AclPermissionType.java │ │ ├── annotation │ │ │ └── InterfaceStability.java │ │ ├── cache │ │ │ ├── Cache.java │ │ │ ├── LRUCache.java │ │ │ └── SynchronizedCache.java │ │ ├── config │ │ │ ├── AbstractConfig.java │ │ │ ├── Config.java │ │ │ ├── ConfigDef.java │ │ │ ├── ConfigException.java │ │ │ ├── ConfigResource.java │ │ │ ├── ConfigValue.java │ │ │ ├── SaslConfigs.java │ │ │ ├── SslConfigs.java │ │ │ ├── TopicConfig.java │ │ │ └── types │ │ │ │ └── Password.java │ │ ├── errors │ │ │ ├── ApiException.java │ │ │ ├── AuthenticationException.java │ │ │ ├── AuthorizationException.java │ │ │ ├── BrokerNotAvailableException.java │ │ │ ├── ClusterAuthorizationException.java │ │ │ ├── ConcurrentTransactionsException.java │ │ │ ├── ControllerMovedException.java │ │ │ ├── CoordinatorLoadInProgressException.java │ │ │ ├── CoordinatorNotAvailableException.java │ │ │ ├── CorruptRecordException.java │ │ │ ├── DisconnectException.java │ │ │ ├── DuplicateSequenceNumberException.java │ │ │ ├── GroupAuthorizationException.java │ │ │ ├── GroupCoordinatorNotAvailableException.java │ │ │ ├── GroupLoadInProgressException.java │ │ │ ├── IllegalGenerationException.java │ │ │ ├── IllegalSaslStateException.java │ │ │ ├── InconsistentGroupProtocolException.java │ │ │ ├── InterruptException.java │ │ │ ├── InvalidCommitOffsetSizeException.java │ │ │ ├── InvalidConfigurationException.java │ │ │ ├── InvalidFetchSizeException.java │ │ │ ├── InvalidGroupIdException.java │ │ │ ├── InvalidMetadataException.java │ │ │ ├── InvalidOffsetException.java │ │ │ ├── InvalidPartitionsException.java │ │ │ ├── InvalidPidMappingException.java │ │ │ ├── InvalidReplicaAssignmentException.java │ │ │ ├── InvalidReplicationFactorException.java │ │ │ ├── InvalidRequestException.java │ │ │ ├── InvalidRequiredAcksException.java │ │ │ ├── InvalidSessionTimeoutException.java │ │ │ ├── InvalidTimestampException.java │ │ │ ├── InvalidTopicException.java │ │ │ ├── InvalidTxnStateException.java │ │ │ ├── InvalidTxnTimeoutException.java │ │ │ ├── LeaderNotAvailableException.java │ │ │ ├── NetworkException.java │ │ │ ├── NotControllerException.java │ │ │ ├── NotCoordinatorException.java │ │ │ ├── NotCoordinatorForGroupException.java │ │ │ ├── NotEnoughReplicasAfterAppendException.java │ │ │ ├── NotEnoughReplicasException.java │ │ │ ├── NotLeaderForPartitionException.java │ │ │ ├── OffsetMetadataTooLarge.java │ │ │ ├── OffsetOutOfRangeException.java │ │ │ ├── OperationNotAttemptedException.java │ │ │ ├── OutOfOrderSequenceException.java │ │ │ ├── PolicyViolationException.java │ │ │ ├── ProducerFencedException.java │ │ │ ├── RebalanceInProgressException.java │ │ │ ├── RecordBatchTooLargeException.java │ │ │ ├── RecordTooLargeException.java │ │ │ ├── ReplicaNotAvailableException.java │ │ │ ├── RetriableException.java │ │ │ ├── SecurityDisabledException.java │ │ │ ├── SerializationException.java │ │ │ ├── TimeoutException.java │ │ │ ├── TopicAuthorizationException.java │ │ │ ├── TopicExistsException.java │ │ │ ├── TransactionCoordinatorFencedException.java │ │ │ ├── TransactionalIdAuthorizationException.java │ │ │ ├── UnknownMemberIdException.java │ │ │ ├── UnknownServerException.java │ │ │ ├── UnknownTopicOrPartitionException.java │ │ │ ├── UnsupportedForMessageFormatException.java │ │ │ ├── UnsupportedSaslMechanismException.java │ │ │ ├── UnsupportedVersionException.java │ │ │ └── WakeupException.java │ │ ├── header │ │ │ ├── Header.java │ │ │ ├── Headers.java │ │ │ └── internals │ │ │ │ ├── RecordHeader.java │ │ │ │ └── RecordHeaders.java │ │ ├── internals │ │ │ ├── ClusterResourceListeners.java │ │ │ ├── FatalExitError.java │ │ │ ├── KafkaFutureImpl.java │ │ │ ├── PartitionStates.java │ │ │ └── Topic.java │ │ ├── metrics │ │ │ ├── CompoundStat.java │ │ │ ├── JmxReporter.java │ │ │ ├── KafkaMetric.java │ │ │ ├── Measurable.java │ │ │ ├── MeasurableStat.java │ │ │ ├── MetricConfig.java │ │ │ ├── Metrics.java │ │ │ ├── MetricsReporter.java │ │ │ ├── Quota.java │ │ │ ├── QuotaViolationException.java │ │ │ ├── Sensor.java │ │ │ ├── Stat.java │ │ │ └── stats │ │ │ │ ├── Avg.java │ │ │ │ ├── Count.java │ │ │ │ ├── Histogram.java │ │ │ │ ├── Max.java │ │ │ │ ├── Min.java │ │ │ │ ├── Percentile.java │ │ │ │ ├── Percentiles.java │ │ │ │ ├── Rate.java │ │ │ │ ├── SampledStat.java │ │ │ │ ├── SimpleRate.java │ │ │ │ ├── Sum.java │ │ │ │ ├── Total.java │ │ │ │ └── Value.java │ │ ├── network │ │ │ ├── Authenticator.java │ │ │ ├── ByteBufferSend.java │ │ │ ├── ChannelBuilder.java │ │ │ ├── ChannelBuilders.java │ │ │ ├── ChannelState.java │ │ │ ├── DefaultAuthenticator.java │ │ │ ├── InvalidReceiveException.java │ │ │ ├── KafkaChannel.java │ │ │ ├── ListenerName.java │ │ │ ├── Mode.java │ │ │ ├── MultiSend.java │ │ │ ├── NetworkReceive.java │ │ │ ├── NetworkSend.java │ │ │ ├── PlaintextChannelBuilder.java │ │ │ ├── PlaintextTransportLayer.java │ │ │ ├── Receive.java │ │ │ ├── SaslChannelBuilder.java │ │ │ ├── Selectable.java │ │ │ ├── Selector.java │ │ │ ├── Send.java │ │ │ ├── SslChannelBuilder.java │ │ │ ├── SslTransportLayer.java │ │ │ ├── TransportLayer.java │ │ │ └── TransportLayers.java │ │ ├── protocol │ │ │ ├── ApiKeys.java │ │ │ ├── Errors.java │ │ │ ├── Protocol.java │ │ │ ├── SecurityProtocol.java │ │ │ └── types │ │ │ │ ├── ArrayOf.java │ │ │ │ ├── Field.java │ │ │ │ ├── Schema.java │ │ │ │ ├── SchemaException.java │ │ │ │ ├── Struct.java │ │ │ │ └── Type.java │ │ ├── record │ │ │ ├── AbstractLegacyRecordBatch.java │ │ │ ├── AbstractRecordBatch.java │ │ │ ├── AbstractRecords.java │ │ │ ├── BufferSupplier.java │ │ │ ├── ByteBufferLogInputStream.java │ │ │ ├── CompressionRatioEstimator.java │ │ │ ├── CompressionType.java │ │ │ ├── ControlRecordType.java │ │ │ ├── DefaultRecord.java │ │ │ ├── DefaultRecordBatch.java │ │ │ ├── EndTransactionMarker.java │ │ │ ├── FileLogInputStream.java │ │ │ ├── FileRecords.java │ │ │ ├── InvalidRecordException.java │ │ │ ├── KafkaLZ4BlockInputStream.java │ │ │ ├── KafkaLZ4BlockOutputStream.java │ │ │ ├── LegacyRecord.java │ │ │ ├── LogInputStream.java │ │ │ ├── MemoryRecords.java │ │ │ ├── MemoryRecordsBuilder.java │ │ │ ├── MutableRecordBatch.java │ │ │ ├── Record.java │ │ │ ├── RecordBatch.java │ │ │ ├── RecordBatchIterator.java │ │ │ ├── Records.java │ │ │ ├── SimpleRecord.java │ │ │ └── TimestampType.java │ │ ├── requests │ │ │ ├── AbstractRequest.java │ │ │ ├── AbstractRequestResponse.java │ │ │ ├── AbstractResponse.java │ │ │ ├── AddOffsetsToTxnRequest.java │ │ │ ├── AddOffsetsToTxnResponse.java │ │ │ ├── AddPartitionsToTxnRequest.java │ │ │ ├── AddPartitionsToTxnResponse.java │ │ │ ├── AlterConfigsRequest.java │ │ │ ├── AlterConfigsResponse.java │ │ │ ├── ApiError.java │ │ │ ├── ApiVersionsRequest.java │ │ │ ├── ApiVersionsResponse.java │ │ │ ├── ControlledShutdownRequest.java │ │ │ ├── ControlledShutdownResponse.java │ │ │ ├── CreateAclsRequest.java │ │ │ ├── CreateAclsResponse.java │ │ │ ├── CreateTopicsRequest.java │ │ │ ├── CreateTopicsResponse.java │ │ │ ├── DeleteAclsRequest.java │ │ │ ├── DeleteAclsResponse.java │ │ │ ├── DeleteRecordsRequest.java │ │ │ ├── DeleteRecordsResponse.java │ │ │ ├── DeleteTopicsRequest.java │ │ │ ├── DeleteTopicsResponse.java │ │ │ ├── DescribeAclsRequest.java │ │ │ ├── DescribeAclsResponse.java │ │ │ ├── DescribeConfigsRequest.java │ │ │ ├── DescribeConfigsResponse.java │ │ │ ├── DescribeGroupsRequest.java │ │ │ ├── DescribeGroupsResponse.java │ │ │ ├── EndTxnRequest.java │ │ │ ├── EndTxnResponse.java │ │ │ ├── EpochEndOffset.java │ │ │ ├── FetchRequest.java │ │ │ ├── FetchResponse.java │ │ │ ├── FindCoordinatorRequest.java │ │ │ ├── FindCoordinatorResponse.java │ │ │ ├── HeartbeatRequest.java │ │ │ ├── HeartbeatResponse.java │ │ │ ├── InitProducerIdRequest.java │ │ │ ├── InitProducerIdResponse.java │ │ │ ├── IsolationLevel.java │ │ │ ├── JoinGroupRequest.java │ │ │ ├── JoinGroupResponse.java │ │ │ ├── LeaderAndIsrRequest.java │ │ │ ├── LeaderAndIsrResponse.java │ │ │ ├── LeaveGroupRequest.java │ │ │ ├── LeaveGroupResponse.java │ │ │ ├── ListGroupsRequest.java │ │ │ ├── ListGroupsResponse.java │ │ │ ├── ListOffsetRequest.java │ │ │ ├── ListOffsetResponse.java │ │ │ ├── MetadataRequest.java │ │ │ ├── MetadataResponse.java │ │ │ ├── OffsetCommitRequest.java │ │ │ ├── OffsetCommitResponse.java │ │ │ ├── OffsetFetchRequest.java │ │ │ ├── OffsetFetchResponse.java │ │ │ ├── OffsetsForLeaderEpochRequest.java │ │ │ ├── OffsetsForLeaderEpochResponse.java │ │ │ ├── PartitionState.java │ │ │ ├── ProduceRequest.java │ │ │ ├── ProduceResponse.java │ │ │ ├── RecordsSend.java │ │ │ ├── RequestAndSize.java │ │ │ ├── RequestHeader.java │ │ │ ├── RequestUtils.java │ │ │ ├── Resource.java │ │ │ ├── ResourceType.java │ │ │ ├── ResponseHeader.java │ │ │ ├── SaslHandshakeRequest.java │ │ │ ├── SaslHandshakeResponse.java │ │ │ ├── StopReplicaRequest.java │ │ │ ├── StopReplicaResponse.java │ │ │ ├── SyncGroupRequest.java │ │ │ ├── SyncGroupResponse.java │ │ │ ├── TransactionResult.java │ │ │ ├── TxnOffsetCommitRequest.java │ │ │ ├── TxnOffsetCommitResponse.java │ │ │ ├── UpdateMetadataRequest.java │ │ │ ├── UpdateMetadataResponse.java │ │ │ ├── WriteTxnMarkersRequest.java │ │ │ └── WriteTxnMarkersResponse.java │ │ ├── resource │ │ │ ├── Resource.java │ │ │ ├── ResourceFilter.java │ │ │ └── ResourceType.java │ │ ├── security │ │ │ ├── JaasConfig.java │ │ │ ├── JaasContext.java │ │ │ ├── JaasUtils.java │ │ │ ├── auth │ │ │ │ ├── AuthCallbackHandler.java │ │ │ │ ├── DefaultPrincipalBuilder.java │ │ │ │ ├── KafkaPrincipal.java │ │ │ │ ├── Login.java │ │ │ │ └── PrincipalBuilder.java │ │ │ ├── authenticator │ │ │ │ ├── AbstractLogin.java │ │ │ │ ├── CredentialCache.java │ │ │ │ ├── DefaultLogin.java │ │ │ │ ├── LoginManager.java │ │ │ │ ├── SaslClientAuthenticator.java │ │ │ │ ├── SaslClientCallbackHandler.java │ │ │ │ ├── SaslServerAuthenticator.java │ │ │ │ └── SaslServerCallbackHandler.java │ │ │ ├── kerberos │ │ │ │ ├── BadFormatString.java │ │ │ │ ├── KerberosLogin.java │ │ │ │ ├── KerberosName.java │ │ │ │ ├── KerberosRule.java │ │ │ │ ├── KerberosShortNamer.java │ │ │ │ └── NoMatchingRule.java │ │ │ ├── plain │ │ │ │ ├── PlainLoginModule.java │ │ │ │ ├── PlainSaslServer.java │ │ │ │ └── PlainSaslServerProvider.java │ │ │ ├── scram │ │ │ │ ├── ScramCredential.java │ │ │ │ ├── ScramCredentialCallback.java │ │ │ │ ├── ScramCredentialUtils.java │ │ │ │ ├── ScramFormatter.java │ │ │ │ ├── ScramLoginModule.java │ │ │ │ ├── ScramMechanism.java │ │ │ │ ├── ScramMessages.java │ │ │ │ ├── ScramSaslClient.java │ │ │ │ ├── ScramSaslClientProvider.java │ │ │ │ ├── ScramSaslServer.java │ │ │ │ ├── ScramSaslServerProvider.java │ │ │ │ └── ScramServerCallbackHandler.java │ │ │ └── ssl │ │ │ │ └── SslFactory.java │ │ ├── serialization │ │ │ ├── ByteArrayDeserializer.java │ │ │ ├── ByteArraySerializer.java │ │ │ ├── ByteBufferDeserializer.java │ │ │ ├── ByteBufferSerializer.java │ │ │ ├── BytesDeserializer.java │ │ │ ├── BytesSerializer.java │ │ │ ├── Deserializer.java │ │ │ ├── DoubleDeserializer.java │ │ │ ├── DoubleSerializer.java │ │ │ ├── ExtendedDeserializer.java │ │ │ ├── ExtendedSerializer.java │ │ │ ├── FloatDeserializer.java │ │ │ ├── FloatSerializer.java │ │ │ ├── IntegerDeserializer.java │ │ │ ├── IntegerSerializer.java │ │ │ ├── LongDeserializer.java │ │ │ ├── LongSerializer.java │ │ │ ├── Serde.java │ │ │ ├── Serdes.java │ │ │ ├── Serializer.java │ │ │ ├── ShortDeserializer.java │ │ │ ├── ShortSerializer.java │ │ │ ├── StringDeserializer.java │ │ │ └── StringSerializer.java │ │ └── utils │ │ │ ├── AbstractIterator.java │ │ │ ├── AppInfoParser.java │ │ │ ├── ByteBufferInputStream.java │ │ │ ├── ByteBufferOutputStream.java │ │ │ ├── ByteUtils.java │ │ │ ├── Bytes.java │ │ │ ├── Checksums.java │ │ │ ├── CircularIterator.java │ │ │ ├── CloseableIterator.java │ │ │ ├── CollectionUtils.java │ │ │ ├── CopyOnWriteMap.java │ │ │ ├── Crc32.java │ │ │ ├── Crc32C.java │ │ │ ├── Exit.java │ │ │ ├── Java.java │ │ │ ├── KafkaThread.java │ │ │ ├── OperatingSystem.java │ │ │ ├── PureJavaCrc32C.java │ │ │ ├── Shell.java │ │ │ ├── SystemTime.java │ │ │ ├── Time.java │ │ │ └── Utils.java │ │ └── server │ │ └── policy │ │ ├── AlterConfigPolicy.java │ │ └── CreateTopicPolicy.java │ └── test │ ├── java │ └── org │ │ └── apache │ │ └── kafka │ │ ├── clients │ │ ├── ApiVersionsTest.java │ │ ├── ClientUtilsTest.java │ │ ├── CommonClientConfigsTest.java │ │ ├── MetadataTest.java │ │ ├── MockClient.java │ │ ├── NetworkClientTest.java │ │ ├── NodeApiVersionsTest.java │ │ ├── admin │ │ │ ├── KafkaAdminClientTest.java │ │ │ └── MockKafkaAdminClientEnv.java │ │ ├── consumer │ │ │ ├── ConsumerConfigTest.java │ │ │ ├── ConsumerRecordTest.java │ │ │ ├── ConsumerRecordsTest.java │ │ │ ├── KafkaConsumerTest.java │ │ │ ├── MockConsumerTest.java │ │ │ ├── RangeAssignorTest.java │ │ │ ├── RoundRobinAssignorTest.java │ │ │ ├── SerializeCompatibilityOffsetAndMetadataTest.java │ │ │ ├── StickyAssignorTest.java │ │ │ └── internals │ │ │ │ ├── AbstractCoordinatorTest.java │ │ │ │ ├── ConsumerCoordinatorTest.java │ │ │ │ ├── ConsumerInterceptorsTest.java │ │ │ │ ├── ConsumerNetworkClientTest.java │ │ │ │ ├── ConsumerProtocolTest.java │ │ │ │ ├── FetcherTest.java │ │ │ │ ├── HeartbeatTest.java │ │ │ │ ├── MockPartitionAssignor.java │ │ │ │ ├── RequestFutureTest.java │ │ │ │ └── SubscriptionStateTest.java │ │ └── producer │ │ │ ├── KafkaProducerTest.java │ │ │ ├── MockProducerTest.java │ │ │ ├── ProducerRecordTest.java │ │ │ ├── RecordMetadataTest.java │ │ │ ├── RecordSendTest.java │ │ │ └── internals │ │ │ ├── BufferPoolTest.java │ │ │ ├── DefaultPartitionerTest.java │ │ │ ├── ProducerBatchTest.java │ │ │ ├── ProducerInterceptorsTest.java │ │ │ ├── RecordAccumulatorTest.java │ │ │ ├── SenderTest.java │ │ │ └── TransactionManagerTest.java │ │ ├── common │ │ ├── ClusterTest.java │ │ ├── KafkaFutureTest.java │ │ ├── PartitionInfoTest.java │ │ ├── SerializeCompatibilityTopicPartitionTest.java │ │ ├── acl │ │ │ ├── AclBindingTest.java │ │ │ ├── AclOperationTest.java │ │ │ └── AclPermissionTypeTest.java │ │ ├── cache │ │ │ └── LRUCacheTest.java │ │ ├── config │ │ │ ├── AbstractConfigTest.java │ │ │ └── ConfigDefTest.java │ │ ├── header │ │ │ └── internals │ │ │ │ └── RecordHeadersTest.java │ │ ├── internals │ │ │ ├── PartitionStatesTest.java │ │ │ └── TopicTest.java │ │ ├── metrics │ │ │ ├── FakeMetricsReporter.java │ │ │ ├── JmxReporterTest.java │ │ │ ├── MetricsTest.java │ │ │ ├── SampleMetrics.java │ │ │ ├── SensorTest.java │ │ │ └── stats │ │ │ │ └── HistogramTest.java │ │ ├── network │ │ │ ├── CertStores.java │ │ │ ├── EchoServer.java │ │ │ ├── NetworkTestUtils.java │ │ │ ├── NioEchoServer.java │ │ │ ├── SelectorTest.java │ │ │ ├── SslSelectorTest.java │ │ │ └── SslTransportLayerTest.java │ │ ├── protocol │ │ │ ├── ApiKeysTest.java │ │ │ ├── ErrorsTest.java │ │ │ └── types │ │ │ │ └── ProtocolSerializationTest.java │ │ ├── record │ │ │ ├── AbstractLegacyRecordBatchTest.java │ │ │ ├── ByteBufferLogInputStreamTest.java │ │ │ ├── CompressionTypeTest.java │ │ │ ├── ControlRecordTypeTest.java │ │ │ ├── DefaultRecordBatchTest.java │ │ │ ├── DefaultRecordTest.java │ │ │ ├── EndTransactionMarkerTest.java │ │ │ ├── FileLogInputStreamTest.java │ │ │ ├── FileRecordsTest.java │ │ │ ├── KafkaLZ4Test.java │ │ │ ├── LegacyRecordTest.java │ │ │ ├── MemoryRecordsBuilderTest.java │ │ │ ├── MemoryRecordsTest.java │ │ │ └── SimpleLegacyRecordTest.java │ │ ├── requests │ │ │ ├── ApiVersionsResponseTest.java │ │ │ ├── ByteBufferChannel.java │ │ │ ├── ProduceRequestTest.java │ │ │ └── RequestResponseTest.java │ │ ├── resource │ │ │ └── ResourceTypeTest.java │ │ ├── security │ │ │ ├── JaasContextTest.java │ │ │ ├── TestSecurityConfig.java │ │ │ ├── auth │ │ │ │ └── KafkaPrincipalTest.java │ │ │ ├── authenticator │ │ │ │ ├── SaslAuthenticatorTest.java │ │ │ │ ├── TestDigestLoginModule.java │ │ │ │ └── TestJaasConfig.java │ │ │ ├── kerberos │ │ │ │ └── KerberosNameTest.java │ │ │ ├── scram │ │ │ │ ├── ScramCredentialUtilsTest.java │ │ │ │ ├── ScramFormatterTest.java │ │ │ │ └── ScramMessagesTest.java │ │ │ └── ssl │ │ │ │ └── SslFactoryTest.java │ │ ├── serialization │ │ │ └── SerializationTest.java │ │ └── utils │ │ │ ├── AbstractIteratorTest.java │ │ │ ├── ByteBufferOutputStreamTest.java │ │ │ ├── ByteUtilsTest.java │ │ │ ├── ChecksumsTest.java │ │ │ ├── Crc32CTest.java │ │ │ ├── Crc32Test.java │ │ │ ├── JavaTest.java │ │ │ ├── MockTime.java │ │ │ ├── Serializer.java │ │ │ ├── ShellTest.java │ │ │ └── UtilsTest.java │ │ └── test │ │ ├── DelayedReceive.java │ │ ├── IntegrationTest.java │ │ ├── MetricsBench.java │ │ ├── Microbenchmarks.java │ │ ├── MockClusterResourceListener.java │ │ ├── MockConsumerInterceptor.java │ │ ├── MockDeserializer.java │ │ ├── MockMetricsReporter.java │ │ ├── MockPartitioner.java │ │ ├── MockProducerInterceptor.java │ │ ├── MockSelector.java │ │ ├── MockSerializer.java │ │ ├── TestCondition.java │ │ ├── TestSslUtils.java │ │ └── TestUtils.java │ └── resources │ ├── log4j.properties │ └── serializedData │ ├── offsetAndMetadataSerializedfile │ └── topicPartitionSerializedfile ├── config ├── connect-console-sink.properties ├── connect-console-source.properties ├── connect-distributed.properties ├── connect-file-sink.properties ├── connect-file-source.properties ├── connect-log4j.properties ├── connect-standalone.properties ├── consumer.properties ├── log4j.properties ├── producer.properties ├── server.properties ├── tools-log4j.properties └── zookeeper.properties ├── connect ├── api │ ├── .gitignore │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── apache │ │ │ └── kafka │ │ │ └── connect │ │ │ ├── connector │ │ │ ├── ConnectRecord.java │ │ │ ├── Connector.java │ │ │ ├── ConnectorContext.java │ │ │ └── Task.java │ │ │ ├── data │ │ │ ├── ConnectSchema.java │ │ │ ├── Date.java │ │ │ ├── Decimal.java │ │ │ ├── Field.java │ │ │ ├── Schema.java │ │ │ ├── SchemaAndValue.java │ │ │ ├── SchemaBuilder.java │ │ │ ├── SchemaProjector.java │ │ │ ├── Struct.java │ │ │ ├── Time.java │ │ │ └── Timestamp.java │ │ │ ├── errors │ │ │ ├── AlreadyExistsException.java │ │ │ ├── ConnectException.java │ │ │ ├── DataException.java │ │ │ ├── IllegalWorkerStateException.java │ │ │ ├── NotFoundException.java │ │ │ ├── RetriableException.java │ │ │ ├── SchemaBuilderException.java │ │ │ └── SchemaProjectorException.java │ │ │ ├── sink │ │ │ ├── SinkConnector.java │ │ │ ├── SinkRecord.java │ │ │ ├── SinkTask.java │ │ │ └── SinkTaskContext.java │ │ │ ├── source │ │ │ ├── SourceConnector.java │ │ │ ├── SourceRecord.java │ │ │ ├── SourceTask.java │ │ │ └── SourceTaskContext.java │ │ │ ├── storage │ │ │ ├── Converter.java │ │ │ ├── OffsetStorageReader.java │ │ │ └── StringConverter.java │ │ │ ├── transforms │ │ │ └── Transformation.java │ │ │ └── util │ │ │ └── ConnectorUtils.java │ │ └── test │ │ └── java │ │ └── org │ │ └── apache │ │ └── kafka │ │ └── connect │ │ ├── connector │ │ └── ConnectorReconfigurationTest.java │ │ ├── data │ │ ├── ConnectSchemaTest.java │ │ ├── DateTest.java │ │ ├── DecimalTest.java │ │ ├── FakeSchema.java │ │ ├── FieldTest.java │ │ ├── SchemaBuilderTest.java │ │ ├── SchemaProjectorTest.java │ │ ├── StructTest.java │ │ ├── TimeTest.java │ │ └── TimestampTest.java │ │ ├── storage │ │ └── StringConverterTest.java │ │ └── util │ │ └── ConnectorUtilsTest.java ├── file │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── apache │ │ │ └── kafka │ │ │ └── connect │ │ │ └── file │ │ │ ├── FileStreamSinkConnector.java │ │ │ ├── FileStreamSinkTask.java │ │ │ ├── FileStreamSourceConnector.java │ │ │ └── FileStreamSourceTask.java │ │ └── test │ │ └── java │ │ └── org │ │ └── apache │ │ └── kafka │ │ └── connect │ │ └── file │ │ ├── FileStreamSinkConnectorTest.java │ │ ├── FileStreamSinkTaskTest.java │ │ ├── FileStreamSourceConnectorTest.java │ │ └── FileStreamSourceTaskTest.java ├── json │ ├── .gitignore │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── apache │ │ │ └── kafka │ │ │ └── connect │ │ │ └── json │ │ │ ├── JsonConverter.java │ │ │ ├── JsonDeserializer.java │ │ │ ├── JsonSchema.java │ │ │ └── JsonSerializer.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── apache │ │ │ └── kafka │ │ │ └── connect │ │ │ └── json │ │ │ └── JsonConverterTest.java │ │ └── resources │ │ └── connect-test.properties ├── runtime │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── apache │ │ │ └── kafka │ │ │ └── connect │ │ │ ├── cli │ │ │ ├── ConnectDistributed.java │ │ │ └── ConnectStandalone.java │ │ │ ├── converters │ │ │ └── ByteArrayConverter.java │ │ │ ├── runtime │ │ │ ├── AbstractHerder.java │ │ │ ├── AbstractStatus.java │ │ │ ├── Connect.java │ │ │ ├── ConnectorConfig.java │ │ │ ├── ConnectorStatus.java │ │ │ ├── Herder.java │ │ │ ├── HerderConnectorContext.java │ │ │ ├── SinkConnectorConfig.java │ │ │ ├── SourceConnectorConfig.java │ │ │ ├── SourceTaskOffsetCommitter.java │ │ │ ├── TargetState.java │ │ │ ├── TaskConfig.java │ │ │ ├── TaskStatus.java │ │ │ ├── TransformationChain.java │ │ │ ├── Worker.java │ │ │ ├── WorkerConfig.java │ │ │ ├── WorkerConnector.java │ │ │ ├── WorkerSinkTask.java │ │ │ ├── WorkerSinkTaskContext.java │ │ │ ├── WorkerSourceTask.java │ │ │ ├── WorkerSourceTaskContext.java │ │ │ ├── WorkerTask.java │ │ │ ├── distributed │ │ │ │ ├── ClusterConfigState.java │ │ │ │ ├── ConnectProtocol.java │ │ │ │ ├── DistributedConfig.java │ │ │ │ ├── DistributedHerder.java │ │ │ │ ├── NotAssignedException.java │ │ │ │ ├── NotLeaderException.java │ │ │ │ ├── RebalanceNeededException.java │ │ │ │ ├── RequestTargetException.java │ │ │ │ ├── WorkerCoordinator.java │ │ │ │ ├── WorkerGroupMember.java │ │ │ │ └── WorkerRebalanceListener.java │ │ │ ├── isolation │ │ │ │ ├── DelegatingClassLoader.java │ │ │ │ ├── PluginClassLoader.java │ │ │ │ ├── PluginDesc.java │ │ │ │ ├── PluginScanResult.java │ │ │ │ ├── PluginType.java │ │ │ │ ├── PluginUtils.java │ │ │ │ └── Plugins.java │ │ │ ├── rest │ │ │ │ ├── RestServer.java │ │ │ │ ├── entities │ │ │ │ │ ├── ConfigInfo.java │ │ │ │ │ ├── ConfigInfos.java │ │ │ │ │ ├── ConfigKeyInfo.java │ │ │ │ │ ├── ConfigValueInfo.java │ │ │ │ │ ├── ConnectorInfo.java │ │ │ │ │ ├── ConnectorPluginInfo.java │ │ │ │ │ ├── ConnectorStateInfo.java │ │ │ │ │ ├── ConnectorType.java │ │ │ │ │ ├── CreateConnectorRequest.java │ │ │ │ │ ├── ErrorMessage.java │ │ │ │ │ ├── ServerInfo.java │ │ │ │ │ └── TaskInfo.java │ │ │ │ ├── errors │ │ │ │ │ ├── BadRequestException.java │ │ │ │ │ ├── ConnectExceptionMapper.java │ │ │ │ │ └── ConnectRestException.java │ │ │ │ └── resources │ │ │ │ │ ├── ConnectorPluginsResource.java │ │ │ │ │ ├── ConnectorsResource.java │ │ │ │ │ └── RootResource.java │ │ │ └── standalone │ │ │ │ ├── StandaloneConfig.java │ │ │ │ └── StandaloneHerder.java │ │ │ ├── storage │ │ │ ├── ConfigBackingStore.java │ │ │ ├── FileOffsetBackingStore.java │ │ │ ├── KafkaConfigBackingStore.java │ │ │ ├── KafkaOffsetBackingStore.java │ │ │ ├── KafkaStatusBackingStore.java │ │ │ ├── MemoryConfigBackingStore.java │ │ │ ├── MemoryOffsetBackingStore.java │ │ │ ├── MemoryStatusBackingStore.java │ │ │ ├── OffsetBackingStore.java │ │ │ ├── OffsetStorageReaderImpl.java │ │ │ ├── OffsetStorageWriter.java │ │ │ ├── OffsetUtils.java │ │ │ └── StatusBackingStore.java │ │ │ ├── tools │ │ │ ├── MockConnector.java │ │ │ ├── MockSinkConnector.java │ │ │ ├── MockSinkTask.java │ │ │ ├── MockSourceConnector.java │ │ │ ├── MockSourceTask.java │ │ │ ├── SchemaSourceConnector.java │ │ │ ├── SchemaSourceTask.java │ │ │ ├── TransformationDoc.java │ │ │ ├── VerifiableSinkConnector.java │ │ │ ├── VerifiableSinkTask.java │ │ │ ├── VerifiableSourceConnector.java │ │ │ └── VerifiableSourceTask.java │ │ │ └── util │ │ │ ├── Callback.java │ │ │ ├── ConnectUtils.java │ │ │ ├── ConnectorTaskId.java │ │ │ ├── ConvertingFutureCallback.java │ │ │ ├── FutureCallback.java │ │ │ ├── KafkaBasedLog.java │ │ │ ├── ReflectionsUtil.java │ │ │ ├── ShutdownableThread.java │ │ │ ├── SinkUtils.java │ │ │ ├── Table.java │ │ │ └── TopicAdmin.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── apache │ │ │ └── kafka │ │ │ └── connect │ │ │ ├── converters │ │ │ └── ByteArrayConverterTest.java │ │ │ ├── runtime │ │ │ ├── AbstractHerderTest.java │ │ │ ├── ConnectorConfigTest.java │ │ │ ├── SourceTaskOffsetCommitterTest.java │ │ │ ├── TestSinkConnector.java │ │ │ ├── TestSourceConnector.java │ │ │ ├── TransformationConfigTest.java │ │ │ ├── WorkerConnectorTest.java │ │ │ ├── WorkerSinkTaskTest.java │ │ │ ├── WorkerSinkTaskThreadedTest.java │ │ │ ├── WorkerSourceTaskTest.java │ │ │ ├── WorkerTaskTest.java │ │ │ ├── WorkerTest.java │ │ │ ├── distributed │ │ │ │ ├── DistributedHerderTest.java │ │ │ │ └── WorkerCoordinatorTest.java │ │ │ ├── isolation │ │ │ │ ├── PluginDescTest.java │ │ │ │ └── PluginUtilsTest.java │ │ │ ├── rest │ │ │ │ ├── RestServerTest.java │ │ │ │ ├── entities │ │ │ │ │ └── ConnectorTypeTest.java │ │ │ │ └── resources │ │ │ │ │ ├── ConnectorPluginsResourceTest.java │ │ │ │ │ └── ConnectorsResourceTest.java │ │ │ └── standalone │ │ │ │ └── StandaloneHerderTest.java │ │ │ ├── storage │ │ │ ├── FileOffsetBackingStoreTest.java │ │ │ ├── KafkaConfigBackingStoreTest.java │ │ │ ├── KafkaOffsetBackingStoreTest.java │ │ │ ├── KafkaStatusBackingStoreTest.java │ │ │ ├── MemoryStatusBackingStoreTest.java │ │ │ └── OffsetStorageWriterTest.java │ │ │ └── util │ │ │ ├── ByteArrayProducerRecordEquals.java │ │ │ ├── KafkaBasedLogTest.java │ │ │ ├── MockTime.java │ │ │ ├── ShutdownableThreadTest.java │ │ │ ├── TableTest.java │ │ │ ├── TestBackgroundThreadExceptionHandler.java │ │ │ ├── TestFuture.java │ │ │ ├── ThreadedTest.java │ │ │ └── TopicAdminTest.java │ │ └── resources │ │ └── log4j.properties └── transforms │ └── src │ ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── kafka │ │ └── connect │ │ └── transforms │ │ ├── Cast.java │ │ ├── ExtractField.java │ │ ├── Flatten.java │ │ ├── HoistField.java │ │ ├── InsertField.java │ │ ├── MaskField.java │ │ ├── RegexRouter.java │ │ ├── ReplaceField.java │ │ ├── SetSchemaMetadata.java │ │ ├── TimestampConverter.java │ │ ├── TimestampRouter.java │ │ ├── ValueToKey.java │ │ └── util │ │ ├── NonEmptyListValidator.java │ │ ├── RegexValidator.java │ │ ├── Requirements.java │ │ ├── SchemaUtil.java │ │ └── SimpleConfig.java │ └── test │ └── java │ └── org │ └── apache │ └── kafka │ └── connect │ └── transforms │ ├── CastTest.java │ ├── ExtractFieldTest.java │ ├── FlattenTest.java │ ├── HoistFieldTest.java │ ├── InsertFieldTest.java │ ├── MaskFieldTest.java │ ├── RegexRouterTest.java │ ├── ReplaceFieldTest.java │ ├── SetSchemaMetadataTest.java │ ├── TimestampConverterTest.java │ ├── TimestampRouterTest.java │ ├── ValueToKeyTest.java │ └── util │ └── NonEmptyListValidatorTest.java ├── core ├── .gitignore └── src │ ├── main │ └── scala │ │ └── kafka │ │ ├── Kafka.scala │ │ ├── admin │ │ ├── AclCommand.scala │ │ ├── AdminClient.scala │ │ ├── AdminOperationException.scala │ │ ├── AdminUtils.scala │ │ ├── BrokerApiVersionsCommand.scala │ │ ├── BrokerMetadata.scala │ │ ├── ConfigCommand.scala │ │ ├── ConsumerGroupCommand.scala │ │ ├── DeleteRecordsCommand.scala │ │ ├── PreferredReplicaLeaderElectionCommand.scala │ │ ├── RackAwareMode.scala │ │ ├── ReassignPartitionsCommand.scala │ │ ├── TopicCommand.scala │ │ └── ZkSecurityMigrator.scala │ │ ├── api │ │ ├── ApiUtils.scala │ │ ├── ApiVersion.scala │ │ ├── ControlledShutdownRequest.scala │ │ ├── ControlledShutdownResponse.scala │ │ ├── FetchRequest.scala │ │ ├── FetchResponse.scala │ │ ├── GroupCoordinatorRequest.scala │ │ ├── GroupCoordinatorResponse.scala │ │ ├── LeaderAndIsr.scala │ │ ├── OffsetCommitRequest.scala │ │ ├── OffsetCommitResponse.scala │ │ ├── OffsetFetchRequest.scala │ │ ├── OffsetFetchResponse.scala │ │ ├── OffsetRequest.scala │ │ ├── OffsetResponse.scala │ │ ├── ProducerRequest.scala │ │ ├── ProducerResponse.scala │ │ ├── RequestOrResponse.scala │ │ ├── TopicMetadata.scala │ │ ├── TopicMetadataRequest.scala │ │ └── TopicMetadataResponse.scala │ │ ├── client │ │ └── ClientUtils.scala │ │ ├── cluster │ │ ├── Broker.scala │ │ ├── BrokerEndPoint.scala │ │ ├── Cluster.scala │ │ ├── EndPoint.scala │ │ ├── Partition.scala │ │ └── Replica.scala │ │ ├── common │ │ ├── AdminCommandFailedException.scala │ │ ├── AppInfo.scala │ │ ├── AuthorizationException.scala │ │ ├── BaseEnum.scala │ │ ├── BrokerEndPointNotAvailableException.scala │ │ ├── BrokerNotAvailableException.scala │ │ ├── ClientIdAndBroker.scala │ │ ├── ClientIdAndTopic.scala │ │ ├── Config.scala │ │ ├── ConsumerCoordinatorNotAvailableException.scala │ │ ├── ConsumerRebalanceFailedException.scala │ │ ├── ControllerMovedException.scala │ │ ├── ErrorMapping.scala │ │ ├── FailedToSendMessageException.scala │ │ ├── GenerateBrokerIdException.scala │ │ ├── InconsistentBrokerIdException.scala │ │ ├── InterBrokerSendThread.scala │ │ ├── InvalidConfigException.scala │ │ ├── InvalidMessageSizeException.scala │ │ ├── InvalidOffsetException.scala │ │ ├── KafkaException.scala │ │ ├── KafkaStorageException.scala │ │ ├── LeaderElectionNotNeededException.scala │ │ ├── LeaderNotAvailableException.scala │ │ ├── LogCleaningAbortedException.scala │ │ ├── LongRef.scala │ │ ├── MessageFormatter.scala │ │ ├── MessageReader.scala │ │ ├── MessageSetSizeTooLargeException.scala │ │ ├── MessageSizeTooLargeException.scala │ │ ├── MessageStreamsExistException.scala │ │ ├── NoBrokersForPartitionException.scala │ │ ├── NoEpochForPartitionException.scala │ │ ├── NoReplicaOnlineException.scala │ │ ├── NotAssignedReplicaException.scala │ │ ├── NotCoordinatorForConsumerException.scala │ │ ├── NotEnoughReplicasAfterAppendException.scala │ │ ├── NotEnoughReplicasException.scala │ │ ├── NotLeaderForPartitionException.scala │ │ ├── OffsetMetadataAndError.scala │ │ ├── OffsetMetadataTooLargeException.scala │ │ ├── OffsetOutOfRangeException.scala │ │ ├── OffsetsLoadInProgressException.scala │ │ ├── QueueFullException.scala │ │ ├── ReplicaNotAvailableException.scala │ │ ├── RequestTimedOutException.scala │ │ ├── StateChangeFailedException.scala │ │ ├── StreamEndException.scala │ │ ├── ThreadShutdownException.scala │ │ ├── TopicAlreadyMarkedForDeletionException.scala │ │ ├── TopicAndPartition.scala │ │ ├── UnavailableProducerException.scala │ │ ├── UnknownCodecException.scala │ │ ├── UnknownException.scala │ │ ├── UnknownMagicByteException.scala │ │ ├── UnknownTopicOrPartitionException.scala │ │ └── ZkNodeChangeNotificationListener.scala │ │ ├── consumer │ │ ├── BaseConsumer.scala │ │ ├── ConsumerConfig.scala │ │ ├── ConsumerConnector.scala │ │ ├── ConsumerFetcherManager.scala │ │ ├── ConsumerFetcherThread.scala │ │ ├── ConsumerIterator.scala │ │ ├── ConsumerTopicStats.scala │ │ ├── FetchRequestAndResponseStats.scala │ │ ├── FetchedDataChunk.scala │ │ ├── KafkaStream.scala │ │ ├── PartitionAssignor.scala │ │ ├── PartitionTopicInfo.scala │ │ ├── SimpleConsumer.scala │ │ ├── TopicCount.scala │ │ ├── TopicEventHandler.scala │ │ ├── TopicFilter.scala │ │ ├── ZookeeperConsumerConnector.scala │ │ ├── ZookeeperTopicEventWatcher.scala │ │ └── package.html │ │ ├── controller │ │ ├── ControllerChannelManager.scala │ │ ├── ControllerEventManager.scala │ │ ├── ControllerState.scala │ │ ├── KafkaController.scala │ │ ├── PartitionLeaderSelector.scala │ │ ├── PartitionStateMachine.scala │ │ ├── ReplicaStateMachine.scala │ │ └── TopicDeletionManager.scala │ │ ├── coordinator │ │ ├── group │ │ │ ├── DelayedHeartbeat.scala │ │ │ ├── DelayedJoin.scala │ │ │ ├── GroupCoordinator.scala │ │ │ ├── GroupMetadata.scala │ │ │ ├── GroupMetadataManager.scala │ │ │ ├── MemberMetadata.scala │ │ │ └── OffsetConfig.scala │ │ └── transaction │ │ │ ├── DelayedTxnMarker.scala │ │ │ ├── ProducerIdManager.scala │ │ │ ├── TransactionCoordinator.scala │ │ │ ├── TransactionLog.scala │ │ │ ├── TransactionMarkerChannelManager.scala │ │ │ ├── TransactionMarkerRequestCompletionHandler.scala │ │ │ ├── TransactionMetadata.scala │ │ │ └── TransactionStateManager.scala │ │ ├── javaapi │ │ ├── FetchRequest.scala │ │ ├── FetchResponse.scala │ │ ├── GroupCoordinatorResponse.scala │ │ ├── Implicits.scala │ │ ├── OffsetCommitRequest.scala │ │ ├── OffsetCommitResponse.scala │ │ ├── OffsetFetchRequest.scala │ │ ├── OffsetFetchResponse.scala │ │ ├── OffsetRequest.scala │ │ ├── OffsetResponse.scala │ │ ├── TopicMetadata.scala │ │ ├── TopicMetadataRequest.scala │ │ ├── TopicMetadataResponse.scala │ │ ├── consumer │ │ │ ├── ConsumerConnector.java │ │ │ ├── ConsumerRebalanceListener.java │ │ │ ├── SimpleConsumer.scala │ │ │ └── ZookeeperConsumerConnector.scala │ │ ├── message │ │ │ ├── ByteBufferMessageSet.scala │ │ │ └── MessageSet.scala │ │ └── producer │ │ │ └── Producer.scala │ │ ├── log │ │ ├── AbstractIndex.scala │ │ ├── CleanerConfig.scala │ │ ├── IndexEntry.scala │ │ ├── Log.scala │ │ ├── LogCleaner.scala │ │ ├── LogCleanerManager.scala │ │ ├── LogConfig.scala │ │ ├── LogManager.scala │ │ ├── LogSegment.scala │ │ ├── LogValidator.scala │ │ ├── OffsetIndex.scala │ │ ├── OffsetMap.scala │ │ ├── ProducerStateManager.scala │ │ ├── TimeIndex.scala │ │ ├── TransactionIndex.scala │ │ └── package.html │ │ ├── message │ │ ├── ByteBufferMessageSet.scala │ │ ├── CompressionCodec.scala │ │ ├── InvalidMessageException.scala │ │ ├── Message.scala │ │ ├── MessageAndMetadata.scala │ │ ├── MessageAndOffset.scala │ │ ├── MessageLengthException.scala │ │ ├── MessageSet.scala │ │ └── package.html │ │ ├── metrics │ │ ├── KafkaCSVMetricsReporter.scala │ │ ├── KafkaMetricsConfig.scala │ │ ├── KafkaMetricsGroup.scala │ │ ├── KafkaMetricsReporter.scala │ │ └── KafkaTimer.scala │ │ ├── network │ │ ├── BlockingChannel.scala │ │ ├── ConnectionConfig.scala │ │ ├── Handler.scala │ │ ├── RequestChannel.scala │ │ ├── RequestOrResponseSend.scala │ │ ├── SocketServer.scala │ │ └── package.html │ │ ├── producer │ │ ├── BaseProducer.scala │ │ ├── BrokerPartitionInfo.scala │ │ ├── ByteArrayPartitioner.scala │ │ ├── DefaultPartitioner.scala │ │ ├── KeyedMessage.scala │ │ ├── Partitioner.scala │ │ ├── Producer.scala │ │ ├── ProducerClosedException.scala │ │ ├── ProducerConfig.scala │ │ ├── ProducerPool.scala │ │ ├── ProducerRequestStats.scala │ │ ├── ProducerStats.scala │ │ ├── ProducerTopicStats.scala │ │ ├── SyncProducer.scala │ │ ├── SyncProducerConfig.scala │ │ └── async │ │ │ ├── AsyncProducerConfig.scala │ │ │ ├── DefaultEventHandler.scala │ │ │ ├── EventHandler.scala │ │ │ ├── IllegalQueueStateException.scala │ │ │ ├── MissingConfigException.scala │ │ │ └── ProducerSendThread.scala │ │ ├── security │ │ ├── CredentialProvider.scala │ │ ├── SecurityUtils.scala │ │ └── auth │ │ │ ├── Acl.scala │ │ │ ├── Authorizer.scala │ │ │ ├── Operation.scala │ │ │ ├── PermissionType.scala │ │ │ ├── Resource.scala │ │ │ ├── ResourceType.scala │ │ │ └── SimpleAclAuthorizer.scala │ │ ├── serializer │ │ ├── Decoder.scala │ │ └── Encoder.scala │ │ ├── server │ │ ├── AbstractFetcherManager.scala │ │ ├── AbstractFetcherThread.scala │ │ ├── AdminManager.scala │ │ ├── BrokerMetadataCheckpoint.scala │ │ ├── BrokerStates.scala │ │ ├── ClientQuotaManager.scala │ │ ├── ClientRequestQuotaManager.scala │ │ ├── ConfigHandler.scala │ │ ├── DelayedCreateTopics.scala │ │ ├── DelayedDeleteRecords.scala │ │ ├── DelayedDeleteTopics.scala │ │ ├── DelayedFetch.scala │ │ ├── DelayedOperation.scala │ │ ├── DelayedOperationKey.scala │ │ ├── DelayedProduce.scala │ │ ├── DynamicConfig.scala │ │ ├── DynamicConfigManager.scala │ │ ├── FetchDataInfo.scala │ │ ├── KafkaApis.scala │ │ ├── KafkaConfig.scala │ │ ├── KafkaHealthcheck.scala │ │ ├── KafkaRequestHandler.scala │ │ ├── KafkaServer.scala │ │ ├── KafkaServerStartable.scala │ │ ├── LogOffsetMetadata.scala │ │ ├── MetadataCache.scala │ │ ├── QuotaFactory.scala │ │ ├── ReplicaFetcherBlockingSend.scala │ │ ├── ReplicaFetcherManager.scala │ │ ├── ReplicaFetcherThread.scala │ │ ├── ReplicaManager.scala │ │ ├── ReplicationQuotaManager.scala │ │ ├── SensorAccess.scala │ │ ├── ThrottledResponse.scala │ │ ├── checkpoints │ │ │ ├── CheckpointFile.scala │ │ │ ├── LeaderEpochCheckpointFile.scala │ │ │ └── OffsetCheckpointFile.scala │ │ ├── epoch │ │ │ └── LeaderEpochFileCache.scala │ │ └── package.html │ │ ├── tools │ │ ├── ConsoleConsumer.scala │ │ ├── ConsoleProducer.scala │ │ ├── ConsumerOffsetChecker.scala │ │ ├── ConsumerPerformance.scala │ │ ├── DumpLogSegments.scala │ │ ├── EndToEndLatency.scala │ │ ├── ExportZkOffsets.scala │ │ ├── GetOffsetShell.scala │ │ ├── ImportZkOffsets.scala │ │ ├── JmxTool.scala │ │ ├── MirrorMaker.scala │ │ ├── PerfConfig.scala │ │ ├── ProducerPerformance.scala │ │ ├── ReplayLogProducer.scala │ │ ├── ReplicaVerificationTool.scala │ │ ├── SimpleConsumerPerformance.scala │ │ ├── SimpleConsumerShell.scala │ │ ├── StateChangeLogMerger.scala │ │ ├── StreamsResetter.java │ │ ├── UpdateOffsetsInZK.scala │ │ ├── VerifyConsumerRebalance.scala │ │ └── ZooKeeperMainWrapper.scala │ │ └── utils │ │ ├── Annotations.scala │ │ ├── CommandLineUtils.scala │ │ ├── CoreUtils.scala │ │ ├── DelayedItem.scala │ │ ├── Exit.scala │ │ ├── FileLock.scala │ │ ├── IteratorTemplate.scala │ │ ├── Json.scala │ │ ├── KafkaScheduler.scala │ │ ├── Log4jController.scala │ │ ├── Logging.scala │ │ ├── Mx4jLoader.scala │ │ ├── NotNothing.scala │ │ ├── Pool.scala │ │ ├── ReplicationUtils.scala │ │ ├── ShutdownableThread.scala │ │ ├── Throttler.scala │ │ ├── ToolsUtils.scala │ │ ├── VerifiableProperties.scala │ │ ├── ZkUtils.scala │ │ └── timer │ │ ├── Timer.scala │ │ ├── TimerTask.scala │ │ ├── TimerTaskList.scala │ │ └── TimingWheel.scala │ └── test │ ├── resources │ ├── log4j.properties │ ├── minikdc-krb5.conf │ └── minikdc.ldiff │ └── scala │ ├── integration │ └── kafka │ │ ├── admin │ │ ├── BrokerApiVersionsCommandTest.scala │ │ └── ReassignPartitionsIntegrationTest.scala │ │ ├── api │ │ ├── AdminClientIntegrationTest.scala │ │ ├── AdminClientWithPoliciesIntegrationTest.scala │ │ ├── AuthorizerIntegrationTest.scala │ │ ├── BaseConsumerTest.scala │ │ ├── BaseProducerSendTest.scala │ │ ├── BaseQuotaTest.scala │ │ ├── ClientIdQuotaTest.scala │ │ ├── ConsumerBounceTest.scala │ │ ├── EndToEndAuthorizationTest.scala │ │ ├── EndToEndClusterIdTest.scala │ │ ├── FixedPortTestUtils.scala │ │ ├── GroupCoordinatorIntegrationTest.scala │ │ ├── IntegrationTestHarness.scala │ │ ├── LegacyAdminClientTest.scala │ │ ├── LogAppendTimeTest.scala │ │ ├── PlaintextConsumerTest.scala │ │ ├── PlaintextProducerSendTest.scala │ │ ├── ProducerBounceTest.scala │ │ ├── ProducerCompressionTest.scala │ │ ├── ProducerFailureHandlingTest.scala │ │ ├── RackAwareAutoTopicCreationTest.scala │ │ ├── SaslEndToEndAuthorizationTest.scala │ │ ├── SaslGssapiSslEndToEndAuthorizationTest.scala │ │ ├── SaslMultiMechanismConsumerTest.scala │ │ ├── SaslPlainPlaintextConsumerTest.scala │ │ ├── SaslPlainSslEndToEndAuthorizationTest.scala │ │ ├── SaslPlaintextConsumerTest.scala │ │ ├── SaslScramSslEndToEndAuthorizationTest.scala │ │ ├── SaslSetup.scala │ │ ├── SaslSslAdminClientIntegrationTest.scala │ │ ├── SaslSslConsumerTest.scala │ │ ├── SslConsumerTest.scala │ │ ├── SslEndToEndAuthorizationTest.scala │ │ ├── SslProducerSendTest.scala │ │ ├── TransactionsBounceTest.scala │ │ ├── TransactionsTest.scala │ │ ├── UserClientIdQuotaTest.scala │ │ └── UserQuotaTest.scala │ │ ├── server │ │ ├── MultipleListenersWithAdditionalJaasContextTest.scala │ │ ├── MultipleListenersWithDefaultJaasContextTest.scala │ │ ├── MultipleListenersWithSameSecurityProtocolBaseTest.scala │ │ └── ReplicaFetcherThreadFatalErrorTest.scala │ │ └── tools │ │ └── MirrorMakerIntegrationTest.scala │ ├── kafka │ ├── common │ │ └── InterBrokerSendThreadTest.scala │ ├── security │ │ └── minikdc │ │ │ └── MiniKdc.scala │ └── tools │ │ ├── ReplicaVerificationToolTest.scala │ │ └── TestLogCleaning.scala │ ├── other │ ├── kafka.log4j.properties │ └── kafka │ │ ├── ReplicationQuotasTestRig.scala │ │ ├── StressTestLog.scala │ │ ├── TestCrcPerformance.scala │ │ ├── TestKafkaAppender.scala │ │ ├── TestLinearWriteSpeed.scala │ │ ├── TestOffsetManager.scala │ │ ├── TestPurgatoryPerformance.scala │ │ └── TestTruncate.scala │ └── unit │ └── kafka │ ├── KafkaConfigTest.scala │ ├── admin │ ├── AclCommandTest.scala │ ├── AddPartitionsTest.scala │ ├── AdminRackAwareTest.scala │ ├── AdminTest.scala │ ├── ConfigCommandTest.scala │ ├── DeleteConsumerGroupTest.scala │ ├── DeleteTopicTest.scala │ ├── DescribeConsumerGroupTest.scala │ ├── ListConsumerGroupTest.scala │ ├── RackAwareTest.scala │ ├── ReassignPartitionsClusterTest.scala │ ├── ReassignPartitionsCommandArgsTest.scala │ ├── ReassignPartitionsCommandTest.scala │ ├── ReplicationQuotaUtils.scala │ ├── ResetConsumerGroupOffsetTest.scala │ ├── TestAdminUtils.scala │ └── TopicCommandTest.scala │ ├── api │ ├── ApiUtilsTest.scala │ ├── FetchRequestTest.scala │ └── RequestResponseSerializationTest.scala │ ├── cluster │ └── BrokerEndPointTest.scala │ ├── common │ ├── ConfigTest.scala │ └── ZkNodeChangeNotificationListenerTest.scala │ ├── consumer │ ├── ConsumerIteratorTest.scala │ ├── PartitionAssignorTest.scala │ ├── TopicFilterTest.scala │ └── ZookeeperConsumerConnectorTest.scala │ ├── controller │ ├── ControllerEventManagerTest.scala │ ├── ControllerFailoverTest.scala │ ├── ControllerIntegrationTest.scala │ └── ControllerTestUtils.scala │ ├── coordinator │ ├── group │ │ ├── GroupCoordinatorTest.scala │ │ ├── GroupMetadataManagerTest.scala │ │ ├── GroupMetadataTest.scala │ │ └── MemberMetadataTest.scala │ └── transaction │ │ ├── ProducerIdManagerTest.scala │ │ ├── TransactionCoordinatorTest.scala │ │ ├── TransactionLogTest.scala │ │ ├── TransactionMarkerChannelManagerTest.scala │ │ ├── TransactionMarkerRequestCompletionHandlerTest.scala │ │ ├── TransactionMetadataTest.scala │ │ └── TransactionStateManagerTest.scala │ ├── integration │ ├── AutoOffsetResetTest.scala │ ├── FetcherTest.scala │ ├── KafkaServerTestHarness.scala │ ├── MetricsDuringTopicCreationDeletionTest.scala │ ├── MinIsrConfigTest.scala │ ├── PrimitiveApiTest.scala │ ├── ProducerConsumerTestHarness.scala │ ├── TopicMetadataTest.scala │ └── UncleanLeaderElectionTest.scala │ ├── javaapi │ ├── consumer │ │ └── ZookeeperConsumerConnectorTest.scala │ └── message │ │ ├── BaseMessageSetTestCases.scala │ │ └── ByteBufferMessageSetTest.scala │ ├── log │ ├── AbstractLogCleanerIntegrationTest.scala │ ├── BrokerCompressionTest.scala │ ├── LogCleanerIntegrationTest.scala │ ├── LogCleanerLagIntegrationTest.scala │ ├── LogCleanerManagerTest.scala │ ├── LogCleanerTest.scala │ ├── LogConfigTest.scala │ ├── LogManagerTest.scala │ ├── LogSegmentTest.scala │ ├── LogTest.scala │ ├── LogValidatorTest.scala │ ├── OffsetIndexTest.scala │ ├── OffsetMapTest.scala │ ├── ProducerStateManagerTest.scala │ ├── TimeIndexTest.scala │ └── TransactionIndexTest.scala │ ├── message │ ├── BaseMessageSetTestCases.scala │ ├── ByteBufferMessageSetTest.scala │ ├── MessageCompressionTest.scala │ └── MessageTest.scala │ ├── metrics │ ├── KafkaTimerTest.scala │ └── MetricsTest.scala │ ├── network │ └── SocketServerTest.scala │ ├── producer │ ├── AsyncProducerTest.scala │ ├── ProducerTest.scala │ └── SyncProducerTest.scala │ ├── security │ └── auth │ │ ├── AclTest.scala │ │ ├── OperationTest.scala │ │ ├── PermissionTypeTest.scala │ │ ├── ResourceTypeTest.scala │ │ ├── SimpleAclAuthorizerTest.scala │ │ └── ZkAuthorizationTest.scala │ ├── server │ ├── AbstractCreateTopicsRequestTest.scala │ ├── AbstractFetcherThreadTest.scala │ ├── AddPartitionsToTxnRequestTest.scala │ ├── AdvertiseBrokerTest.scala │ ├── ApiVersionsRequestTest.scala │ ├── ApiVersionsTest.scala │ ├── BaseRequestTest.scala │ ├── ClientQuotaManagerTest.scala │ ├── ControlledShutdownLeaderSelectorTest.scala │ ├── CreateTopicsRequestTest.scala │ ├── CreateTopicsRequestWithPolicyTest.scala │ ├── DelayedOperationTest.scala │ ├── DeleteTopicsRequestTest.scala │ ├── DynamicConfigChangeTest.scala │ ├── DynamicConfigTest.scala │ ├── EdgeCaseRequestTest.scala │ ├── FetchRequestTest.scala │ ├── HighwatermarkPersistenceTest.scala │ ├── ISRExpirationTest.scala │ ├── KafkaApisTest.scala │ ├── KafkaConfigTest.scala │ ├── KafkaMetricReporterClusterIdTest.scala │ ├── LeaderElectionTest.scala │ ├── LogOffsetTest.scala │ ├── LogRecoveryTest.scala │ ├── MetadataCacheTest.scala │ ├── MetadataRequestTest.scala │ ├── OffsetCommitTest.scala │ ├── ProduceRequestTest.scala │ ├── ReplicaFetchTest.scala │ ├── ReplicaFetcherThreadTest.scala │ ├── ReplicaManagerQuotasTest.scala │ ├── ReplicaManagerTest.scala │ ├── ReplicationQuotaManagerTest.scala │ ├── ReplicationQuotasTest.scala │ ├── RequestQuotaTest.scala │ ├── SaslApiVersionsRequestTest.scala │ ├── ServerGenerateBrokerIdTest.scala │ ├── ServerGenerateClusterIdTest.scala │ ├── ServerMetricsTest.scala │ ├── ServerShutdownTest.scala │ ├── ServerStartupTest.scala │ ├── SessionExpireListenerTest.scala │ ├── SimpleFetchTest.scala │ ├── ThrottledResponseExpirationTest.scala │ ├── checkpoints │ │ ├── LeaderEpochCheckpointFileTest.scala │ │ └── OffsetCheckpointFileTest.scala │ └── epoch │ │ ├── EpochDrivenReplicationProtocolAcceptanceTest.scala │ │ ├── LeaderEpochFileCacheTest.scala │ │ ├── LeaderEpochIntegrationTest.scala │ │ ├── OffsetsForLeaderEpochTest.scala │ │ └── util │ │ └── ReplicaFetcherMockBlockingSend.scala │ ├── tools │ ├── ConsoleConsumerTest.scala │ ├── ConsoleProducerTest.scala │ └── MirrorMakerTest.scala │ ├── utils │ ├── CommandLineUtilsTest.scala │ ├── IteratorTemplateTest.scala │ ├── JaasTestUtils.scala │ ├── JsonTest.scala │ ├── MockScheduler.scala │ ├── MockTime.scala │ ├── ReplicationUtilsTest.scala │ ├── SchedulerTest.scala │ ├── ShutdownableThreadTest.scala │ ├── TestUtils.scala │ ├── UtilsTest.scala │ ├── ZkUtilsTest.scala │ └── timer │ │ ├── MockTimer.scala │ │ ├── TimerTaskListTest.scala │ │ └── TimerTest.scala │ └── zk │ ├── EmbeddedZookeeper.scala │ ├── ZKEphemeralTest.scala │ ├── ZKPathTest.scala │ ├── ZkFourLetterWords.scala │ └── ZooKeeperTestHarness.scala ├── doap_Kafka.rdf ├── docs ├── api.html ├── configuration.html ├── connect.html ├── design.html ├── documentation.html ├── documentation │ └── streams.html ├── ecosystem.html ├── images │ ├── consumer-groups.png │ ├── kafka-apis.png │ ├── kafka_log.png │ ├── kafka_multidc.png │ ├── kafka_multidc_complex.png │ ├── log_anatomy.png │ ├── log_cleaner_anatomy.png │ ├── log_compaction.png │ ├── log_consumer.png │ ├── mirror-maker.png │ ├── producer_consumer.png │ ├── streams-architecture-overview.jpg │ ├── streams-architecture-states.jpg │ ├── streams-architecture-tasks.jpg │ ├── streams-architecture-threads.jpg │ ├── streams-architecture-topology.jpg │ ├── streams-concepts-topology.jpg │ ├── streams-table-duality-01.png │ ├── streams-table-duality-02.png │ ├── streams-table-duality-03.png │ ├── streams-table-updates-01.png │ ├── streams-table-updates-02.png │ └── tracking_high_level.png ├── implementation.html ├── introduction.html ├── js │ └── templateData.js ├── migration.html ├── ops.html ├── protocol.html ├── quickstart.html ├── security.html ├── streams.html ├── toc.html ├── upgrade.html └── uses.html ├── examples ├── README ├── bin │ ├── java-producer-consumer-demo.sh │ └── java-simple-consumer-demo.sh └── src │ └── main │ └── java │ └── kafka │ └── examples │ ├── Consumer.java │ ├── KafkaConsumerProducerDemo.java │ ├── KafkaProperties.java │ ├── Producer.java │ └── SimpleConsumerDemo.java ├── gradle.properties ├── gradle ├── buildscript.gradle ├── dependencies.gradle ├── findbugs-exclude.xml ├── rat.gradle └── resources │ └── rat-output-to-html.xsl ├── jenkins.sh ├── jmh-benchmarks ├── README.md ├── jmh.sh └── src │ └── main │ └── java │ └── org │ └── apache │ └── kafka │ └── jmh │ ├── cache │ └── LRUCacheBenchmark.java │ ├── common │ └── TopicBenchmark.java │ ├── producer │ └── ProducerRecordBenchmark.java │ └── record │ └── RecordBatchIterationBenchmark.java ├── kafka-merge-pr.py ├── log4j-appender └── src │ ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── kafka │ │ └── log4jappender │ │ └── KafkaLog4jAppender.java │ └── test │ └── java │ └── org │ └── apache │ └── kafka │ └── log4jappender │ ├── KafkaLog4jAppenderTest.java │ └── MockKafkaLog4jAppender.java ├── release.py ├── release_notes.py ├── settings.gradle ├── streams ├── .gitignore ├── examples │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── apache │ │ └── kafka │ │ └── streams │ │ └── examples │ │ ├── pageview │ │ ├── JsonPOJODeserializer.java │ │ ├── JsonPOJOSerializer.java │ │ ├── JsonTimestampExtractor.java │ │ ├── PageViewTypedDemo.java │ │ └── PageViewUntypedDemo.java │ │ ├── pipe │ │ └── PipeDemo.java │ │ └── wordcount │ │ ├── WordCountDemo.java │ │ └── WordCountProcessorDemo.java └── src │ ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── kafka │ │ └── streams │ │ ├── KafkaClientSupplier.java │ │ ├── KafkaStreams.java │ │ ├── KeyValue.java │ │ ├── StreamsConfig.java │ │ ├── StreamsMetrics.java │ │ ├── errors │ │ ├── BrokerNotFoundException.java │ │ ├── InvalidStateStoreException.java │ │ ├── LockException.java │ │ ├── ProcessorStateException.java │ │ ├── StreamsException.java │ │ ├── TaskAssignmentException.java │ │ ├── TaskIdFormatException.java │ │ └── TopologyBuilderException.java │ │ ├── kstream │ │ ├── Aggregator.java │ │ ├── ForeachAction.java │ │ ├── GlobalKTable.java │ │ ├── Initializer.java │ │ ├── JoinWindows.java │ │ ├── KGroupedStream.java │ │ ├── KGroupedTable.java │ │ ├── KStream.java │ │ ├── KStreamBuilder.java │ │ ├── KTable.java │ │ ├── KeyValueMapper.java │ │ ├── Merger.java │ │ ├── Predicate.java │ │ ├── PrintForeachAction.java │ │ ├── Reducer.java │ │ ├── SessionWindows.java │ │ ├── TimeWindows.java │ │ ├── Transformer.java │ │ ├── TransformerSupplier.java │ │ ├── UnlimitedWindows.java │ │ ├── ValueJoiner.java │ │ ├── ValueMapper.java │ │ ├── ValueTransformer.java │ │ ├── ValueTransformerSupplier.java │ │ ├── Window.java │ │ ├── Windowed.java │ │ ├── Windows.java │ │ └── internals │ │ │ ├── AbstractKTableKTableJoinValueGetterSupplier.java │ │ │ ├── AbstractStream.java │ │ │ ├── CacheFlushListener.java │ │ │ ├── Change.java │ │ │ ├── ChangedDeserializer.java │ │ │ ├── ChangedSerializer.java │ │ │ ├── ForwardingCacheFlushListener.java │ │ │ ├── GlobalKTableImpl.java │ │ │ ├── KGroupedStreamImpl.java │ │ │ ├── KGroupedTableImpl.java │ │ │ ├── KStreamAggProcessorSupplier.java │ │ │ ├── KStreamAggregate.java │ │ │ ├── KStreamBranch.java │ │ │ ├── KStreamFilter.java │ │ │ ├── KStreamFlatMap.java │ │ │ ├── KStreamFlatMapValues.java │ │ │ ├── KStreamGlobalKTableJoin.java │ │ │ ├── KStreamImpl.java │ │ │ ├── KStreamJoinWindow.java │ │ │ ├── KStreamKStreamJoin.java │ │ │ ├── KStreamKTableJoin.java │ │ │ ├── KStreamKTableJoinProcessor.java │ │ │ ├── KStreamMap.java │ │ │ ├── KStreamMapValues.java │ │ │ ├── KStreamPassThrough.java │ │ │ ├── KStreamPeek.java │ │ │ ├── KStreamPrint.java │ │ │ ├── KStreamReduce.java │ │ │ ├── KStreamSessionWindowAggregate.java │ │ │ ├── KStreamTransform.java │ │ │ ├── KStreamTransformValues.java │ │ │ ├── KStreamWindowAggregate.java │ │ │ ├── KStreamWindowReduce.java │ │ │ ├── KTableAggregate.java │ │ │ ├── KTableFilter.java │ │ │ ├── KTableImpl.java │ │ │ ├── KTableKTableAbstractJoin.java │ │ │ ├── KTableKTableJoin.java │ │ │ ├── KTableKTableJoinMerger.java │ │ │ ├── KTableKTableJoinValueGetter.java │ │ │ ├── KTableKTableLeftJoin.java │ │ │ ├── KTableKTableLeftJoinValueGetter.java │ │ │ ├── KTableKTableOuterJoin.java │ │ │ ├── KTableKTableRightJoin.java │ │ │ ├── KTableMapValues.java │ │ │ ├── KTableProcessorSupplier.java │ │ │ ├── KTableReduce.java │ │ │ ├── KTableRepartitionMap.java │ │ │ ├── KTableSource.java │ │ │ ├── KTableSourceValueGetterSupplier.java │ │ │ ├── KTableValueGetter.java │ │ │ ├── KTableValueGetterSupplier.java │ │ │ ├── SessionKeySerde.java │ │ │ ├── SessionWindow.java │ │ │ ├── TimeWindow.java │ │ │ ├── TupleForwarder.java │ │ │ ├── UnlimitedWindow.java │ │ │ ├── WindowedDeserializer.java │ │ │ ├── WindowedSerializer.java │ │ │ └── WindowedStreamPartitioner.java │ │ ├── processor │ │ ├── AbstractProcessor.java │ │ ├── DefaultPartitionGrouper.java │ │ ├── ExtractRecordMetadataTimestamp.java │ │ ├── FailOnInvalidTimestamp.java │ │ ├── LogAndSkipOnInvalidTimestamp.java │ │ ├── PartitionGrouper.java │ │ ├── Processor.java │ │ ├── ProcessorContext.java │ │ ├── ProcessorSupplier.java │ │ ├── StateRestoreCallback.java │ │ ├── StateStore.java │ │ ├── StateStoreSupplier.java │ │ ├── StreamPartitioner.java │ │ ├── TaskId.java │ │ ├── TimestampExtractor.java │ │ ├── TopologyBuilder.java │ │ ├── UsePreviousTimeOnInvalidTimestamp.java │ │ ├── WallclockTimestampExtractor.java │ │ └── internals │ │ │ ├── AbstractProcessorContext.java │ │ │ ├── AbstractTask.java │ │ │ ├── ChangelogReader.java │ │ │ ├── Checkpointable.java │ │ │ ├── DefaultKafkaClientSupplier.java │ │ │ ├── DefaultStreamPartitioner.java │ │ │ ├── GlobalProcessorContextImpl.java │ │ │ ├── GlobalStateMaintainer.java │ │ │ ├── GlobalStateManager.java │ │ │ ├── GlobalStateManagerImpl.java │ │ │ ├── GlobalStateUpdateTask.java │ │ │ ├── GlobalStreamThread.java │ │ │ ├── InternalProcessorContext.java │ │ │ ├── InternalTopicConfig.java │ │ │ ├── InternalTopicManager.java │ │ │ ├── MinTimestampTracker.java │ │ │ ├── PartitionGroup.java │ │ │ ├── ProcessorContextImpl.java │ │ │ ├── ProcessorNode.java │ │ │ ├── ProcessorRecordContext.java │ │ │ ├── ProcessorStateManager.java │ │ │ ├── ProcessorTopology.java │ │ │ ├── PunctuationQueue.java │ │ │ ├── PunctuationSchedule.java │ │ │ ├── Punctuator.java │ │ │ ├── QuickUnion.java │ │ │ ├── RecordCollector.java │ │ │ ├── RecordCollectorImpl.java │ │ │ ├── RecordContext.java │ │ │ ├── RecordDeserializer.java │ │ │ ├── RecordQueue.java │ │ │ ├── SinkNode.java │ │ │ ├── SourceNode.java │ │ │ ├── SourceNodeRecordDeserializer.java │ │ │ ├── Stamped.java │ │ │ ├── StampedRecord.java │ │ │ ├── StandbyContextImpl.java │ │ │ ├── StandbyTask.java │ │ │ ├── StateDirectory.java │ │ │ ├── StateManager.java │ │ │ ├── StateRestorer.java │ │ │ ├── StoreChangelogReader.java │ │ │ ├── StreamPartitionAssignor.java │ │ │ ├── StreamTask.java │ │ │ ├── StreamThread.java │ │ │ ├── StreamsKafkaClient.java │ │ │ ├── StreamsMetadataState.java │ │ │ ├── StreamsMetricsImpl.java │ │ │ ├── TimestampTracker.java │ │ │ └── assignment │ │ │ ├── AssignmentInfo.java │ │ │ ├── ClientState.java │ │ │ ├── StickyTaskAssignor.java │ │ │ ├── SubscriptionInfo.java │ │ │ └── TaskAssignor.java │ │ └── state │ │ ├── HostInfo.java │ │ ├── KeyValueIterator.java │ │ ├── KeyValueStore.java │ │ ├── QueryableStoreType.java │ │ ├── QueryableStoreTypes.java │ │ ├── ReadOnlyKeyValueStore.java │ │ ├── ReadOnlySessionStore.java │ │ ├── ReadOnlyWindowStore.java │ │ ├── RocksDBConfigSetter.java │ │ ├── SessionStore.java │ │ ├── StateSerdes.java │ │ ├── Stores.java │ │ ├── StreamsMetadata.java │ │ ├── WindowStore.java │ │ ├── WindowStoreIterator.java │ │ └── internals │ │ ├── AbstractMergedSortedCacheStoreIterator.java │ │ ├── AbstractStoreSupplier.java │ │ ├── CacheFunction.java │ │ ├── CachedStateStore.java │ │ ├── CachingKeyValueStore.java │ │ ├── CachingSessionStore.java │ │ ├── CachingWindowStore.java │ │ ├── ChangeLoggingKeyValueBytesStore.java │ │ ├── ChangeLoggingKeyValueStore.java │ │ ├── ChangeLoggingSegmentedBytesStore.java │ │ ├── CompositeReadOnlyKeyValueStore.java │ │ ├── CompositeReadOnlySessionStore.java │ │ ├── CompositeReadOnlyWindowStore.java │ │ ├── DelegatingPeekingKeyValueIterator.java │ │ ├── FilteredCacheIterator.java │ │ ├── GlobalStateStoreProvider.java │ │ ├── HasNextCondition.java │ │ ├── InMemoryKeyValueLoggedStore.java │ │ ├── InMemoryKeyValueStore.java │ │ ├── InMemoryKeyValueStoreSupplier.java │ │ ├── InMemoryLRUCacheStoreSupplier.java │ │ ├── KeyValueIterators.java │ │ ├── LRUCacheEntry.java │ │ ├── MemoryLRUCache.java │ │ ├── MemoryNavigableLRUCache.java │ │ ├── MergedSortedCacheKeyValueStoreIterator.java │ │ ├── MergedSortedCacheSessionStoreIterator.java │ │ ├── MergedSortedCacheWindowStoreIterator.java │ │ ├── MergedSortedCacheWindowStoreKeyValueIterator.java │ │ ├── MeteredKeyValueStore.java │ │ ├── MeteredSegmentedBytesStore.java │ │ ├── NamedCache.java │ │ ├── OffsetCheckpoint.java │ │ ├── OrderedBytes.java │ │ ├── PeekingKeyValueIterator.java │ │ ├── QueryableStoreProvider.java │ │ ├── RocksDBKeyValueStoreSupplier.java │ │ ├── RocksDBSegmentedBytesStore.java │ │ ├── RocksDBSessionStore.java │ │ ├── RocksDBSessionStoreSupplier.java │ │ ├── RocksDBStore.java │ │ ├── RocksDBWindowStore.java │ │ ├── RocksDBWindowStoreSupplier.java │ │ ├── Segment.java │ │ ├── SegmentIterator.java │ │ ├── SegmentedBytesStore.java │ │ ├── SegmentedCacheFunction.java │ │ ├── Segments.java │ │ ├── SerializedKeyValueIterator.java │ │ ├── SessionKeySchema.java │ │ ├── StateStoreProvider.java │ │ ├── StoreChangeLogger.java │ │ ├── StreamThreadStateStoreProvider.java │ │ ├── ThreadCache.java │ │ ├── WindowKeySchema.java │ │ ├── WindowStoreIteratorWrapper.java │ │ ├── WindowStoreSupplier.java │ │ ├── WindowStoreUtils.java │ │ ├── WrappedSessionStoreIterator.java │ │ ├── WrappedStateStore.java │ │ └── WrappingStoreProvider.java │ └── test │ ├── java │ └── org │ │ └── apache │ │ └── kafka │ │ ├── streams │ │ ├── KafkaStreamsTest.java │ │ ├── KeyValueTest.java │ │ ├── StreamsConfigTest.java │ │ ├── integration │ │ │ ├── EosIntegrationTest.java │ │ │ ├── FanoutIntegrationTest.java │ │ │ ├── GlobalKTableIntegrationTest.java │ │ │ ├── InternalTopicIntegrationTest.java │ │ │ ├── JoinIntegrationTest.java │ │ │ ├── KStreamAggregationDedupIntegrationTest.java │ │ │ ├── KStreamAggregationIntegrationTest.java │ │ │ ├── KStreamKTableJoinIntegrationTest.java │ │ │ ├── KStreamRepartitionJoinTest.java │ │ │ ├── KStreamsFineGrainedAutoResetIntegrationTest.java │ │ │ ├── KTableKTableJoinIntegrationTest.java │ │ │ ├── QueryableStateIntegrationTest.java │ │ │ ├── RegexSourceIntegrationTest.java │ │ │ ├── ResetIntegrationTest.java │ │ │ └── utils │ │ │ │ ├── EmbeddedKafkaCluster.java │ │ │ │ ├── IntegrationTestUtils.java │ │ │ │ └── KafkaEmbedded.java │ │ ├── kstream │ │ │ ├── JoinWindowsTest.java │ │ │ ├── KStreamBuilderTest.java │ │ │ ├── SessionWindowsTest.java │ │ │ ├── TimeWindowsTest.java │ │ │ ├── UnlimitedWindowsTest.java │ │ │ ├── WindowTest.java │ │ │ ├── WindowsTest.java │ │ │ └── internals │ │ │ │ ├── GlobalKTableJoinsTest.java │ │ │ │ ├── KGroupedStreamImplTest.java │ │ │ │ ├── KGroupedTableImplTest.java │ │ │ │ ├── KStreamBranchTest.java │ │ │ │ ├── KStreamFilterTest.java │ │ │ │ ├── KStreamFlatMapTest.java │ │ │ │ ├── KStreamFlatMapValuesTest.java │ │ │ │ ├── KStreamForeachTest.java │ │ │ │ ├── KStreamImplTest.java │ │ │ │ ├── KStreamKStreamJoinTest.java │ │ │ │ ├── KStreamKStreamLeftJoinTest.java │ │ │ │ ├── KStreamKTableJoinTest.java │ │ │ │ ├── KStreamKTableLeftJoinTest.java │ │ │ │ ├── KStreamMapTest.java │ │ │ │ ├── KStreamMapValuesTest.java │ │ │ │ ├── KStreamPeekTest.java │ │ │ │ ├── KStreamPrintTest.java │ │ │ │ ├── KStreamSelectKeyTest.java │ │ │ │ ├── KStreamSessionWindowAggregateProcessorTest.java │ │ │ │ ├── KStreamTransformTest.java │ │ │ │ ├── KStreamTransformValuesTest.java │ │ │ │ ├── KStreamWindowAggregateTest.java │ │ │ │ ├── KTableAggregateTest.java │ │ │ │ ├── KTableFilterTest.java │ │ │ │ ├── KTableForeachTest.java │ │ │ │ ├── KTableImplTest.java │ │ │ │ ├── KTableKTableJoinTest.java │ │ │ │ ├── KTableKTableLeftJoinTest.java │ │ │ │ ├── KTableKTableOuterJoinTest.java │ │ │ │ ├── KTableMapKeysTest.java │ │ │ │ ├── KTableMapValuesTest.java │ │ │ │ ├── KTableSourceTest.java │ │ │ │ ├── SessionKeySerdeTest.java │ │ │ │ ├── SessionWindowTest.java │ │ │ │ ├── TimeWindowTest.java │ │ │ │ ├── UnlimitedWindowTest.java │ │ │ │ └── WindowedStreamPartitionerTest.java │ │ ├── perf │ │ │ ├── SimpleBenchmark.java │ │ │ └── YahooBenchmark.java │ │ ├── processor │ │ │ ├── DefaultPartitionGrouperTest.java │ │ │ ├── FailOnInvalidTimestampTest.java │ │ │ ├── LogAndSkipOnInvalidTimestampTest.java │ │ │ ├── TimestampExtractorTest.java │ │ │ ├── TopologyBuilderTest.java │ │ │ ├── UsePreviousTimeOnInvalidTimestampTest.java │ │ │ ├── WallclockTimestampExtractorTest.java │ │ │ └── internals │ │ │ │ ├── AbstractProcessorContextTest.java │ │ │ │ ├── AbstractTaskTest.java │ │ │ │ ├── CopartitionedTopicsValidatorTest.java │ │ │ │ ├── GlobalStateManagerImplTest.java │ │ │ │ ├── GlobalStateTaskTest.java │ │ │ │ ├── GlobalStreamThreadTest.java │ │ │ │ ├── InternalTopicConfigTest.java │ │ │ │ ├── InternalTopicManagerTest.java │ │ │ │ ├── MinTimestampTrackerTest.java │ │ │ │ ├── MockStreamsMetrics.java │ │ │ │ ├── PartitionGroupTest.java │ │ │ │ ├── ProcessorNodeTest.java │ │ │ │ ├── ProcessorStateManagerTest.java │ │ │ │ ├── ProcessorTopologyTest.java │ │ │ │ ├── PunctuationQueueTest.java │ │ │ │ ├── QuickUnionTest.java │ │ │ │ ├── RecordCollectorTest.java │ │ │ │ ├── RecordContextStub.java │ │ │ │ ├── RecordQueueTest.java │ │ │ │ ├── SingleGroupPartitionGrouperStub.java │ │ │ │ ├── SinkNodeTest.java │ │ │ │ ├── SourceNodeRecordDeserializerTest.java │ │ │ │ ├── SourceNodeTest.java │ │ │ │ ├── StandbyTaskTest.java │ │ │ │ ├── StateConsumerTest.java │ │ │ │ ├── StateDirectoryTest.java │ │ │ │ ├── StateManagerStub.java │ │ │ │ ├── StateRestorerTest.java │ │ │ │ ├── StoreChangelogReaderTest.java │ │ │ │ ├── StreamPartitionAssignorTest.java │ │ │ │ ├── StreamTaskTest.java │ │ │ │ ├── StreamThreadTest.java │ │ │ │ ├── StreamsKafkaClientTest.java │ │ │ │ ├── StreamsMetadataStateTest.java │ │ │ │ ├── StreamsMetricsImplTest.java │ │ │ │ └── assignment │ │ │ │ ├── AssignmentInfoTest.java │ │ │ │ ├── ClientStateTest.java │ │ │ │ ├── StickyTaskAssignorTest.java │ │ │ │ └── SubscriptionInfoTest.java │ │ ├── state │ │ │ ├── KeyValueStoreTestDriver.java │ │ │ ├── NoOpWindowStore.java │ │ │ ├── StoresTest.java │ │ │ └── internals │ │ │ │ ├── AbstractKeyValueStoreTest.java │ │ │ │ ├── CachingKeyValueStoreTest.java │ │ │ │ ├── CachingSessionStoreTest.java │ │ │ │ ├── CachingWindowStoreTest.java │ │ │ │ ├── ChangeLoggingKeyValueBytesStoreTest.java │ │ │ │ ├── ChangeLoggingKeyValueStoreTest.java │ │ │ │ ├── ChangeLoggingSegmentedBytesStoreTest.java │ │ │ │ ├── CompositeReadOnlyKeyValueStoreTest.java │ │ │ │ ├── CompositeReadOnlySessionStoreTest.java │ │ │ │ ├── CompositeReadOnlyWindowStoreTest.java │ │ │ │ ├── DelegatingPeekingKeyValueIteratorTest.java │ │ │ │ ├── FilteredCacheIteratorTest.java │ │ │ │ ├── GlobalStateStoreProviderTest.java │ │ │ │ ├── InMemoryKeyValueLoggedStoreTest.java │ │ │ │ ├── InMemoryKeyValueStoreTest.java │ │ │ │ ├── InMemoryLRUCacheStoreTest.java │ │ │ │ ├── MergedSortedCacheKeyValueStoreIteratorTest.java │ │ │ │ ├── MergedSortedCacheWrappedSessionStoreIteratorTest.java │ │ │ │ ├── MergedSortedCacheWrappedWindowStoreIteratorTest.java │ │ │ │ ├── MergedSortedCacheWrappedWindowStoreKeyValueIteratorTest.java │ │ │ │ ├── MeteredSegmentedBytesStoreTest.java │ │ │ │ ├── NamedCacheTest.java │ │ │ │ ├── OffsetCheckpointTest.java │ │ │ │ ├── QueryableStoreProviderTest.java │ │ │ │ ├── ReadOnlyWindowStoreStub.java │ │ │ │ ├── RocksDBKeyValueStoreSupplierTest.java │ │ │ │ ├── RocksDBKeyValueStoreTest.java │ │ │ │ ├── RocksDBSegmentedBytesStoreTest.java │ │ │ │ ├── RocksDBSessionStoreSupplierTest.java │ │ │ │ ├── RocksDBSessionStoreTest.java │ │ │ │ ├── RocksDBStoreTest.java │ │ │ │ ├── RocksDBWindowStoreSupplierTest.java │ │ │ │ ├── RocksDBWindowStoreTest.java │ │ │ │ ├── SegmentIteratorTest.java │ │ │ │ ├── SegmentedCacheFunctionTest.java │ │ │ │ ├── SegmentsTest.java │ │ │ │ ├── SerializedKeyValueIteratorTest.java │ │ │ │ ├── SessionKeySchemaTest.java │ │ │ │ ├── StateStoreTestUtils.java │ │ │ │ ├── StoreChangeLoggerTest.java │ │ │ │ ├── StreamThreadStateStoreProviderTest.java │ │ │ │ ├── ThreadCacheTest.java │ │ │ │ ├── WindowKeySchemaTest.java │ │ │ │ ├── WindowStoreUtilsTest.java │ │ │ │ └── WrappingStoreProviderTest.java │ │ └── tests │ │ │ ├── BrokerCompatibilityTest.java │ │ │ ├── EosTestClient.java │ │ │ ├── EosTestDriver.java │ │ │ ├── ShutdownDeadlockTest.java │ │ │ ├── SmokeTestClient.java │ │ │ ├── SmokeTestDriver.java │ │ │ ├── SmokeTestUtil.java │ │ │ ├── StreamsEosTest.java │ │ │ └── StreamsSmokeTest.java │ │ └── test │ │ ├── GlobalStateManagerStub.java │ │ ├── KStreamTestDriver.java │ │ ├── KTableValueGetterStub.java │ │ ├── KeyValueIteratorStub.java │ │ ├── MockAggregator.java │ │ ├── MockChangelogReader.java │ │ ├── MockClientSupplier.java │ │ ├── MockInitializer.java │ │ ├── MockInternalTopicManager.java │ │ ├── MockKeyValueMapper.java │ │ ├── MockProcessorContext.java │ │ ├── MockProcessorNode.java │ │ ├── MockProcessorSupplier.java │ │ ├── MockReducer.java │ │ ├── MockRestoreCallback.java │ │ ├── MockRestoreConsumer.java │ │ ├── MockSourceNode.java │ │ ├── MockStateStoreSupplier.java │ │ ├── MockTimestampExtractor.java │ │ ├── MockValueJoiner.java │ │ ├── NoOpProcessorContext.java │ │ ├── NoOpReadOnlyStore.java │ │ ├── NoOpRecordCollector.java │ │ ├── ProcessorTopologyTestDriver.java │ │ ├── ReadOnlySessionStoreStub.java │ │ ├── SegmentedBytesStoreStub.java │ │ ├── StateStoreProviderStub.java │ │ └── StreamsTestUtils.java │ └── resources │ └── log4j.properties ├── tests ├── .gitignore ├── MANIFEST.in ├── README.md ├── bootstrap-test-env.sh ├── cluster_file_generator.sh ├── docker │ ├── Dockerfile │ ├── run_tests.sh │ └── ssh │ │ ├── authorized_keys │ │ ├── config │ │ ├── id_rsa │ │ └── id_rsa.pub ├── kafkatest │ ├── __init__.py │ ├── benchmarks │ │ ├── __init__.py │ │ ├── core │ │ │ ├── __init__.py │ │ │ └── benchmark_test.py │ │ └── streams │ │ │ ├── __init__.py │ │ │ └── streams_simple_benchmark_test.py │ ├── directory_layout │ │ ├── __init__.py │ │ └── kafka_path.py │ ├── sanity_checks │ │ ├── __init__.py │ │ ├── test_console_consumer.py │ │ ├── test_kafka_version.py │ │ ├── test_performance_services.py │ │ └── test_verifiable_producer.py │ ├── services │ │ ├── __init__.py │ │ ├── connect.py │ │ ├── console_consumer.py │ │ ├── kafka │ │ │ ├── __init__.py │ │ │ ├── config.py │ │ │ ├── config_property.py │ │ │ ├── kafka.py │ │ │ ├── templates │ │ │ │ ├── kafka.properties │ │ │ │ └── log4j.properties │ │ │ └── util.py │ │ ├── kafka_log4j_appender.py │ │ ├── mirror_maker.py │ │ ├── monitor │ │ │ ├── __init__.py │ │ │ └── jmx.py │ │ ├── performance │ │ │ ├── __init__.py │ │ │ ├── consumer_performance.py │ │ │ ├── end_to_end_latency.py │ │ │ ├── performance.py │ │ │ ├── producer_performance.py │ │ │ ├── streams_performance.py │ │ │ └── templates │ │ │ │ └── tools_log4j.properties │ │ ├── replica_verification_tool.py │ │ ├── security │ │ │ ├── __init__.py │ │ │ ├── kafka_acls.py │ │ │ ├── minikdc.py │ │ │ ├── security_config.py │ │ │ └── templates │ │ │ │ ├── jaas.conf │ │ │ │ └── minikdc.properties │ │ ├── simple_consumer_shell.py │ │ ├── streams.py │ │ ├── templates │ │ │ ├── connect_log4j.properties │ │ │ ├── console_consumer.properties │ │ │ ├── consumer.properties │ │ │ ├── mirror_maker_consumer.properties │ │ │ ├── mirror_maker_producer.properties │ │ │ ├── producer.properties │ │ │ ├── tools_log4j.properties │ │ │ └── zookeeper.properties │ │ ├── transactional_message_copier.py │ │ ├── verifiable_client.py │ │ ├── verifiable_consumer.py │ │ ├── verifiable_producer.py │ │ └── zookeeper.py │ ├── tests │ │ ├── __init__.py │ │ ├── client │ │ │ ├── __init__.py │ │ │ ├── client_compatibility_features_test.py │ │ │ ├── client_compatibility_produce_consume_test.py │ │ │ ├── compression_test.py │ │ │ ├── consumer_rolling_upgrade_test.py │ │ │ ├── consumer_test.py │ │ │ ├── message_format_change_test.py │ │ │ ├── pluggable_test.py │ │ │ └── quota_test.py │ │ ├── connect │ │ │ ├── __init__.py │ │ │ ├── connect_distributed_test.py │ │ │ ├── connect_rest_test.py │ │ │ ├── connect_test.py │ │ │ └── templates │ │ │ │ ├── connect-distributed.properties │ │ │ │ ├── connect-file-sink.properties │ │ │ │ ├── connect-file-source.properties │ │ │ │ └── connect-standalone.properties │ │ ├── core │ │ │ ├── __init__.py │ │ │ ├── compatibility_test_new_broker_test.py │ │ │ ├── consumer_group_command_test.py │ │ │ ├── get_offset_shell_test.py │ │ │ ├── mirror_maker_test.py │ │ │ ├── reassign_partitions_test.py │ │ │ ├── replication_test.py │ │ │ ├── security_rolling_upgrade_test.py │ │ │ ├── security_test.py │ │ │ ├── simple_consumer_shell_test.py │ │ │ ├── throttling_test.py │ │ │ ├── transactions_test.py │ │ │ ├── upgrade_test.py │ │ │ └── zookeeper_security_upgrade_test.py │ │ ├── kafka_test.py │ │ ├── produce_consume_validate.py │ │ ├── streams │ │ │ ├── __init__.py │ │ │ ├── streams_bounce_test.py │ │ │ ├── streams_broker_bounce_test.py │ │ │ ├── streams_broker_compatibility_test.py │ │ │ ├── streams_eos_test.py │ │ │ ├── streams_shutdown_deadlock_test.py │ │ │ └── streams_smoke_test.py │ │ ├── tools │ │ │ ├── __init__.py │ │ │ ├── log4j_appender_test.py │ │ │ └── replica_verification_test.py │ │ └── verifiable_consumer_test.py │ ├── utils │ │ ├── __init__.py │ │ ├── remote_account.py │ │ └── util.py │ └── version.py ├── setup.cfg ├── setup.py └── unit │ ├── __init__.py │ ├── directory_layout │ ├── __init__.py │ └── check_project_paths.py │ ├── setup.cfg │ └── version │ ├── __init__.py │ └── check_version.py ├── tools └── src │ └── main │ └── java │ └── org │ └── apache │ └── kafka │ └── tools │ ├── ClientCompatibilityTest.java │ ├── ProducerPerformance.java │ ├── ThroughputThrottler.java │ ├── ToolsUtils.java │ ├── TransactionalMessageCopier.java │ ├── VerifiableConsumer.java │ ├── VerifiableLog4jAppender.java │ └── VerifiableProducer.java ├── vagrant ├── README.md ├── aws │ ├── aws-access-keys-commands │ ├── aws-example-Vagrantfile.local │ └── aws-init.sh ├── base.sh ├── broker.sh ├── package-base-box.sh ├── system-test-Vagrantfile.local ├── vagrant-up.sh └── zk.sh └── wrapper.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | *classes 3 | target/ 4 | build/ 5 | build_eclipse/ 6 | .gradle/ 7 | lib_managed/ 8 | src_managed/ 9 | project/boot/ 10 | project/plugins/project/ 11 | patch-process/* 12 | .idea 13 | .svn 14 | .classpath 15 | /.metadata 16 | /.recommenders 17 | *~ 18 | *# 19 | .#* 20 | rat.out 21 | TAGS 22 | *.iml 23 | .project 24 | .settings 25 | kafka.ipr 26 | kafka.iws 27 | .vagrant 28 | Vagrantfile.local 29 | /logs 30 | .DS_Store 31 | 32 | config/server-* 33 | config/zookeeper-* 34 | core/data/* 35 | gradle/wrapper/* 36 | gradlew 37 | gradlew.bat 38 | 39 | results 40 | tests/results 41 | .ducktape 42 | tests/.ducktape 43 | tests/venv 44 | .cache 45 | 46 | docs/generated/ 47 | 48 | .release-settings.json 49 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing to Kafka 2 | 3 | *Before opening a pull request*, review the [Contributing](http://kafka.apache.org/contributing.html) and [Contributing Code Changes](https://cwiki.apache.org/confluence/display/KAFKA/Contributing+Code+Changes) pages. 4 | 5 | It lists steps that are required before creating a PR. 6 | 7 | When you contribute code, you affirm that the contribution is your original work and that you 8 | license the work to the project under the project's open source license. Whether or not you 9 | state this explicitly, by submitting any copyrighted material via pull request, email, or 10 | other means you agree to license the material under the project's open source license and 11 | warrant that you have the legal authority to do so. 12 | -------------------------------------------------------------------------------- /HEADER: -------------------------------------------------------------------------------- 1 | Licensed to the Apache Software Foundation (ASF) under one or more 2 | contributor license agreements. See the NOTICE file distributed with 3 | this work for additional information regarding copyright ownership. 4 | The ASF licenses this file to You under the Apache License, Version 2.0 5 | (the "License"); you may not use this file except in compliance with 6 | the License. You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache Kafka 2 | Copyright 2017 The Apache Software Foundation. 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | 7 | This distribution has a binary dependency on jersey, which is available under the CDDL 8 | License. The source code of jersey can be found at https://github.com/jersey/jersey/. 9 | -------------------------------------------------------------------------------- /bin/kafka-acls.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.admin.AclCommand "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-broker-api-versions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.admin.BrokerApiVersionsCommand "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-configs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.admin.ConfigCommand "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-console-consumer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then 18 | export KAFKA_HEAP_OPTS="-Xmx512M" 19 | fi 20 | 21 | exec $(dirname $0)/kafka-run-class.sh kafka.tools.ConsoleConsumer "$@" 22 | -------------------------------------------------------------------------------- /bin/kafka-console-producer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then 18 | export KAFKA_HEAP_OPTS="-Xmx512M" 19 | fi 20 | exec $(dirname $0)/kafka-run-class.sh kafka.tools.ConsoleProducer "$@" 21 | -------------------------------------------------------------------------------- /bin/kafka-consumer-groups.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.admin.ConsumerGroupCommand "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-consumer-offset-checker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.tools.ConsumerOffsetChecker "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-consumer-perf-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then 18 | export KAFKA_HEAP_OPTS="-Xmx512M" 19 | fi 20 | exec $(dirname $0)/kafka-run-class.sh kafka.tools.ConsumerPerformance "$@" 21 | -------------------------------------------------------------------------------- /bin/kafka-delete-records.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.admin.DeleteRecordsCommand "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-mirror-maker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.tools.MirrorMaker "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-preferred-replica-election.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.admin.PreferredReplicaLeaderElectionCommand "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-producer-perf-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then 18 | export KAFKA_HEAP_OPTS="-Xmx512M" 19 | fi 20 | exec $(dirname $0)/kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance "$@" 21 | -------------------------------------------------------------------------------- /bin/kafka-reassign-partitions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.admin.ReassignPartitionsCommand "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-replay-log-producer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.tools.ReplayLogProducer "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-replica-verification.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.tools.ReplicaVerificationTool "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-server-stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | PIDS=$(ps ax | grep -i 'kafka\.Kafka' | grep java | grep -v grep | awk '{print $1}') 17 | 18 | if [ -z "$PIDS" ]; then 19 | echo "No kafka server to stop" 20 | exit 1 21 | else 22 | kill -s TERM $PIDS 23 | fi 24 | 25 | -------------------------------------------------------------------------------- /bin/kafka-simple-consumer-shell.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.tools.SimpleConsumerShell "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-streams-application-reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then 18 | export KAFKA_HEAP_OPTS="-Xmx512M" 19 | fi 20 | 21 | exec $(dirname $0)/kafka-run-class.sh kafka.tools.StreamsResetter "$@" 22 | -------------------------------------------------------------------------------- /bin/kafka-topics.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.admin.TopicCommand "$@" 18 | -------------------------------------------------------------------------------- /bin/kafka-verifiable-consumer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then 18 | export KAFKA_HEAP_OPTS="-Xmx512M" 19 | fi 20 | exec $(dirname $0)/kafka-run-class.sh org.apache.kafka.tools.VerifiableConsumer "$@" 21 | -------------------------------------------------------------------------------- /bin/kafka-verifiable-producer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then 18 | export KAFKA_HEAP_OPTS="-Xmx512M" 19 | fi 20 | exec $(dirname $0)/kafka-run-class.sh org.apache.kafka.tools.VerifiableProducer "$@" 21 | -------------------------------------------------------------------------------- /bin/windows/kafka-acls.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | %~dp0kafka-run-class.bat kafka.admin.AclCommand %* 18 | -------------------------------------------------------------------------------- /bin/windows/kafka-broker-api-versions.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | %~dp0kafka-run-class.bat kafka.admin.BrokerApiVersionsCommand %* 18 | -------------------------------------------------------------------------------- /bin/windows/kafka-configs.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | %~dp0kafka-run-class.bat kafka.admin.ConfigCommand %* 18 | -------------------------------------------------------------------------------- /bin/windows/kafka-console-consumer.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | SetLocal 18 | set KAFKA_HEAP_OPTS=-Xmx512M 19 | %~dp0kafka-run-class.bat kafka.tools.ConsoleConsumer %* 20 | EndLocal 21 | -------------------------------------------------------------------------------- /bin/windows/kafka-console-producer.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | SetLocal 18 | set KAFKA_HEAP_OPTS=-Xmx512M 19 | %~dp0kafka-run-class.bat kafka.tools.ConsoleProducer %* 20 | EndLocal 21 | -------------------------------------------------------------------------------- /bin/windows/kafka-consumer-groups.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | %~dp0kafka-run-class.bat kafka.admin.ConsumerGroupCommand %* 18 | -------------------------------------------------------------------------------- /bin/windows/kafka-consumer-offset-checker.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | %~dp0kafka-run-class.bat kafka.tools.ConsumerOffsetChecker %* 18 | -------------------------------------------------------------------------------- /bin/windows/kafka-consumer-perf-test.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | SetLocal 18 | set KAFKA_HEAP_OPTS=-Xmx512M -Xms512M 19 | %~dp0kafka-run-class.bat kafka.tools.ConsumerPerformance %* 20 | EndLocal 21 | -------------------------------------------------------------------------------- /bin/windows/kafka-mirror-maker.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | %~dp0kafka-run-class.bat kafka.tools.MirrorMaker %* 18 | -------------------------------------------------------------------------------- /bin/windows/kafka-preferred-replica-election.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | %~dp0kafka-run-class.bat kafka.admin.PreferredReplicaLeaderElectionCommand %* 18 | -------------------------------------------------------------------------------- /bin/windows/kafka-producer-perf-test.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | SetLocal 18 | set KAFKA_HEAP_OPTS=-Xmx512M 19 | %~dp0kafka-run-class.bat org.apache.kafka.tools.ProducerPerformance %* 20 | EndLocal 21 | -------------------------------------------------------------------------------- /bin/windows/kafka-reassign-partitions.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | %~dp0kafka-run-class.bat kafka.admin.ReassignPartitionsCommand %* 18 | -------------------------------------------------------------------------------- /bin/windows/kafka-replay-log-producer.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | %~dp0kafka-run-class.bat kafka.tools.ReplayLogProducer %* 18 | -------------------------------------------------------------------------------- /bin/windows/kafka-replica-verification.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | %~dp0kafka-run-class.bat kafka.tools.ReplicaVerificationTool %* 18 | -------------------------------------------------------------------------------- /bin/windows/kafka-server-stop.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | wmic process where (commandline like "%%kafka.Kafka%%" and not name="wmic.exe") delete 18 | rem ps ax | grep -i 'kafka.Kafka' | grep -v grep | awk '{print $1}' | xargs kill -SIGTERM 19 | -------------------------------------------------------------------------------- /bin/windows/kafka-simple-consumer-shell.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | %~dp0kafka-run-class.bat kafka.tools.SimpleConsumerShell %* 18 | -------------------------------------------------------------------------------- /bin/windows/kafka-topics.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | %~dp0kafka-run-class.bat kafka.admin.TopicCommand %* 18 | -------------------------------------------------------------------------------- /bin/windows/zookeeper-server-stop.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | wmic process where (commandline like "%%zookeeper%%" and not name="wmic.exe") delete 18 | -------------------------------------------------------------------------------- /bin/windows/zookeeper-shell.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more 3 | rem contributor license agreements. See the NOTICE file distributed with 4 | rem this work for additional information regarding copyright ownership. 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 6 | rem (the "License"); you may not use this file except in compliance with 7 | rem the License. You may obtain a copy of the License at 8 | rem 9 | rem http://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, software 12 | rem distributed under the License is distributed on an "AS IS" BASIS, 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | rem See the License for the specific language governing permissions and 15 | rem limitations under the License. 16 | 17 | IF [%1] EQU [] ( 18 | echo USAGE: %0 zookeeper_host:port[/path] [args...] 19 | EXIT /B 1 20 | ) 21 | 22 | %~dp0kafka-run-class.bat org.apache.zookeeper.ZooKeeperMain -server %* 23 | -------------------------------------------------------------------------------- /bin/zookeeper-security-migration.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | exec $(dirname $0)/kafka-run-class.sh kafka.admin.ZkSecurityMigrator "$@" 18 | -------------------------------------------------------------------------------- /bin/zookeeper-server-stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | PIDS=$(ps ax | grep java | grep -i QuorumPeerMain | grep -v grep | awk '{print $1}') 17 | 18 | if [ -z "$PIDS" ]; then 19 | echo "No zookeeper server to stop" 20 | exit 1 21 | else 22 | kill -s TERM $PIDS 23 | fi 24 | 25 | -------------------------------------------------------------------------------- /bin/zookeeper-shell.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | if [ $# -lt 1 ]; 18 | then 19 | echo "USAGE: $0 zookeeper_host:port[/path] [args...]" 20 | exit 1 21 | fi 22 | 23 | exec $(dirname $0)/kafka-run-class.sh org.apache.zookeeper.ZooKeeperMain -server "$@" 24 | -------------------------------------------------------------------------------- /checkstyle/java.header: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | -------------------------------------------------------------------------------- /clients/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/clients/consumer/OffsetResetStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.clients.consumer; 18 | 19 | public enum OffsetResetStrategy { 20 | LATEST, EARLIEST, NONE 21 | } 22 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestFutureListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.clients.consumer.internals; 18 | 19 | /** 20 | * Listener interface to hook into RequestFuture completion. 21 | */ 22 | public interface RequestFutureListener { 23 | 24 | void onSuccess(T value); 25 | 26 | void onFailure(RuntimeException e); 27 | } 28 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/clients/consumer/internals/StaleMetadataException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.clients.consumer.internals; 18 | 19 | import org.apache.kafka.common.errors.InvalidMetadataException; 20 | 21 | /** 22 | * Thrown when metadata is old and needs to be refreshed. 23 | */ 24 | public class StaleMetadataException extends InvalidMetadataException { 25 | private static final long serialVersionUID = 1L; 26 | } 27 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/Metric.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common; 18 | 19 | /** 20 | * A numerical metric tracked for monitoring purposes 21 | */ 22 | public interface Metric { 23 | 24 | /** 25 | * A name for this metric 26 | */ 27 | public MetricName metricName(); 28 | 29 | /** 30 | * The value of the metric 31 | */ 32 | public double value(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/errors/AuthorizationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.errors; 18 | 19 | public class AuthorizationException extends ApiException { 20 | 21 | public AuthorizationException(String message) { 22 | super(message); 23 | } 24 | 25 | public AuthorizationException(String message, Throwable cause) { 26 | super(message, cause); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/errors/ConcurrentTransactionsException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.errors; 18 | 19 | public class ConcurrentTransactionsException extends ApiException { 20 | private static final long serialVersionUID = 1L; 21 | 22 | public ConcurrentTransactionsException(final String message) { 23 | super(message); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/errors/DuplicateSequenceNumberException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.errors; 18 | 19 | public class DuplicateSequenceNumberException extends RetriableException { 20 | 21 | public DuplicateSequenceNumberException(String message) { 22 | super(message); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/errors/InvalidPidMappingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.errors; 18 | 19 | public class InvalidPidMappingException extends ApiException { 20 | public InvalidPidMappingException(String message) { 21 | super(message); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/errors/InvalidRequiredAcksException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.errors; 18 | 19 | public class InvalidRequiredAcksException extends ApiException { 20 | private static final long serialVersionUID = 1L; 21 | 22 | public InvalidRequiredAcksException(String message) { 23 | super(message); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/errors/InvalidTxnStateException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.errors; 18 | 19 | public class InvalidTxnStateException extends ApiException { 20 | public InvalidTxnStateException(String message) { 21 | super(message); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/errors/OutOfOrderSequenceException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.errors; 18 | 19 | public class OutOfOrderSequenceException extends ApiException { 20 | 21 | public OutOfOrderSequenceException(String msg) { 22 | super(msg); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/errors/ProducerFencedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.errors; 18 | 19 | public class ProducerFencedException extends ApiException { 20 | 21 | public ProducerFencedException(String msg) { 22 | super(msg); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/errors/TransactionalIdAuthorizationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.errors; 18 | 19 | public class TransactionalIdAuthorizationException extends AuthorizationException { 20 | public TransactionalIdAuthorizationException(final String message) { 21 | super(message); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/header/Header.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.header; 18 | 19 | public interface Header { 20 | 21 | String key(); 22 | 23 | byte[] value(); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/network/Mode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.network; 18 | 19 | /** 20 | * Connection mode for SSL and SASL connections. 21 | */ 22 | public enum Mode { CLIENT, SERVER } 23 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/requests/RequestAndSize.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.requests; 18 | 19 | public class RequestAndSize { 20 | public final AbstractRequest request; 21 | public final int size; 22 | 23 | public RequestAndSize(AbstractRequest request, int size) { 24 | this.request = request; 25 | this.size = size; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/security/authenticator/DefaultLogin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.security.authenticator; 18 | 19 | public class DefaultLogin extends AbstractLogin { 20 | 21 | @Override 22 | public String serviceName() { 23 | return "kafka"; 24 | } 25 | 26 | @Override 27 | public void close() { 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/security/kerberos/BadFormatString.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.security.kerberos; 18 | 19 | import java.io.IOException; 20 | 21 | public class BadFormatString extends IOException { 22 | BadFormatString(String msg) { 23 | super(msg); 24 | } 25 | BadFormatString(String msg, Throwable err) { 26 | super(msg, err); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /clients/src/main/java/org/apache/kafka/common/security/kerberos/NoMatchingRule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.common.security.kerberos; 18 | 19 | import java.io.IOException; 20 | 21 | public class NoMatchingRule extends IOException { 22 | NoMatchingRule(String msg) { 23 | super(msg); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /clients/src/test/java/org/apache/kafka/test/IntegrationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.test; 18 | 19 | public interface IntegrationTest { 20 | } 21 | -------------------------------------------------------------------------------- /clients/src/test/java/org/apache/kafka/test/TestCondition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.test; 18 | 19 | /** 20 | * Interface to wrap actions that are required to wait until a condition is met 21 | * for testing purposes. Note that this is not intended to do any assertions. 22 | */ 23 | public interface TestCondition { 24 | 25 | boolean conditionMet(); 26 | } 27 | -------------------------------------------------------------------------------- /clients/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | log4j.rootLogger=OFF, stdout 16 | 17 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 18 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 19 | log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n 20 | 21 | log4j.logger.org.apache.kafka=ERROR 22 | -------------------------------------------------------------------------------- /clients/src/test/resources/serializedData/offsetAndMetadataSerializedfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/clients/src/test/resources/serializedData/offsetAndMetadataSerializedfile -------------------------------------------------------------------------------- /clients/src/test/resources/serializedData/topicPartitionSerializedfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/clients/src/test/resources/serializedData/topicPartitionSerializedfile -------------------------------------------------------------------------------- /config/connect-console-sink.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | name=local-console-sink 17 | connector.class=org.apache.kafka.connect.file.FileStreamSinkConnector 18 | tasks.max=1 19 | topics=connect-test -------------------------------------------------------------------------------- /config/connect-console-source.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | name=local-console-source 17 | connector.class=org.apache.kafka.connect.file.FileStreamSourceConnector 18 | tasks.max=1 19 | topic=connect-test -------------------------------------------------------------------------------- /config/connect-file-sink.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | name=local-file-sink 17 | connector.class=FileStreamSink 18 | tasks.max=1 19 | file=test.sink.txt 20 | topics=connect-test -------------------------------------------------------------------------------- /config/connect-file-source.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | name=local-file-source 17 | connector.class=FileStreamSource 18 | tasks.max=1 19 | file=test.txt 20 | topic=connect-test -------------------------------------------------------------------------------- /config/connect-log4j.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | log4j.rootLogger=INFO, stdout 17 | 18 | 19 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 20 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 21 | log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n 22 | 23 | log4j.logger.org.apache.zookeeper=ERROR 24 | log4j.logger.org.I0Itec.zkclient=ERROR 25 | log4j.logger.org.reflections=ERROR 26 | -------------------------------------------------------------------------------- /config/tools-log4j.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | log4j.rootLogger=WARN, stderr 17 | 18 | log4j.appender.stderr=org.apache.log4j.ConsoleAppender 19 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout 20 | log4j.appender.stderr.layout.ConversionPattern=[%d] %p %m (%c)%n 21 | log4j.appender.stderr.Target=System.err 22 | -------------------------------------------------------------------------------- /config/zookeeper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # the directory where the snapshot is stored. 16 | dataDir=/tmp/zookeeper 17 | # the port at which the clients will connect 18 | clientPort=2181 19 | # disable the per-ip limit on the number of connections since this is a non-production config 20 | maxClientCnxns=0 21 | -------------------------------------------------------------------------------- /connect/api/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /connect/api/src/main/java/org/apache/kafka/connect/source/SourceConnector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.connect.source; 18 | 19 | import org.apache.kafka.connect.connector.Connector; 20 | 21 | /** 22 | * SourceConnectors implement the connector interface to pull data from another system and send 23 | * it to Kafka. 24 | */ 25 | public abstract class SourceConnector extends Connector { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /connect/json/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /connect/json/src/test/resources/connect-test.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | schemas.cache.size=1 17 | 18 | -------------------------------------------------------------------------------- /connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/RebalanceNeededException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.connect.runtime.distributed; 18 | 19 | import org.apache.kafka.connect.errors.ConnectException; 20 | 21 | public class RebalanceNeededException extends ConnectException { 22 | 23 | public RebalanceNeededException(String s) { 24 | super(s); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/errors/BadRequestException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.connect.runtime.rest.errors; 18 | 19 | import javax.ws.rs.core.Response; 20 | 21 | public class BadRequestException extends ConnectRestException { 22 | 23 | public BadRequestException(String message) { 24 | super(Response.Status.BAD_REQUEST, message); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /connect/runtime/src/main/java/org/apache/kafka/connect/util/SinkUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.connect.util; 18 | 19 | public final class SinkUtils { 20 | 21 | private SinkUtils() {} 22 | 23 | public static String consumerGroupId(String connector) { 24 | return "connect-" + connector; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /connect/runtime/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | ## 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ## 17 | log4j.rootLogger=OFF, stdout 18 | 19 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 20 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 21 | log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n 22 | 23 | log4j.logger.org.apache.kafka=ERROR 24 | -------------------------------------------------------------------------------- /core/.gitignore: -------------------------------------------------------------------------------- 1 | .cache-main 2 | .cache-tests 3 | /bin/ 4 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/admin/AdminOperationException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.admin 19 | 20 | class AdminOperationException(val error: String, cause: Throwable) extends RuntimeException(error, cause) { 21 | def this(error: Throwable) = this(error.getMessage, error) 22 | def this(msg: String) = this(msg, null) 23 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/admin/BrokerMetadata.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE 3 | * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file 4 | * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the 5 | * License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package kafka.admin 15 | 16 | /** 17 | * Broker metadata used by admin tools. 18 | * 19 | * @param id an integer that uniquely identifies this broker 20 | * @param rack the rack of the broker, which is used to in rack aware partition assignment for fault tolerance. 21 | * Examples: "RACK1", "us-east-1d" 22 | */ 23 | case class BrokerMetadata(id: Int, rack: Option[String]) 24 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/AdminCommandFailedException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | class AdminCommandFailedException(message: String, cause: Throwable) extends RuntimeException(message, cause) { 21 | def this(message: String) = this(message, null) 22 | def this() = this(null, null) 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/BrokerEndPointNotAvailableException.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | class BrokerEndPointNotAvailableException(message: String) extends RuntimeException(message) { 21 | def this() = this(null) 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/BrokerNotAvailableException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | class BrokerNotAvailableException(message: String) extends RuntimeException(message) { 21 | def this() = this(null) 22 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/ConsumerCoordinatorNotAvailableException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | class ConsumerCoordinatorNotAvailableException(message: String) extends RuntimeException(message) { 21 | def this() = this(null) 22 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/ConsumerRebalanceFailedException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Thrown when a request is made for broker but no brokers with that topic 22 | * exist. 23 | */ 24 | class ConsumerRebalanceFailedException(message: String) extends RuntimeException(message) { 25 | def this() = this(null) 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/ControllerMovedException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | class ControllerMovedException(message: String, cause: Throwable) extends RuntimeException(message, cause) { 21 | def this(message: String) = this(message, null) 22 | def this() = this(null, null) 23 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/FailedToSendMessageException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package kafka.common 18 | 19 | /** 20 | * Indicates a producer pool initialization problem 21 | */ 22 | class FailedToSendMessageException(message: String, t: Throwable) extends RuntimeException(message, t) { 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/InvalidConfigException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Indicates that the given config parameter has invalid value 22 | */ 23 | class InvalidConfigException(message: String) extends RuntimeException(message) { 24 | def this() = this(null) 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/InvalidMessageSizeException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Indicates the client has requested a range no longer available on the server 22 | */ 23 | class InvalidMessageSizeException(message: String) extends RuntimeException(message) { 24 | def this() = this(null) 25 | } 26 | 27 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/InvalidOffsetException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | class InvalidOffsetException(message: String) extends RuntimeException(message) { 21 | def this() = this(null) 22 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/KafkaException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package kafka.common 18 | 19 | /** 20 | * Generic Kafka exception 21 | */ 22 | class KafkaException(message: String, t: Throwable) extends RuntimeException(message, t) { 23 | def this(message: String) = this(message, null) 24 | def this(t: Throwable) = this("", t) 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/KafkaStorageException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package kafka.common 18 | 19 | /** 20 | * Kafka exception caused by real IOs. 21 | */ 22 | class KafkaStorageException(message: String, t: Throwable) extends RuntimeException(message, t) { 23 | def this(message: String) = this(message, null) 24 | def this(t: Throwable) = this("", t) 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/LeaderElectionNotNeededException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package kafka.common 18 | 19 | /** 20 | * This exception is thrown when new leader election is not necessary. 21 | */ 22 | class LeaderElectionNotNeededException(message: String, cause: Throwable) extends RuntimeException(message, cause) { 23 | def this(message: String) = this(message, null) 24 | def this() = this(null, null) 25 | } 26 | 27 | 28 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/LeaderNotAvailableException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Thrown when a request is made for partition, but no leader exists for that partition 22 | */ 23 | class LeaderNotAvailableException(message: String, cause: Throwable) extends RuntimeException(message, cause) { 24 | def this(message: String) = this(message, null) 25 | def this() = this(null, null) 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/LogCleaningAbortedException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Thrown when a log cleaning task is requested to be aborted. 22 | */ 23 | class LogCleaningAbortedException() extends RuntimeException() { 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/MessageSetSizeTooLargeException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | class MessageSetSizeTooLargeException(message: String) extends RuntimeException(message) { 21 | def this() = this(null) 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/MessageSizeTooLargeException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | class MessageSizeTooLargeException(message: String) extends RuntimeException(message) { 21 | def this() = this(null) 22 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/MessageStreamsExistException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package kafka.common 18 | 19 | /** 20 | * Indicates a createMessageStreams can't be called more than once 21 | */ 22 | class MessageStreamsExistException(message: String, t: Throwable) extends RuntimeException(message, t) { 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/NoBrokersForPartitionException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Thrown when a request is made for broker but no brokers with that topic 22 | * exist. 23 | */ 24 | class NoBrokersForPartitionException(message: String) extends RuntimeException(message) { 25 | def this() = this(null) 26 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/NoEpochForPartitionException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Thrown when a get epoch request is made for partition, but no epoch exists for that partition 22 | */ 23 | class NoEpochForPartitionException(message: String) extends RuntimeException(message) { 24 | def this() = this(null) 25 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/NotAssignedReplicaException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | class NotAssignedReplicaException(message: String, cause: Throwable) extends RuntimeException(message, cause) { 21 | def this(message: String) = this(message, null) 22 | def this() = this(null, null) 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/NotCoordinatorForConsumerException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | class NotCoordinatorForConsumerException(message: String) extends RuntimeException(message) { 21 | def this() = this(null) 22 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/NotEnoughReplicasException.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Message was rejected because number of insync replicas for the partition is lower than min.insync.replicas 22 | */ 23 | class NotEnoughReplicasException(message: String) extends RuntimeException(message) { 24 | def this() = this(null) 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/NotLeaderForPartitionException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Thrown when a request is made for partition on a broker that is NOT a leader for that partition 22 | */ 23 | class NotLeaderForPartitionException(message: String) extends RuntimeException(message) { 24 | def this() = this(null) 25 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/OffsetMetadataTooLargeException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Indicates the client has specified offset metadata that exceeds the configured 22 | * maximum size in bytes 23 | */ 24 | class OffsetMetadataTooLargeException(message: String) extends RuntimeException(message) { 25 | def this() = this(null) 26 | } 27 | 28 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/OffsetOutOfRangeException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Indicates the client has requested a range no longer available on the server 22 | */ 23 | class OffsetOutOfRangeException(message: String) extends RuntimeException(message) { 24 | def this() = this(null) 25 | } 26 | 27 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/OffsetsLoadInProgressException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Indicates that offsets are currently being loaded from disk into the cache so offset fetch requests cannot be satisfied. 22 | */ 23 | class OffsetsLoadInProgressException(message: String) extends RuntimeException(message) { 24 | def this() = this(null) 25 | } 26 | 27 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/QueueFullException.scala: -------------------------------------------------------------------------------- 1 | package kafka.common 2 | 3 | /** 4 | * Licensed to the Apache Software Foundation (ASF) under one or more 5 | * contributor license agreements. See the NOTICE file distributed with 6 | * this work for additional information regarding copyright ownership. 7 | * The ASF licenses this file to You under the Apache License, Version 2.0 8 | * (the "License"); you may not use this file except in compliance with 9 | * the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | /* Indicates the queue for sending messages is full of unsent messages */ 21 | class QueueFullException(message: String) extends RuntimeException(message) { 22 | def this() = this(null) 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/ReplicaNotAvailableException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Thrown when a request is made for partition, but no leader exists for that partition 22 | */ 23 | class ReplicaNotAvailableException(cause: Throwable, message: String = "") extends RuntimeException(cause) { 24 | def this() = this(null, "") 25 | def this(message: String) = this(null, message) 26 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/StateChangeFailedException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | class StateChangeFailedException(message: String, cause: Throwable) extends RuntimeException(message, cause) { 21 | def this(message: String) = this(message, null) 22 | def this() = this(null, null) 23 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/StreamEndException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package kafka.common 18 | 19 | /** 20 | * An exception that indicates KafkaStream has ended. 21 | */ 22 | class StreamEndException() extends RuntimeException { 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/ThreadShutdownException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * An exception that indicates a thread is being shut down normally. 22 | */ 23 | class ThreadShutdownException() extends RuntimeException { 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/TopicAlreadyMarkedForDeletionException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | class TopicAlreadyMarkedForDeletionException(message: String) extends RuntimeException(message) { 21 | } -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/UnavailableProducerException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package kafka.common 18 | 19 | /** 20 | * Indicates a producer pool initialization problem 21 | */ 22 | class UnavailableProducerException(message: String) extends RuntimeException(message) { 23 | def this() = this(null) 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/UnknownCodecException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Indicates the client has requested a range no longer available on the server 22 | */ 23 | class UnknownCodecException(message: String) extends RuntimeException(message) { 24 | def this() = this(null) 25 | } 26 | 27 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/UnknownException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * If we don't know what else it is, call it this 22 | */ 23 | class UnknownException extends RuntimeException 24 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/common/UnknownMagicByteException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.common 19 | 20 | /** 21 | * Indicates the client has requested a range no longer available on the server 22 | */ 23 | class UnknownMagicByteException(message: String) extends RuntimeException(message) { 24 | def this() = this(null) 25 | } 26 | 27 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/consumer/FetchedDataChunk.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.consumer 19 | 20 | import kafka.message.ByteBufferMessageSet 21 | 22 | @deprecated("This class has been deprecated and will be removed in a future release.", "0.11.0.0") 23 | case class FetchedDataChunk(messages: ByteBufferMessageSet, 24 | topicInfo: PartitionTopicInfo, 25 | fetchOffset: Long) 26 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/consumer/TopicEventHandler.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.consumer 19 | 20 | @deprecated("This trait has been deprecated and will be removed in a future release.", "0.11.0.0") 21 | trait TopicEventHandler[T] { 22 | 23 | def handleTopicEvent(allTopics: Seq[T]) 24 | 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/consumer/package.html: -------------------------------------------------------------------------------- 1 | 19 | This is the consumer API for kafka. -------------------------------------------------------------------------------- /core/src/main/scala/kafka/message/MessageLengthException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.message 19 | 20 | /** 21 | * Indicates the presence of a message that exceeds the maximum acceptable 22 | * length (whatever that happens to be) 23 | */ 24 | class MessageLengthException(message: String) extends RuntimeException(message) 25 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/message/package.html: -------------------------------------------------------------------------------- 1 | 19 | Messages and everything related to them. -------------------------------------------------------------------------------- /core/src/main/scala/kafka/network/ConnectionConfig.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.network 19 | 20 | trait ConnectionConfig { 21 | val host: String 22 | val port: Int 23 | val sendBufferSize: Int = -1 24 | val receiveBufferSize: Int = -1 25 | val tcpNoDelay = true 26 | val keepAlive = false 27 | } 28 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/producer/ProducerClosedException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.producer 19 | 20 | @deprecated("This class has been deprecated and will be removed in a future release.", "0.10.0.0") 21 | class ProducerClosedException() extends RuntimeException("producer already closed") { 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/producer/async/IllegalQueueStateException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.producer.async 19 | 20 | /** 21 | * Indicates that the given config parameter has invalid value 22 | */ 23 | @deprecated("This class has been deprecated and will be removed in a future release.", "0.10.0.0") 24 | class IllegalQueueStateException(message: String) extends RuntimeException(message) { 25 | def this() = this(null) 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/producer/async/MissingConfigException.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package kafka.producer.async 19 | 20 | /* Indicates any missing configuration parameter */ 21 | @deprecated("This class has been deprecated and will be removed in a future release.", "0.10.0.0") 22 | class MissingConfigException(message: String) extends RuntimeException(message) { 23 | def this() = this(null) 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/scala/kafka/server/package.html: -------------------------------------------------------------------------------- 1 | 19 | The kafka server. -------------------------------------------------------------------------------- /core/src/test/resources/minikdc-krb5.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | [libdefaults] 19 | default_realm = {0} 20 | udp_preference_limit = 1 21 | 22 | [realms] 23 | {0} = '{' 24 | kdc = {1}:{2} 25 | '}' 26 | -------------------------------------------------------------------------------- /core/src/test/scala/integration/kafka/api/SslConsumerTest.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE 3 | * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file 4 | * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the 5 | * License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package kafka.api 14 | 15 | import java.io.File 16 | 17 | import org.apache.kafka.common.protocol.SecurityProtocol 18 | 19 | class SslConsumerTest extends BaseConsumerTest { 20 | override protected def securityProtocol = SecurityProtocol.SSL 21 | override protected lazy val trustStoreFile = Some(File.createTempFile("truststore", ".jks")) 22 | } 23 | -------------------------------------------------------------------------------- /core/src/test/scala/other/kafka.log4j.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | log4j.rootLogger=INFO, KAFKA 16 | 17 | log4j.appender.KAFKA=kafka.log4j.KafkaAppender 18 | 19 | log4j.appender.KAFKA.Port=9092 20 | log4j.appender.KAFKA.Host=localhost 21 | log4j.appender.KAFKA.Topic=test-logger 22 | log4j.appender.KAFKA.Serializer=kafka.AppenderStringSerializer 23 | -------------------------------------------------------------------------------- /docs/documentation/streams.html: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/ecosystem.html: -------------------------------------------------------------------------------- 1 | 17 | 18 | There are a plethora of tools that integrate with Kafka outside the main distribution. The ecosystem page lists many of these, including stream processing systems, Hadoop integration, monitoring, and deployment tools. 19 | -------------------------------------------------------------------------------- /docs/images/consumer-groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/consumer-groups.png -------------------------------------------------------------------------------- /docs/images/kafka-apis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/kafka-apis.png -------------------------------------------------------------------------------- /docs/images/kafka_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/kafka_log.png -------------------------------------------------------------------------------- /docs/images/kafka_multidc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/kafka_multidc.png -------------------------------------------------------------------------------- /docs/images/kafka_multidc_complex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/kafka_multidc_complex.png -------------------------------------------------------------------------------- /docs/images/log_anatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/log_anatomy.png -------------------------------------------------------------------------------- /docs/images/log_cleaner_anatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/log_cleaner_anatomy.png -------------------------------------------------------------------------------- /docs/images/log_compaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/log_compaction.png -------------------------------------------------------------------------------- /docs/images/log_consumer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/log_consumer.png -------------------------------------------------------------------------------- /docs/images/mirror-maker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/mirror-maker.png -------------------------------------------------------------------------------- /docs/images/producer_consumer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/producer_consumer.png -------------------------------------------------------------------------------- /docs/images/streams-architecture-overview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/streams-architecture-overview.jpg -------------------------------------------------------------------------------- /docs/images/streams-architecture-states.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/streams-architecture-states.jpg -------------------------------------------------------------------------------- /docs/images/streams-architecture-tasks.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/streams-architecture-tasks.jpg -------------------------------------------------------------------------------- /docs/images/streams-architecture-threads.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/streams-architecture-threads.jpg -------------------------------------------------------------------------------- /docs/images/streams-architecture-topology.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/streams-architecture-topology.jpg -------------------------------------------------------------------------------- /docs/images/streams-concepts-topology.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/streams-concepts-topology.jpg -------------------------------------------------------------------------------- /docs/images/streams-table-duality-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/streams-table-duality-01.png -------------------------------------------------------------------------------- /docs/images/streams-table-duality-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/streams-table-duality-02.png -------------------------------------------------------------------------------- /docs/images/streams-table-duality-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/streams-table-duality-03.png -------------------------------------------------------------------------------- /docs/images/streams-table-updates-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/streams-table-updates-01.png -------------------------------------------------------------------------------- /docs/images/streams-table-updates-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/streams-table-updates-02.png -------------------------------------------------------------------------------- /docs/images/tracking_high_level.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/kafka/bc47e9d6ca976ba3c15249500b2bb6f6355816bc/docs/images/tracking_high_level.png -------------------------------------------------------------------------------- /docs/js/templateData.js: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one or more 3 | contributor license agreements. See the NOTICE file distributed with 4 | this work for additional information regarding copyright ownership. 5 | The ASF licenses this file to You under the Apache License, Version 2.0 6 | (the "License"); you may not use this file except in compliance with 7 | the License. You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | 18 | // Define variables for doc templates 19 | var context={ 20 | "version": "0110", 21 | "dotVersion": "0.11.0" 22 | }; -------------------------------------------------------------------------------- /examples/README: -------------------------------------------------------------------------------- 1 | This directory contains examples of client code that uses kafka. 2 | 3 | To run the demo: 4 | 5 | 1. Start Zookeeper and the Kafka server 6 | 2. For simple consumer demo, `run bin/java-simple-consumer-demo.sh` 7 | 3. For unlimited sync-producer-consumer run, `run bin/java-producer-consumer-demo.sh sync` 8 | 4. For unlimited async-producer-consumer run, `run bin/java-producer-consumer-demo.sh` 9 | 10 | -------------------------------------------------------------------------------- /examples/bin/java-producer-consumer-demo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | base_dir=$(dirname $0)/../.. 18 | 19 | if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then 20 | export KAFKA_HEAP_OPTS="-Xmx512M" 21 | fi 22 | exec $base_dir/bin/kafka-run-class.sh kafka.examples.KafkaConsumerProducerDemo $@ 23 | -------------------------------------------------------------------------------- /examples/bin/java-simple-consumer-demo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | base_dir=$(dirname $0)/../.. 18 | 19 | if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then 20 | export KAFKA_HEAP_OPTS="-Xmx512M" 21 | fi 22 | exec $base_dir/bin/kafka-run-class.sh kafka.examples.SimpleConsumerDemo $@ 23 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | group=org.apache.kafka 17 | # NOTE: When you change this version number, you should also make sure to update 18 | # the version numbers in tests/kafkatest/__init__.py and kafka-merge-pr.py. 19 | version=0.11.1.0-SNAPSHOT 20 | scalaVersion=2.11.11 21 | task=build 22 | org.gradle.jvmargs=-XX:MaxPermSize=512m -Xmx1024m -Xss2m 23 | -------------------------------------------------------------------------------- /gradle/buildscript.gradle: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one or more 2 | // contributor license agreements. See the NOTICE file distributed with 3 | // this work for additional information regarding copyright ownership. 4 | // The ASF licenses this file to You under the Apache License, Version 2.0 5 | // (the "License"); you may not use this file except in compliance with 6 | // the License. You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | repositories { 17 | repositories { 18 | // For license plugin. 19 | maven { 20 | url 'http://dl.bintray.com/content/netflixoss/external-gradle-plugins/' 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one or more 2 | // contributor license agreements. See the NOTICE file distributed with 3 | // this work for additional information regarding copyright ownership. 4 | // The ASF licenses this file to You under the Apache License, Version 2.0 5 | // (the "License"); you may not use this file except in compliance with 6 | // the License. You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | include 'core', 'examples', 'clients', 'tools', 'streams', 'streams:examples', 'log4j-appender', 17 | 'connect:api', 'connect:transforms', 'connect:runtime', 'connect:json', 'connect:file', 'jmh-benchmarks' 18 | -------------------------------------------------------------------------------- /streams/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamAggProcessorSupplier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.streams.kstream.internals; 18 | 19 | import org.apache.kafka.streams.processor.ProcessorSupplier; 20 | 21 | public interface KStreamAggProcessorSupplier extends ProcessorSupplier { 22 | 23 | KTableValueGetterSupplier view(); 24 | 25 | void enableSendingOldValues(); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableProcessorSupplier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.streams.kstream.internals; 18 | 19 | import org.apache.kafka.streams.processor.ProcessorSupplier; 20 | 21 | public interface KTableProcessorSupplier extends ProcessorSupplier> { 22 | 23 | KTableValueGetterSupplier view(); 24 | 25 | void enableSendingOldValues(); 26 | } 27 | -------------------------------------------------------------------------------- /streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableValueGetter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.streams.kstream.internals; 18 | 19 | import org.apache.kafka.streams.processor.ProcessorContext; 20 | 21 | public interface KTableValueGetter { 22 | 23 | void init(ProcessorContext context); 24 | 25 | V get(K key); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableValueGetterSupplier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.streams.kstream.internals; 18 | 19 | public interface KTableValueGetterSupplier { 20 | 21 | KTableValueGetter get(); 22 | 23 | String[] storeNames(); 24 | } 25 | -------------------------------------------------------------------------------- /streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStateManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.streams.processor.internals; 18 | 19 | import java.util.Set; 20 | 21 | public interface GlobalStateManager extends StateManager { 22 | Set initialize(InternalProcessorContext processorContext); 23 | } 24 | -------------------------------------------------------------------------------- /streams/src/main/java/org/apache/kafka/streams/processor/internals/Punctuator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.streams.processor.internals; 18 | 19 | public interface Punctuator { 20 | 21 | void punctuate(ProcessorNode node, long streamTime); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordDeserializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.streams.processor.internals; 18 | 19 | import org.apache.kafka.clients.consumer.ConsumerRecord; 20 | 21 | interface RecordDeserializer { 22 | ConsumerRecord deserialize(final ConsumerRecord rawRecord); 23 | } 24 | -------------------------------------------------------------------------------- /streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/TaskAssignor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.streams.processor.internals.assignment; 18 | 19 | public interface TaskAssignor> { 20 | void assign(int numStandbyReplicas); 21 | } 22 | -------------------------------------------------------------------------------- /streams/src/main/java/org/apache/kafka/streams/state/internals/CacheFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.apache.kafka.streams.state.internals; 19 | 20 | import org.apache.kafka.common.utils.Bytes; 21 | 22 | interface CacheFunction { 23 | Bytes key(Bytes cacheKey); 24 | Bytes cacheKey(Bytes cacheKey); 25 | } 26 | -------------------------------------------------------------------------------- /streams/src/main/java/org/apache/kafka/streams/state/internals/HasNextCondition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.streams.state.internals; 18 | 19 | import org.apache.kafka.common.utils.Bytes; 20 | import org.apache.kafka.streams.state.KeyValueIterator; 21 | 22 | interface HasNextCondition { 23 | boolean hasNext(final KeyValueIterator iterator); 24 | } 25 | -------------------------------------------------------------------------------- /streams/src/main/java/org/apache/kafka/streams/state/internals/PeekingKeyValueIterator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.kafka.streams.state.internals; 18 | 19 | import org.apache.kafka.streams.KeyValue; 20 | import org.apache.kafka.streams.state.KeyValueIterator; 21 | 22 | public interface PeekingKeyValueIterator extends KeyValueIterator { 23 | 24 | KeyValue peekNext(); 25 | } 26 | -------------------------------------------------------------------------------- /streams/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | log4j.rootLogger=WARN, stdout 16 | 17 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 18 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 19 | log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n 20 | 21 | log4j.logger.org.apache.kafka=WARN -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | Vagrantfile.local 2 | 3 | .idea/ 4 | 5 | *.pyc 6 | *.ipynb 7 | 8 | .DS_Store 9 | 10 | .ducktape 11 | results/ 12 | *.json 13 | -------------------------------------------------------------------------------- /tests/MANIFEST.in: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | recursive-include kafkatest */templates/* 17 | -------------------------------------------------------------------------------- /tests/docker/ssh/authorized_keys: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0qDT9kEPWc8JQ53b4KnT/ZJOLwb+3c//jpLW/2ofjDyIsPW4FohLpicfouch/zsRpN4G38lua+2BsGls9sMIZc6PXY2L+NIGCkqEMdCoU1Ym8SMtyJklfzp3m/0PeK9s2dLlR3PFRYvyFA4btQK5hkbYDNZPzf4airvzdRzLkrFf81+RemaMI2EtONwJRcbLViPaTXVKJdbFwJTJ1u7yu9wDYWHKBMA92mHTQeP6bhVYCqxJn3to/RfZYd+sHw6mfxVg5OrAlUOYpSV4pDNCAsIHdtZ56V8NQlJL6NJ2vzzSSYUwLMqe88fhrC8yYHoxC07QPy1EdkSTHdohAicyT root@knode01.knw 16 | -------------------------------------------------------------------------------- /tests/docker/ssh/config: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | Host * 17 | ControlMaster auto 18 | ControlPath ~/.ssh/master-%r@%h:%p 19 | StrictHostKeyChecking no 20 | ConnectTimeout=10 21 | IdentityFile ~/.ssh/id_rsa 22 | -------------------------------------------------------------------------------- /tests/docker/ssh/id_rsa.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0qDT9kEPWc8JQ53b4KnT/ZJOLwb+3c//jpLW/2ofjDyIsPW4FohLpicfouch/zsRpN4G38lua+2BsGls9sMIZc6PXY2L+NIGCkqEMdCoU1Ym8SMtyJklfzp3m/0PeK9s2dLlR3PFRYvyFA4btQK5hkbYDNZPzf4airvzdRzLkrFf81+RemaMI2EtONwJRcbLViPaTXVKJdbFwJTJ1u7yu9wDYWHKBMA92mHTQeP6bhVYCqxJn3to/RfZYd+sHw6mfxVg5OrAlUOYpSV4pDNCAsIHdtZ56V8NQlJL6NJ2vzzSSYUwLMqe88fhrC8yYHoxC07QPy1EdkSTHdohAicyT root@knode01.knw 2 | -------------------------------------------------------------------------------- /tests/kafkatest/benchmarks/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/kafkatest/benchmarks/core/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/kafkatest/benchmarks/streams/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/kafkatest/directory_layout/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/kafkatest/sanity_checks/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. -------------------------------------------------------------------------------- /tests/kafkatest/services/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/kafkatest/services/kafka/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | from kafka import KafkaService 17 | from util import TopicPartition 18 | -------------------------------------------------------------------------------- /tests/kafkatest/services/kafka/util.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | from collections import namedtuple 17 | 18 | TopicPartition = namedtuple('TopicPartition', ['topic', 'partition']) 19 | -------------------------------------------------------------------------------- /tests/kafkatest/services/monitor/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/kafkatest/services/performance/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | from performance import PerformanceService, throughput, latency, compute_aggregate_throughput 17 | from end_to_end_latency import EndToEndLatencyService 18 | from producer_performance import ProducerPerformanceService 19 | from consumer_performance import ConsumerPerformanceService 20 | -------------------------------------------------------------------------------- /tests/kafkatest/services/security/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | -------------------------------------------------------------------------------- /tests/kafkatest/services/security/templates/minikdc.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | kdc.bind.address=0.0.0.0 17 | 18 | -------------------------------------------------------------------------------- /tests/kafkatest/services/templates/console_consumer.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | group.id={{ group_id|default('test-consumer-group') }} 17 | 18 | {% if client_id is defined and client_id is not none %} 19 | client.id={{ client_id }} 20 | {% endif %} 21 | 22 | {% if consumer_metadata_max_age_ms is defined and consumer_metadata_max_age_ms is not none %} 23 | metadata.max.age.ms={{ consumer_metadata_max_age_ms }} 24 | {% endif %} 25 | -------------------------------------------------------------------------------- /tests/kafkatest/services/templates/consumer.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # see kafka.consumer.ConsumerConfig for more details 16 | 17 | zookeeper.connect={{ zookeeper_connect }} 18 | zookeeper.connection.timeout.ms={{ zookeeper_connection_timeout_ms|default(6000) }} 19 | group.id={{ group_id|default('test-consumer-group') }} 20 | 21 | {% if consumer_timeout_ms is defined and consumer_timeout_ms is not none %} 22 | consumer.timeout.ms={{ consumer_timeout_ms }} 23 | {% endif %} 24 | -------------------------------------------------------------------------------- /tests/kafkatest/services/templates/zookeeper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | dataDir=/mnt/zookeeper 17 | clientPort=2181 18 | maxClientCnxns=0 19 | initLimit=5 20 | syncLimit=2 21 | quorumListenOnAllIPs=true 22 | {% for node in nodes %} 23 | server.{{ loop.index }}={{ node.account.hostname }}:2888:3888 24 | {% endfor %} 25 | -------------------------------------------------------------------------------- /tests/kafkatest/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/kafkatest/tests/client/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/kafkatest/tests/connect/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/kafkatest/tests/core/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/kafkatest/tests/streams/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/kafkatest/tests/tools/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/kafkatest/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | from util import kafkatest_version, is_version, is_int, is_int_with_prefix 17 | -------------------------------------------------------------------------------- /tests/unit/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/unit/directory_layout/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /tests/unit/setup.cfg: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # pytest configuration (can also be defined in in tox.ini or pytest.ini file) 17 | # 18 | # To ease possible confusion, prefix muckrake *unit* tests with 'check' instead of 'test', since 19 | # many muckrake files, classes, and methods have 'test' somewhere in the name 20 | [pytest] 21 | python_files=check_*.py 22 | python_classes=Check 23 | python_functions=check_* 24 | -------------------------------------------------------------------------------- /tests/unit/version/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | -------------------------------------------------------------------------------- /vagrant/system-test-Vagrantfile.local: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Use this example Vagrantfile.local for running system tests 17 | # To use it, move it to the base kafka directory and rename 18 | # it to Vagrantfile.local 19 | num_zookeepers = 0 20 | num_brokers = 0 21 | num_workers = 9 22 | base_box = "kafkatest-worker" 23 | 24 | 25 | # System tests use hostnames for each worker that need to be defined in /etc/hosts on the host running ducktape 26 | enable_dns = true 27 | -------------------------------------------------------------------------------- /wrapper.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | defaultTasks 'downloadWrapper' 21 | 22 | task downloadWrapper(type: Wrapper) { 23 | description = "Download the gradle wrapper and requisite files. Overwrites existing wrapper files." 24 | gradleVersion = project.gradleVersion 25 | } --------------------------------------------------------------------------------