Skip to content

Instantly share code, notes, and snippets.

@marwei
marwei / how_to_reset_kafka_consumer_group_offset.md
Created November 9, 2017 23:39
How to Reset Kafka Consumer Group Offset

Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.

  1. List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe

Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.

  1. Reset the consumer offset for a topic (preview)
@mrgoos
mrgoos / app.module.ts
Last active May 27, 2022 19:42
Intercepting http request/respons in Angular 2. Works from version 2.3.0.
...
...
providers: [
{ provide: Http, useClass: ExtendedHttpService }
]
...
...
# This example is outdated because we have the H2O Stacked Ensemble function now (so it's better to use that):
# http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/stacked-ensembles.html
import h2o
from h2o.estimators.gbm import H2OGradientBoostingEstimator
from h2o.estimators.deeplearning import H2ODeepLearningEstimator
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
from h2o.estimators.random_forest import H2ORandomForestEstimator
from sklearn import metrics #will be replaced with ensemble_performance later
@PingNote
PingNote / Note.txt
Last active March 29, 2017 15:57
How to use the Let’s Encrypt for Tomcat
Let’s Encrypt 的 SSL 憑證安裝
http://blog.longwin.com.tw/2015/11/let-encrypt-ssl-certificate-setup-2015/
How to use the certificate for Tomcat
https://community.letsencrypt.org/t/how-to-use-the-certificate-for-tomcat/3677
evernote backup
https://www.evernote.com/shard/s201/sh/ed27fb8d-121e-46a5-9d31-cc16fac681f0/e8e284d1425dbe53d0003350724c4bba
pem to p12 to jks.
The BIO, NIO and NIO2 connectors use the following attributes to configure SSL:
@cb372
cb372 / gist:1d7b1abbbf0c643f2903
Last active June 29, 2018 18:40
Using Elasticsearch as a Spark data source

Install the essentials.

$ brew update && brew install elasticsearch && brew install apache-spark

Start ES.

$ elasticsearch
@reyjrar
reyjrar / elasticsearch.yml
Last active May 12, 2023 11:58
ElasticSearch config for a write-heavy cluster
##################################################################
# /etc/elasticsearch/elasticsearch.yml
#
# Base configuration for a write heavy cluster
#
# Cluster / Node Basics
cluster.name: logng
# Node can have abritrary attributes we can use for routing