bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
| import itertools | |
| import pprint | |
| import typing | |
| _SELECTED = 5 | |
| _MAX_VALUE = 40 | |
| values = list(range(1, _MAX_VALUE + 1)) | |
| _REQUIRED_SUM = _MAX_VALUE // 2 |
| import collections | |
| _ApiMethod = collections.namedtuple('_ApiMethod', ['name', 'path', 'http_method', 'query_params']) | |
| API = [ | |
| _ApiMethod('print_hello', 'api/hello', "GET", ['limit']), | |
| ] | |
| import itertools | |
| import typing | |
| from pprint import pprint | |
| def full_join(d1: typing.Optional[dict], d2: typing.Optional[dict]) -> typing.Optional[dict]: | |
| if d1 is None or d2 is None: | |
| return None | |
| return {k: d1.get(k, d2.get(k)) for k in itertools.chain(d1, d2)} |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
| import datetime | |
| import random | |
| import typing | |
| import unittest | |
| from collections import OrderedDict | |
| class Passage: | |
| def __init__(self, aos: datetime.datetime): | |
| self.aos = aos |