Monthly Archive: August 2017

0

Hive export to CSV

Bash function to export Hive table data to local CSV file Usage: hive_export_csv <db.table> <output.csv> [queue] Recommendation: Add to .bash_profile   hive_export_csv () { if [ -z “$2” ]; then echo “Bad arguments. Usage: ${FUNCNAME[0]} <db.table> <output.csv> [queue]” else uuid=$(uuidgen)...

0

HiveAccessControlException Permission denied user [user] does not have [WRITE] privilege on …

Source: https://community.hortonworks.com/questions/112754/insert-overwrite-directory-beeline.html Error Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [user] does not have [WRITE] privilege on [/tmp/*] (state=42000,code=40000) The above error appears, even though you’ve setup ranger policies, hdfs policies are set up. You’ve checked everything and...

0

python web scraping (stockfetcher.com pull)

Python code below, It fetches all contents from 5 urls, general discussion, filter exchange, public filters, stock picks and indicators. Destination dir: /tmp File type: csv   #!/usr/bin/env python from lxml import html import requests import csv import sys import...

0

How a newline can ruin your Hive

Source: http://marcel.is/how-newline-can-ruin-your-hive/ If you do not fully understand how Hive/Impala stores your data, it might cost you badly. Symptom #1: Weird values in ingested Hive table You double-checked with select distinct(gender) from customers that the gender column in your source RDBMS really contains only values male, female and NULL....

0

Elasticsearch tips and tricks

Find record having max value for a field Get latest record from Elasticsearch Latest record with ES _timestamp value in results Get record count from last x mins Max value GET http://elasticsearch-server:9200/my_index_name_*/_search?size=0 { “aggs” : { “max_timestamp” : { “max”...

0

Hadoop hdfs tips and tricks

Finding active namenode in a cluster   Active namenode in a cluster # lookup active nn nn_list=`hdfs getconf -namenodes` echo Namenodes found: $nn_list active_node=‘’ #for nn in $( hdfs getconf -namenodes ); do for nn in $nn_list ; do echo...

0

SmartSense SSL Troubleshooting

Source: https://docs.hortonworks.com/HDPDocuments/SS1/SmartSense-1.4.0/bk_installation/content/SSL_troubleshooting.html SmartSense SSL Troubleshooting SmartSense components use SSL for protecting communications between the HST server and agents, and between the HST server and SmartSense Gateway. If installation issues arise, you can reset these SSL certificates. HST Server To reset the...

0

How To Buy Penny – Stock Breakouts

Reference: http://www.timothysykes.com/blog/identifying-breakouts/   Price breakouts are great for people who happened to be in the stock early and think it is due for a breakout. However, for a more active trader the breakout is the sign to buy the stock. The...

0

Telnet missing on MacOS

Source: https://forums.developer.apple.com/thread/79056 Manual installation Go to “www.gnu.org/software/inetutils/” (full URL omitted to avoid moderation) Click on the HTTP download link for “Inetutils” Download “inetutils-1.9.4.tar.gz” Compile and Install tar zxvf inetutils-1.9.4.tar.gz cd inetutils-1.9.4 ./configure make sudo make install telnet rainmaker.wunderground.com   Related posts:...

0

Technical Indicators

Aroon Oscillator Aroon Oscillator A reading above zero means that Aroon-Up is greater than Aroon-Down, which implies that prices are making new highs more recently than new lows. Conversely, readings below zero indicate that Aroon-Down is greater than Aroon-Up. This...