Search This Blog

Loading...

Monday, February 23, 2015

Warning [Rant]: YAML is an incredible piece of turd

I spent, hay wasted, an hour of my time today trying to figure out the reason for the following error message from Puppet Hiera:

vmhost05-hbase3: Error: syntax error on line 30, col -1: `' at /root/bigtop/bigtop-deploy/puppet/manifests/site.pp:17 on node ....
The relevant part of the Hiera site.yaml file is

bigtop::bigtop_yumrepo_uri:  "http://archive.hostname.com/redhat/6/x86_64/7.3.0/"
bigtop::jdk_package_name: 'jdk-1.7.0_55'

Firstly, as a former compiler developer it hurts every bit of my brain when I see error message like above. Huge "compliment" to the Hiera developers - learn how to write code, dammit.

Secondly, after investigating this literally for an hour I figured out that the separator in uri:  "http was a TAB (ASCII 9) instead of a whitespaces.

Seriously dudes - it's 21st century. What's the reason to use formats and parsers that fail so badly on separator terminals? Just imaging if Java or Groovy compiler would be so picky about tabs vs. spaces? I guarantee - the half of the development community would be screaming bloody murder right there. Yet - with frigging YAML POS it is just ok ;(

[/Rant]

Monday, December 22, 2014

How to mount RAID1 volume on Ubuntu

If you ever need to mount an encrypted partition from a RAID1 NAS on your Ubuntu system (like a laptop or a different server) here's a simple three steps instruction. Figure out what partition needs to be mounted (you can do it by running parted or similar to figure out what your target should be); for the sake of the example it will be /dev/sdd2. And now:

% sudo mdadm --assemble --run /dev/md0 /dev/sdd2
% sudo cryptsetup -v luksOpen /dev/md0 mapperpoint
% sudo mount /dev/mapper/mapperpoint /mnt/external/

If you need to check the state of the drive while connected via USB enclosure, run
% sudo smartctl -aH -d sat /dev/sdd
The only trick is to add -d sat disk type.

Or to simplify the whole thing, just run Disk Utility and click "Start RAID" button ;)

Friday, November 28, 2014

Finally upgrading from Debian Lenny

If you like me was putting of an upgrade from Debian 5.0 Lenny you might find yourself blocked out, because ftp.us.debian.org/debian/dists/lenny doesn't exist anymore anywhere on the US mirrors. However, I needed to do one last update before getting on dist-upgrade. 

Luckily enough I was able to find a mirror in Germany which still has Lenny dist around. So, if you find yourself in my shoes edit /etc/apt/sources.list on your system and replace 
 ftp://ftp.us.debian.org/debian/
with
 ftp://ftp.de.debian.org/debian-archive/debian/

then do usual update and then an upgrade. Good luck!

Monday, July 7, 2014

Mark Twain and data science

When I look at data science nowadays it reminds of
In the space of one hundred and seventy-six years the Mississippi has
shortened itself two hundred and forty-two miles.  Therefore ... in the Old
Silurian Period the Mississippi River was upward of one million three hundred thousand miles long ... seven hundred and forty-two years from now the Mississippi will be only a mile and three-quarters long.  ... There is something fascinating about science.  One gets such wholesome returns of conjecture out of such a trifling investment of fact.
                 Mark Twain
I don't know why...

Sunday, June 15, 2014

Hadoop genealogy simplified

I have decided to simplify the elephant genealogy tree by separating pre-Hadoop 2.x part out of it. The new supported version will only be reflecting Hadoop 2.x. The last updated full version of the diagram is available for anyone from my github workspace under the tag WDD4

Tuesday, April 22, 2014

Smart-ass recruiters out there....

An spam-email from a recruiter (target company name isn't mentioned _anywhere_):

   I came across your resume on Dice and would like to talk to you about
   a Hadoop Engineer position with our client, which is a Fortune
   10 company based in Cupertino, CA. This is the largest and most
   valuable consumer electronics/technology company in the world today
   which makes cutting edge smart phones, personal computers & music
   players. 


Now I wonder which one of us is an idiot?

Thursday, March 20, 2014

Git is absolutely fabilous, of course

After using git for like 5 years - and shall I say I know most of the tricks in the book and outside of the book ;) - I still find some neat things in it, that please me immensely in spite of being simple.

I am doing this Gradle implementation of Apache Bigtop build system and thought that would be about time to split one Gradle file in two: separation of concerns and all that stuff. So, naturally I have fired-up IntelliJ IDEA, did some splitting, and copying, and other things. Got all my functionality working to the same extend as it were. And now it is time to commit: I have original build.gradle and new packages.gradle files. So,

% git commit -a -m 'Separating build logic into its own module'

[BIGTOP-1201 f319b55] Separating build logic into its own module
2 files changed, 53 insertions(+), 429 deletions(-)
rewrite build.gradle (90%)
rename build.gradle => packages.gradle (90%)

Seriously, how smart and cool is that?

Followers