Thursday, July 12, 2007

Running Bizgres demo

So I got Bizgres installed on CentOS 4 running on EC2 (Xen Virtualization).
Here is the HOWTO recipe for doing the build.
Next I went through the Bizgres User Guide and ran the Instance Verification Program (IVP).

The first attempt through yesterday was dogged by some environment variables problems and a missing file.

The IVP Makefile expects to find a file in $BIZHOME called bizgres_path.sh. I checked and it does not exist, nor was it in the bizgres-0_9_GA.tar.bz2 tarball.

So I had to create that file. Save a file called bizgres_path.sh where you installed the software.



BIZHOME=/usr/local/bizgres
PATH=$BIZHOME/pgsql/bin:$BIZHOME/client/loader/bin:$PATH
LD_LIBRARY_PATH=$BIZHOME/lib
MANPATH=$BIZHOME/doc:$MANPATH
PGPATH=$BIZHOME

export BIZHOME
export PATH
export LD_LIBRARY_PATH
export MANPATH
export PGPATH




The next issue was the path.sh file which is part of the IVP.tar file.
If you installed the software in something other than /usr/local/bizgres or like me are using a symbolic link /usr/local/bizgres which points at /usr/local/bizgres-0.9_GA it will fail.

I needed to add the -follow option to the find to make that follow any symbolic links.

Here is my path.sh



#
# If BIZHOME is alreay set use its value to source bizgres_path.sh
# ow, start looking at /usr/local
#
if [ x"$BIZHOME" == x ]; then
BIZHOME='/usr/local/bizgres'
fi

PATHSH=`find "$BIZHOME" -follow -name bizgres_path.sh | sort | tail -1`

if [ x"$PATHSH" != x ]; then
source $PATHSH
else
echo "Can not find the path variables file, exiting."
#exit 1
fi



After those two problems, I had some issues getting the PostgreSQL instance running, which I think was related to running initdb early.

After that the demo ran perfectly.

Next task is to get streamSQL running as these products have a time limited evaluation license.

I will run through the master and slave node process probably early next week.

Have Fun

Paul

Here is my screen dump of the demo run


[bgadmin@domU-12-31-36-00-3D-83 IVP]$ source path.sh
[bgadmin@domU-12-31-36-00-3D-83 IVP]$ make
./create_db.sh


This is an Installation Validation Program for Bizgres.
It will install a sample Bizgres Database on one machine.

After this script runs successfully,
you should have a running Bizgres Database named
dgtestdb, that you can connect to using the command:
psql dgtestdb

You can also load sample data into dgtestdb using the command:
./load-data.sh

If this script fails to execute, look in the file "IVP.log" for the reason why.


Creating the dgtestdb data directory...
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.
done.
Starting the instance located in dgtestdb ... done.
Creating the database "dgtestdb" ... done.
Creating table "bigtable1" in "dgtestdb"... done.
---------------------------------------------------------------
---------------------------------------------------------------
---------------------------------------------------------------

Congratulations: A Bizgres database has been installed successfully!

You can now connect to the database using the command:
psql -p 5432 dgtestdb

You can now load sample data into dgtestdb using the command:
./load-data.sh

./load-data.sh
make[1]: Entering directory `/home/bgadmin/demo/IVP/data-generator'
gcc -O3 -c main.c
gcc -O3 -c utils.c
gcc -o generator -O3 main.o utils.o
./generator seedfile.txt 1000000 > dbdata.txt
make[1]: Leaving directory `/home/bgadmin/demo/IVP/data-generator'

Loader Ver 2.0.13
======================
Time: 07-12-2007 20:01:49
Host: LOCALHOST
Port: 5432
Database: dgtestdb
Username: bgadmin
Password:

Control File: file:/home/bgadmin/demo/IVP/copy.ctl
Destination: database
Batching: OFF
======================

Contacting entry DB... jdbc:postgresql://LOCALHOST:5432/dgtestdb?user=bgadmin

validating input streams...
Control file found | Data file found : '/home/bgadmin/demo/IVP/data-generator/dbdata.txt'

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Found control command...
LOAD ivp.bigtable1( a , b , c , d , e , f , g , h , i , j , k , l , m , n , o)
FROM '/home/bgadmin/demo/IVP/data-generator/dbdata.txt' WITH DELIMITER AS '|' NULL AS '' ESCAPE AS '\'

Checking if control command is valid...
Control command verified
DBWriter trying to connect to database host=LOCALHOST,port=5432,dbname=dgtestdb
DBWriter successfully connected to database host=LOCALHOST,port=5432,dbname=dgtestdb
DBWriter testing an empty COPY command
Test passed. COPY accepted by the backend
DBWriter trying to connect to database host=LOCALHOST,port=5432,dbname=dgtestdb
DBWriter successfully connected to database host=LOCALHOST,port=5432,dbname=dgtestdb
DBWriter testing an empty COPY command
Test passed. COPY accepted by the backend
DBWriter trying to connect to database host=LOCALHOST,port=5432,dbname=dgtestdb
DBWriter successfully connected to database host=LOCALHOST,port=5432,dbname=dgtestdb
DBWriter testing an empty COPY command
Test passed. COPY accepted by the backend
DBWriter trying to connect to database host=LOCALHOST,port=5432,dbname=dgtestdb
DBWriter successfully connected to database host=LOCALHOST,port=5432,dbname=dgtestdb
DBWriter testing an empty COPY command
Test passed. COPY accepted by the backend
Starting to load data.

..................
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Database dgtestdb - on LOCALHOST:5432
- Sent 250000 rows to this segment
- Sent 35667923 bytes to this segment

Database dgtestdb - on LOCALHOST:5432
- Sent 250000 rows to this segment
- Sent 35643409 bytes to this segment

Database dgtestdb - on LOCALHOST:5432
- Sent 250000 rows to this segment
- Sent 35662826 bytes to this segment

Database dgtestdb - on LOCALHOST:5432
- Sent 250000 rows to this segment
- Sent 35647055 bytes to this segment

TOTALS:

- Time : 56.522 secs
- Rows Read : 1000000 (non blank)
- Rows Loaded : 1000000
- Bytes Loaded : 142621213
- Load rate : 2.4063938 Mbytes/sec
- Loaded Batches: 18
- Failed Batches: 0
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


No more control commands.
Application terminated with return code 0

The result from this next query should be 1000000

time psql -p 5432 dgtestdb -c "select count(*) from IVP.bigtable1"
count
---------
1000000
(1 row)


real 0m2.045s
user 0m0.000s
sys 0m0.000s

No comments: