hadoop_record (β) ![Build Status](https://camo.githubusercontent.com/c2a9aa6d8ce814f4ee6d7bf09d6bfe550981328c8945bb90e43e6b4e40a3324d/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f4a616e48656e72794e797374726f6d2f6861646f6f705f7265636f72642e706e67)
A hadoop record compiler
- Introduction
- Features/Modules
- Examples
- Build
- Install
- Contribute - Read if you're planning to submit patches
The main purpose of this compiler, for a format that has been discontinued by the hadoop project, is to support a zookeeper client, since the zookeeper project still uses hadoop records. Bearing this rational in mind it not surprising that one of the main concerns is to be compatible with the compiler "jute", used by the zookeeper project. The compiler is compatible with the definition of the hadoop records, however jute deviates from that definition and that is supported as options to this compiler (which are the defaults).
- A Hadoop record compiler hadoop_record
Here's an example of using hadoop_record in the Erlang shell:
Eshell V5.8.4 (abort with ^G)
1> hadoop_record:compile(zookeeper, [{src_dir, "test/hadoop_record/distro"}]).
ok
An example of the use in a Makefile from the zookeeper client library:
erl -pa deps/hadoop_record/ebin -run hadoop_record cmd "hadoop_record/zookeeper" "{dest_dir, \"src\"}" -run init stop -noshell
meck requires rebar to build, but provides make support to download and install rebar. To build jhn_stdlib, go to the jhn_stdlib directory and type:
make
To make sure hadoop_record works on your platform, run the tests:
make test
Two things might seem alarming when running the tests:
- Warnings emitted by cover
- En exception printed by SASL
Both are expected due to the way Erlang currently prints errors. The
important line you should look for is All XX tests passed
, if that
appears all is correct.
If you want to install your own built version of hadoop_record add the ebin
directory to your Erlang code path or move the hadoop_record folder into your
release folder and make sure that folder is in your ERL_LIBS
environment variable.
Should you find yourself using jhn_stdlib and have issues, comments or feedback please [create an issue here on GitHub.] 6
Patches are greatly appreciated, but since these libraries reflect my learning process and I have rather peculiar notions of code hygiene I may do extensive rewrites that does not in any way diminish the appreciation I feel or indeed [express.] 7
For a much nicer history, please write good commit messages. I know I really should.