Author: robin

0

WSJ Top Loser Gainer pull

Below code will pull losers and gainers from wsj.com for a given date range, #!/usr/bin/env python from lxml import html import requests import sys import os import humanize import pandas # from datetime import date, timedelta import datetime import re...

0

Parsing sqoop logs for stats analysis

Below python code will help you extract statistics from a set of Sqoop log files for transfer analysis,   #!/usr/bin/env python import fnmatch import os import datetime def find_files(directory, pattern): for root, dirs, files in os.walk(directory): for basename in files: if...

0

Handy bash commands

Top 20 files by size Concatenate multiple files skipping n rows Compress last X days data in one archive Compress files older than X days individually Merging multiple lines Find latest files recursively Get rows starting and ending between a...

0

Hive datatype mappings

Hive meaning Teradata meaning .net BCL Type TINYINT 1-byte signed integer, from -128 to 127 ByteInt Represents a 8-bit (1-byte) signed integer. Range: -128 to 127 System.Int16 SMALLINT  2-byte signed integer, from -32,768 to 32,767  SmallInt Represents a 16-bit (2-Byte) signed integer. Range: -32,768 to 32,767...

0

Starting AMPPS without password on MAC

The below method will not start AMMPS without password, but instead does start mysql and apache web server if you have AMPPS installed already. There are 2 steps involved, 1. Modifying sudoers file, and 2. Creating a startup applescript application....

0

Moving a host component from one host to another

NOTE ­ It is not safe to move components like Journal node or Zookeeper. This method is to be used only for components like Storm, Kafka , Falcon or Flume etc. Following steps would help in moving components from one Node...

0

Moving JournalNode service from one machine to another

In case you would like to move JournalNode service to another host, here are the steps to do so: Put HDFS in safemode su ­ hdfs ­c ‘hdfs dfsadmin ­fs hdfs://<active node>:8020 ­safemode enter’ Execute a save namespace of the...

0

Troubleshooting Hadoop services

Hive Lookup what killed Hive server $ grep –color=always -nr -B 1 ‘Exception|Service:HiveServer2 is started|java.lang.OutOfMemoryError’ /var/log/hive/hiveserver2.log | less -N Above command looks up the log file for exceptions and startup of hive and print one line above the search term....

0

Wine on Mac – Enabling High Resolution mode (retina)

Source: https://www.winehq.org/announce/2.0 Enable Retina mode for Wine apps – The macOS graphics driver supports a high-resolution (“Retina”) rendering mode. It can be enabled by setting “RetinaMode” to “Y” under HKCU\Software\Wine\Mac Driver.     Related posts: Changing Wine key mappings on Mac...