`
lovejuan1314
  • 浏览: 337302 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics