Skip to content

Instantly share code, notes, and snippets.

global
log 127.0.0.1:514 local1
defaults
mode http
log global
option httplog
option http-server-close
option dontlognull
option redispatch
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@bfleming-ciena
bfleming-ciena / python_resources.md
Last active August 29, 2015 14:10 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@bfleming-ciena
bfleming-ciena / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/usr/bin/env python
import boto
from boto.route53.record import ResourceRecordSets
import logging
conn = boto.connect_ec2()
DNS_EXCLUSION_TAG = 'ExcludeFromDNS' # If this tag exists on an instance, no DNS values will be populated
DNS_TAGS = ['ShortName', 'Name'] # This is the list of instance tags we want to populate DNS entries from
DNS_SUFFIX = 'YOUR_SUBDOMAIN_HERE' # Suffix under which to create DNS records
ROUTE53_ZONE_ID = 'YOUR_ZONE_ID_HERE' # The zone id from route53 of the zone we will be adding these entries under
"""
Requeriments:
$ sudo pip install boto dnspython
Edit ~/.boto to use your AWS credentials
"""
import time
import sys