Skip to content

Instantly share code, notes, and snippets.

View bobrik's full-sized avatar

Ivan Babrou bobrik

View GitHub Profile
@bobrik
bobrik / metrics.json
Created May 27, 2015 09:39
marathon pr-1568 (10min)
{
"timers": {
"service.mesosphere.marathon.tasks.TaskTracker$$EnhancerByGuice$$c9257ec9.timeout": {
"rate_units": "calls/second",
"p98": 1.61442e-06,
"p95": 1.3412499999999997e-06,
"p75": 5.77e-07,
"p50": 3.505e-07,
"min": 3.9000000000000005e-08,
"mean": 4.941150684931507e-07,
web351 ~ # ps aux | grep [4]8174
www 48174 2.3 0.3 84536 25136 ? S 11:35 7:11 nginx: worker process is shutting down
web351 ~ # netstat -ntp | fgrep ESTABLISHED | fgrep 48174 | wc -l
308
web351 ~ # netstat -ntp | fgrep ESTABLISHED | fgrep 48174 | wc -l
308
web351 ~ # netstat -ntp | fgrep ESTABLISHED | fgrep 48174 | wc -l
308
web351 ~ # netstat -ntp | fgrep ESTABLISHED | fgrep 48174 | wc -l
309
@bobrik
bobrik / UnfuckedTableInputFormat.java
Created December 12, 2015 14:11
TableInputFormat for HBase that works with binary row keys
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.mapreduce.TableInputFormat;
import org.apache.hadoop.hbase.util.Bytes;
public class UnfuckedTableInputFormat extends TableInputFormat {
@Override
public void setConf(Configuration configuration) {
super.setConf(configuration);
@bobrik
bobrik / hbase.jmx.json
Created January 4, 2016 13:48
hbase with appends
{
"beans" : [ {
"name" : "Hadoop:service=HBase,name=Master,sub=Balancer",
"modelerType" : "Master,sub=Balancer",
"tag.Context" : "master",
"tag.Hostname" : "dev",
"miscInvocationCount" : 2,
"BalancerCluster_num_ops" : 0,
"BalancerCluster_min" : 0,
"BalancerCluster_max" : 0,
@bobrik
bobrik / hbase.jmx.json
Created January 4, 2016 13:58
hbase without appends
{
"beans" : [ {
"name" : "Hadoop:service=HBase,name=Master,sub=Balancer",
"modelerType" : "Master,sub=Balancer",
"tag.Context" : "master",
"tag.Hostname" : "dev",
"miscInvocationCount" : 2,
"BalancerCluster_num_ops" : 0,
"BalancerCluster_min" : 0,
"BalancerCluster_max" : 0,
package main
import (
"errors"
"fmt"
"log"
"net"
"net/http"
)
FROM debian:jessie
ARG SALT_VERSION
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv 0E08A149DE57BFBE && \
echo "deb http://repo.saltstack.com/apt/debian/8/amd64/${SALT_VERSION} jessie main" > /etc/apt/sources.list.d/saltstack.list && \
apt-get update && \
apt-get install -y salt-minion
RUN mkdir -p /srv/salt && \
FROM debian:jessie
ARG SALT_VERSION
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv 0E08A149DE57BFBE && \
echo "deb http://repo.saltstack.com/apt/debian/8/amd64/${SALT_VERSION} jessie main" > /etc/apt/sources.list.d/saltstack.list && \
apt-get update && \
apt-get install -y salt-minion
RUN mkdir -p /srv/salt && \
package com.cloudflare;
import com.google.common.collect.Iterators;
import net.opentsdb.core.IllegalDataException;
import net.opentsdb.core.Internal;
import net.opentsdb.core.TSDB;
import net.opentsdb.utils.Config;
import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.Cell;
2017/01/10 00:41:58 INPUT MESSAGE
2017/01/10 00:41:58 INPUT MESSAGE
2017/01/10 00:41:58 INPUT MESSAGE
2017/01/10 00:41:58 INPUT MESSAGE
2017/01/10 00:41:58 INPUT MESSAGE
2017/01/10 00:41:58 INPUT MESSAGE
2017/01/10 00:41:58 INPUT MESSAGE
2017/01/10 00:41:58 INPUT MESSAGE
2017/01/10 00:41:58 INPUT MESSAGE
2017/01/10 00:41:58 INPUT MESSAGE