Archivo de la etiqueta: Linux

HBase and Zookeeper debugging


I came across some scenarios where an application (i.e. Mapreduce) communicating to HBase through YARN could silently fail with a timeout like the following: 2017-01-30 19:42:03,657 DEBUG [main] org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation: locateRegionInMeta parentTable=hbase:meta, metaLocation=, attempt=9 of 35 failed; retrying after sleep of … Seguir leyendo

Publicado en Uncategorized | Etiquetado , , , , , | Deja un comentario

Create multiple files at once with ‘touch’


Sometimes we might need to create thousands or millions of files at once. This command will create the number specified in the range using touch: touch bspl{00001..70000}.c

Publicado en Uncategorized | Etiquetado , | Deja un comentario

Debugging Java Threads


Which Java process is using most of the CPU: $ ps u -C java Generate the Java thread dump: $ jstack -l PId > PId-threads.txt From the Java threads I can count: $ awk ‘/State: / { print }’ < … Seguir leyendo

Publicado en Uncategorized | Etiquetado , | Deja un comentario

Java change default version / cambiar la version Java por defecto


If we have more than one Java version installed on your Linux server (Redhat flavor) you can change defaults using ‘alternatives’ command: [hadoop@ip-172-31-36-252 ~]$ sudo /usr/sbin/alternatives –config java There are 2 programs which provide ‘java’.   Selection    Command ———————————————– *+ … Seguir leyendo

Publicado en Uncategorized | Etiquetado , , | Deja un comentario

monitoring HTTP requests on the fly


Install httpry: sudo yum install httpry or $ sudo yum install gcc make git libpcap-devel $ git clone https://github.com/jbittel/httpry.git $ cd httpry $ make $ sudo make install then run: sudo httpry -i eth0 Output will be like: httpry version … Seguir leyendo

Publicado en Uncategorized | Etiquetado , | Deja un comentario

Control Characters on vi Linux editor


Show hidden/control characters on vi: :set list   Hide hidden/control characters on vi: :set nolist   Replace hidden/control characters on vi: :%s/^M//g :%s/.$//g  

Publicado en Uncategorized | Etiquetado , | Deja un comentario

yarn: execute a script on all the nodes in the cluster


This is more Linux script related, but, sometimes we have a Hadoop (YARN) cluster running and we need to run a post install script or activity that executes on all the nodes in the cluster: for i in `yarn node … Seguir leyendo

Publicado en Uncategorized | Etiquetado , , , , | Deja un comentario