Module ImportFrom alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Dict Str Str Str Str Str Str Num Num Num Num BinOpAdd Str NameLoad TupleLoad Num Num Num FunctionDef arguments args NameParam NameParam NameParam NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body If CompareIn NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index Str Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str While AttributeLoad NameLoad attr body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str While BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr BoolOpOr Call AttributeLoad AttributeLoad NameLoad attr attr CompareGt Call AttributeLoad AttributeLoad NameLoad attr attr Num body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str While AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Num For NameStore Call NameLoad NameLoad body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad BinOpMult NameLoad Num NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad NameLoad Assign NameStore Num For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad attr AttributeLoad NameLoad attr NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Assign NameStore Call NameLoad ListComp TupleLoad AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad For TupleStore NameStore NameStore AttributeLoad NameLoad attr body For TupleStore NameStore NameStore NameStore NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad orelse For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If CompareIs NameLoad AttributeLoad NameLoad attr body Assign NameStore NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr BinOpSub BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Num NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse If CompareIs NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If Call NameLoad NameLoad Str NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return BoolOpAnd CompareLt AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Call NameLoad NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad NameLoad Assign NameStore IfExp CompareGtE SubscriptLoad AttributeLoad NameLoad attr Index Str TupleLoad Num Num Num Num Return Call SubscriptLoad NameLoad Index NameLoad keyword NameLoad keyword NameLoad keyword ListComp TupleLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list
N/A __future__ absolute_import N/A collections N/A copy N/A logging N/A threading N/A six N/A errors Errors structs TopicPartition version __version__ protocol.produce ProduceRequest N/A log N/A N/A logging getLogger __name__ Sender N/A N/A threading Thread N/A N/A 
    The background thread that handles the sending of produce requests to the
    Kafka cluster. This thread makes metadata requests to renew its view of the
    cluster and then sends produce requests to the appropriate nodes.
     N/A _DEFAULT_CONFIG N/A max_request_size acks retries request_timeout_ms client_id api_version 1048576 1 0 30000 N/A kafka-python- __version__ N/A 0 8 0 __init__ N/A N/A self client metadata accumulator N/A configs N/A N/A N/A N/A N/A super Sender self __init__ N/A N/A self config N/A N/A copy copy N/A self _DEFAULT_CONFIG N/A key N/A self config N/A N/A N/A key configs N/A N/A N/A N/A self config N/A key N/A N/A configs pop key N/A N/A self name N/A N/A N/A self config N/A client_id -network-thread N/A N/A self _client client N/A N/A self _accumulator accumulator N/A N/A self _metadata N/A client cluster N/A N/A self _running True N/A N/A self _force_close False N/A N/A self _topics_to_add N/A set N/A run N/A N/A self N/A N/A N/A The main run loop for the sender thread. N/A N/A N/A log debug Starting Kafka producer I/O thread. N/A N/A self _running N/A N/A N/A N/A N/A N/A self run_once N/A N/A N/A Exception N/A N/A N/A N/A log exception Uncaught error in kafka producer I/O thread N/A N/A N/A log debug Beginning shutdown of Kafka producer I/O thread, sending remaining records. N/A N/A N/A N/A self _force_close N/A N/A N/A N/A self _accumulator has_unsent N/A N/A N/A N/A self _client in_flight_request_count 0 N/A N/A N/A N/A N/A N/A self run_once N/A N/A N/A Exception N/A N/A N/A N/A log exception Uncaught error in kafka producer I/O thread N/A N/A self _force_close N/A N/A N/A N/A N/A self _accumulator abort_incomplete_batches N/A N/A N/A N/A N/A N/A self _client close N/A N/A N/A Exception N/A N/A N/A N/A log exception Failed to close network client N/A N/A N/A log debug Shutdown of Kafka producer I/O thread has completed. N/A run_once N/A N/A self N/A N/A N/A Run a single iteration of sending. N/A N/A self _topics_to_add N/A N/A N/A N/A N/A self _client add_topic N/A N/A N/A self _topics_to_add pop N/A result N/A N/A N/A self _accumulator ready N/A self _metadata N/A N/A ready_nodes next_ready_check_delay unknown_leaders_exist result N/A unknown_leaders_exist N/A N/A N/A N/A log debug Unknown leaders exist, requesting metadata update N/A N/A N/A N/A self _metadata request_update N/A not_ready_timeout 999999999 N/A node N/A list ready_nodes N/A N/A N/A N/A N/A N/A self _client ready node N/A N/A N/A N/A log debug Node %s not ready; delaying produce of accumulated batch node N/A N/A N/A ready_nodes remove node N/A not_ready_timeout N/A min not_ready_timeout N/A N/A N/A self _client connection_delay node N/A batches_by_node N/A N/A N/A self _accumulator drain N/A self _metadata ready_nodes N/A N/A self config N/A max_request_size N/A expired_batches N/A N/A N/A self _accumulator abort_expired_batches N/A N/A self config N/A request_timeout_ms N/A self _metadata N/A requests N/A N/A self _create_produce_requests batches_by_node N/A poll_timeout_ms N/A min N/A next_ready_check_delay 1000 not_ready_timeout N/A ready_nodes N/A N/A N/A N/A log debug Nodes with data ready to send: %s ready_nodes N/A N/A N/A log debug Created %d produce requests: %s N/A len requests requests N/A poll_timeout_ms 0 N/A N/A node_id request N/A N/A six iteritems requests N/A N/A batches N/A batches_by_node N/A node_id N/A N/A N/A log debug Sending Produce Request: %r request N/A N/A N/A N/A N/A N/A N/A N/A self _client send node_id request add_callback N/A self _handle_produce_response batches add_errback N/A self _failed_produce batches node_id N/A N/A N/A N/A self _client poll poll_timeout_ms sleep True N/A initiate_close N/A N/A self N/A N/A N/A Start closing the sender (won't complete until all data is sent). N/A N/A self _running False N/A N/A N/A N/A self _accumulator close N/A N/A N/A self wakeup N/A force_close N/A N/A self N/A N/A N/A Closes the sender without sending out any pending messages. N/A N/A self _force_close True N/A N/A N/A self initiate_close N/A add_topic N/A N/A self topic N/A N/A N/A N/A topic N/A self _topics_to_add N/A N/A N/A N/A N/A self _topics_to_add add topic N/A N/A N/A self wakeup N/A _failed_produce N/A N/A self batches node_id error N/A N/A N/A N/A N/A log debug Error sending produce request to node %d: %s node_id error N/A batch batches N/A N/A N/A N/A self _complete_batch batch error -1 N/A _handle_produce_response N/A N/A self batches response N/A N/A N/A Handle a produce response. N/A N/A N/A log debug Parsing produce response: %r response N/A response N/A N/A batches_by_partition N/A dict N/A N/A N/A batch topic_partition batch N/A batch batches N/A N/A topic partitions N/A response topics N/A N/A N/A partition error_code offset partitions N/A N/A tp N/A TopicPartition topic partition N/A error N/A N/A Errors for_code error_code N/A batch N/A batches_by_partition N/A tp N/A N/A N/A self _complete_batch batch error offset N/A N/A batch batches N/A N/A N/A N/A self _complete_batch batch None -1 N/A _complete_batch N/A N/A self batch error base_offset N/A N/A N/A Complete or retry the given batch of records.

        Arguments:
            batch (RecordBatch): The record batch
            error (Exception): The error (or None if none)
            base_offset (int): The base offset assigned to the records if successful
         N/A N/A error N/A Errors NoError N/A N/A error None N/A N/A N/A error None N/A N/A self _can_retry batch error N/A N/A N/A N/A log warning Got error produce response on topic-partition %s, retrying (%d attempts left). Error: %s N/A batch topic_partition N/A N/A N/A N/A self config N/A retries N/A batch attempts 1 error N/A N/A N/A N/A self _accumulator reenqueue batch N/A N/A N/A error N/A Errors TopicAuthorizationFailedError N/A N/A error N/A error N/A N/A batch topic_partition topic N/A N/A N/A batch done base_offset error N/A N/A N/A N/A self _accumulator deallocate batch N/A N/A getattr error invalid_metadata False N/A N/A N/A N/A N/A self _metadata request_update N/A _can_retry N/A N/A self batch error N/A N/A N/A 
        We can retry a send if the error is transient and the number of
        attempts taken is fewer than the maximum allowed
         N/A N/A N/A N/A batch attempts N/A N/A self config N/A retries N/A getattr error retriable False N/A _create_produce_requests N/A N/A self collated N/A N/A N/A 
        Transfer the record batches into a list of produce requests on a
        per-node basis.

        Arguments:
            collated: {node_id: [RecordBatch]}

        Returns:
            dict: {node_id: ProduceRequest} (version depends on api_version)
         N/A requests N/A N/A N/A node_id batches N/A N/A six iteritems collated N/A N/A N/A requests N/A node_id N/A N/A self _produce_request node_id N/A N/A self config N/A acks N/A N/A self config N/A request_timeout_ms batches N/A requests N/A _produce_request N/A N/A self node_id acks timeout batches N/A N/A N/A Create a produce request from the given record batches.

        Returns:
            ProduceRequest (version depends on api_version)
         N/A produce_records_by_partition N/A N/A collections defaultdict dict N/A batch batches N/A N/A topic N/A N/A batch topic_partition topic N/A partition N/A N/A batch topic_partition partition N/A buf N/A N/A N/A batch records buffer N/A N/A N/A produce_records_by_partition N/A topic N/A partition buf N/A version N/A N/A N/A N/A self config N/A api_version N/A 0 9 1 0 N/A N/A N/A ProduceRequest N/A version required_acks acks timeout timeout topics N/A N/A topic N/A list N/A N/A partition_info items N/A N/A topic partition_info N/A N/A six iteritems produce_records_by_partition N/A wakeup N/A N/A self N/A N/A N/A Wake up the selector associated with this send thread. N/A N/A N/A N/A self _client wakeup N/A N/A