Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am aterreno on github.
  • I am aterreno (https://keybase.io/aterreno) on keybase.
  • I have a public key whose fingerprint is 59CE B85F C30B 119D 46A2 11B3 1552 E3D8 9B1A A46C

To claim this, I am signing this object:

@aterreno
aterreno / Architecture Archeology - Java Edition
Created August 22, 2016 10:19
Useful linux command line for finding code smells and various issues
find . -name '*.java' -exec grep "@Ignore" {} \; -print | wc -l
@aterreno
aterreno / cycle-times.rb
Created September 19, 2014 10:15
Calculating cycle times with ruby
require 'rubygems'
require 'jira'
require 'date'
require 'time_difference'
require 'pp'
def time_diff(statuses, tstart, tend)
begin
TimeDifference.between(statuses[tstart], statuses[tend]).in_days
rescue Exception => e
@aterreno
aterreno / keybase.md
Created September 18, 2014 06:22
keybase.md

Keybase proof

I hereby claim:

  • I am aterreno on github.
  • I am aterreno (https://keybase.io/aterreno) on keybase.
  • I have a public key whose fingerprint is 5B0E 3B14 F716 1180 D27B DA1D D507 153A 4635 D7FE

To claim this, I am signing this object:

@aterreno
aterreno / 0_reuse_code.js
Created June 1, 2014 21:46
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

Next Steps

  • Measure time spend on index, flush, refresh, merge, query, etc. (TD - done)
  • Take hot threads snapshots under read+write, read-only, write-only (TD - done)
  • Adjust refresh time to 10s (from 1s) and see how load changes (TD)
  • Measure time of a rolling restart doing disable_flush and disable_recovery (TD)
  • Specify routing on query -- make it choose same node for each shard each time (MD)
  • GC new generation size (TD)
  • Warmers
  • measure before/after of client query time with and without warmers (MD)
@aterreno
aterreno / migrate-elastic-search-indexes.sh
Created November 4, 2013 16:21
Script to migrate elastic search index mappings between one host and another one
#!/bin/bash
SOURCE_URI='http://10.251.76.43:9200'
DEST_URI='http://localhost:9200'
declare -a indexes=(gallery linklist module pageversion poll standardmodule styles video)
echo "Getting mappings from: $SOURCE_URI"
for index in ${indexes[@]}
@aterreno
aterreno / amq2.text
Created October 30, 2013 09:30
amq instance 2 exceptions
2013-10-30 09:18:11,259 | INFO | Not enough cluster members connected to elect a master. | org.apache.activemq.leveldb.replicated.MasterElector | main-EventThread
2013-10-30 09:18:22,219 | INFO | Not enough cluster members have reported their update positions yet. | org.apache.activemq.leveldb.replicated.MasterElector | main-EventThread
2013-10-30 09:18:22,254 | INFO | Promoted to master | org.apache.activemq.leveldb.replicated.MasterElector | main-EventThread
2013-10-30 09:18:22,404 | WARN | listeners are taking too long to process the events | org.apache.activemq.leveldb.replicated.groups.ChangeListenerSupport | main-EventThread
2013-10-30 09:18:22,405 | WARN | listeners are taking too long to process the events | org.apache.activemq.leveldb.replicated.groups.ChangeListenerSupport | main-EventThread
2013-10-30 09:18:22,437 | INFO | Using the pure java LevelDB implementation. | org.apache.activemq.leveldb.LevelDBClient | ActiveMQ BrokerService[localhost] Task-1
2013-10-30 09:18:22,804 | INFO | Master
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0