Thursday, February 13, 2014

Redis Note

1) remove all keys with prefix
for key in `echo 'KEYS sectionId_*' | redis-cli | awk '{print $1}'`
 do echo DEL $key
done | redis-cli

Reset ttl
for key in `echo 'KEYS *' \| redis-cli \| awk '{print $1}'`
do
echo expire $key 86400
done | redis-cli

Tuesday, February 11, 2014

Edit Bash Prompt

Edit .bash_profile:
Between the quotation marks, you can add the following lines to customize your Terminal prompt:
  • \d – Current date
  • \t – Current time
  • \h – Host name
  • \# – Command number
  • \u – User name
  • \W – Current working directory (ie: Desktop/)
  • \w – Current working directory, full path (ie: /Users/Admin/Desktop)
So, let’s say you want your Terminal prompt to display the User, followed by the hostname, followed by the directory, the .bashrc entry would be:
export PS1="\u@\h\w$ "

Wednesday, February 5, 2014

Generic HBase Export


code/analytics/etl/bing/bing-assembly/src/assembly/oozie/generic_hbase_export.xml

com.klout.bing.hbaseexport.HbaseTableExportMapper