Hypertable Apache log

To compile this example, you will need to modify the following
variables in the Makefile:

BOOST_INCLUDE_DIR=/usr/local/include/boost-1_34_1
BOOST_THREAD_LIB=boost_thread-gcc41-mt
HYPERTABLE_INSTALL_DIR=/home/doug/hypertable/0.9.0.8

They should be modified to reflect your particular Boost
installation and Hypertable installation.

You can then build the example by just typing 'make'

The servers can be started with the following command
(assuming Hypertable is installed in ~/hypertable):

$ ~/hypertable/bin/start-all-servers.sh local

The next step is to create the 'ApacheWebServer' table
with the following command:

$ ~/hypertable/bin/hypertable --batch < WebServerLog-create-table.hql

There is a compressed sample Apache web log in the file
'access.log.gz' Uncompress it with:

$ gunzip access.log.gz

You can load it into the table with the following command:

$ ./apache_log_load access.log

You can then query it with a something like the following:

$ ./apache_log_query /favicon.ico





#####create-table

create table LogDb (
ClientIpAddress,
UserId,
Request,
ResponseCode,
ObjectSize,
Referer,
UserAgent
);



######################

1. copy -r /opt/hypertable/0.9.2.3/conf /root/hypertable_build/examples/apache_log/

2. cd /opt/hypertable/0.9.2.3/examples/apache_log

3. /opt/hypertable/0.9.2.3/bin/hypertable --batch < create-table.hql

4. ./apache_log_load gggg_transfer.log

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章