Monday, June 9, 2014

Quick test run with infobright

After reading Jonathan Levin's article about infobright I decided I had to try Infobright.

So I downloaded the 32-bit tarball. Normally I would have gone for a 64-bit build but those only came in RPM and DEB flavour.

Then I tried to run infobright community edition (ICE) in a MySQL Sandbox, but that failed as the resolveip utility failed to give an answer for localhost.


error while creating grant tables
Neither host 'daniel-thinkpad' nor 'localhost' could be looked up with
/home/dveeden/opt/mysql/4.0.7-ice/bin/resolveip
Please configure the 'hostname' command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the --force option

Then I used docker. This went really smooth. You can grab my docker file here.

After creating a container with infobright I tried to insert some data... as I thought only UPDATE and DELETE were prohibited with ICE. But it turned out that also INSERT and ALTER TABLE .. ENGINE=.. are prohibited.

So you have to use LOAD DATA IN FILE which is fully documented in their data loading guide.

But there is an important difference between ICE and IEE (infobright enterprise edition): ICE uses the infobright loader and IEE uses the MySQL loader by default.

Loading some test data from the distroinfo-data package:

mysql> create table distroinfo(version decimal(3,1), codename varchar(20), series varchar(20), created datetime, `release` datetime, eol datetime);
Query OK, 0 rows affected (0.00 sec)

mysql> load data infile '/usr/share/distro-info/ubuntu.csv' into table distroinfo fields terminated by ',';
Query OK, 21 rows affected (0.06 sec)
Records: 21  Deleted: 0  Skipped: 0  Warnings: 0

But If I do the same with a MyISAM table:
mysql> load data infile '/usr/share/distro-info/ubuntu.csv' into table distroinfo2 fields terminated by ',';
Query OK, 21 rows affected, 23 warnings (0.00 sec)
Records: 21  Deleted: 0  Skipped: 0  Warnings: 22

So installing Infobright in a docker container is easy. Both ICE and IEE seem to be useful if you take the limitations of each in account. And you should be extremly careful with loading data with the Infobright loader as it might silently truncate your data!

No comments:

Post a Comment

Post a Comment