Posts By: jonny

Browsing Hadoop HDFS on the Command Line

Using the Hadoop command we can send fairly regular filesystem commands to navigate HDFS. On Cloudera I am sending commands to port 8020 of the active name node. If you don’t have the hadoop command available on your system you need to download hadoop, extract it and add the bin directory to your path. For… Read more »

Labeling Partitions with LABEL and PARTLABEL

So working on a system that had incorrect partitioning configured.  In /etc/fstab the partitions were configured with: PARTLABEL=data1 /data1 ext4 defaults 0 0 PARTLABEL=data2 /data2 ext4 defaults 0 0 but the partitions did not have PARTLABELS set. The LABEL and PARTLABEL can be viewed with: lsblk -o name,label,partlabel,mountpoint,size,uuid To set the label property use: e2label… Read more »

Cloudera Hue User Password Reset

I needed to access the Hue file browser service  and for my version of cloudera this was: cd /opt/cloudera/parcels/CDH-5.7.6-1.cdh5.7.6.p0.6/lib/hue Run the createuser command: ./build/env/bin/hue createsuperuser Username (leave blank to use ‘joebloggs’): Email address: joebloggs@whatever.tld Password: Password (again): Superuser created successfully.

Mkr Fox 1200 Beginner Tutorial

Download the latest version of the Arduino IDE as the version in the Ubuntu/Mint/Debian repositories is a little old: https://www.arduino.cc/en/Main/Software At the time of writing I am using version 1.8.5 Configure Arduino IDE First we need to import everything we need to operate the MKR Fox 1200 so first visit Tools > Board > Board… Read more »

Zookeeper install on CentOS 7

Good concise article here on devopscube for installing zookeeper cluster. I’ve added some of my own bits: Firewall Disable firewalld or allow ports 2181 3888 2888 Install Java yum install java-1.8.0-openjdk Install Zookeeper Download ZooKeeper from the Apache: wget http://mirrors.ukfast.co.uk/sites/ftp.apache.org/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz mv zookeeper-3.4.10.tar.gz /opt cd /opt tar xzf zookeeper-3.4.10.tar.gz ln -s zookeeper-3.4.10 ./zookeeper cd zookeeper mkdir… Read more »

Yakuake not restoring window height & width

git branch

I found that Yakuake was re-opening with an 80% width and about 30% height but I prefer 100% wide and 80% high. So it looks like my settings were saving into the file: ~/.config/yakuakerc But this was possibly not the file that was being read when Yakuake started. I added the [Window] Height=80 Width=100 entries… Read more »

Tab Separated File Returns Wrong Number of Fields

Shell

So we had a CSV/TSV file with tabs separating each field but one of the fields was a description field that contained spaces. When parsing this TSV file some programs interpreted the spaces as field delimiters (TSV might be a bad idea!). Input file similar to: NULL NULL 7.0 Huayang Time Warner Cable 4430 The… Read more »

Install Python Linters in Atom

I installed the relevant Python packages first e.g. sudo apt-get install flake8 python3-flake8 python3-pep8 python-pep8-naming python3-setuptools pylint3 Then on the Atom menu use: Edit > Preferences then search for atom packages such as flake8, pep8, pep257 and pylint: Then click the install button. After restarting style advice is shown in the editor:    

Manic Miner on Linux

I was reminded about how much time I had spent as a kid playing Manic Miner on an Amstrad 464 and decided to give it a try on my current desktop (Linux Mint) so for future reference… I grabbed the code created by here: git clone https://github.com/lkundrak/manicminer.git Installed a few dependencies: apt-get install libx11-dev libxext-dev… Read more »

MySQL Percona Slave Replication Change Channel Name

I had inadvertently set up slave replication using the wrong channel name – which is a minor issue except that it caused some issues with an already configured Nagios check. To ‘change’ the channel name I stopped the slave process, removed all the slave definitions and used ‘CHANGE MASTER’ to re-create the slave from the… Read more »