Changes between Version 1 and Version 2 of LogParser


Ignore:
Timestamp:
Jul 4, 2008, 4:35:56 PM (16 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LogParser

    v1 v2  
    44
    55 = 如何使用 =
    6  1. Upload apache logs ( /var/log/apache2/access.log* ) to hdfs (default: /user/waue/apache-log) \
    7 
    8 {{{ $ bin/hadoop dfs -put /var/log/apache2/ apache-log
    9  }}}
    10  2. parameter "dir" in main contains the logs.
    11 
    12  3. you should filter the exception contents manually,
     6 * 1. Upload apache logs ( /var/log/apache2/access.log* ) to hdfs (default: /user/waue/apache-log) \
     7
     8{{{
     9$ bin/hadoop dfs -put /var/log/apache2/ apache-log
     10}}}
     11 * 2. parameter "dir" in main contains the logs.
     12
     13 * 3. you should filter the exception contents manually,
    1314{{{ ex:  ::1 - - [29/Jun/2008:07:35:15 +0800] "GET / HTTP/1.0" 200 729 "...
    1415  }}}
    1516}}}
    1617= 結果 =
    17  1. 執行以下指令
     18 1 執行以下指令
    1819{{{
    1920        hql > select * from apache-log;
    2021
    2122}}}
    22  2. 結果
     23 2 結果
    2324
    2425{{{
     
    581582
    582583                System.out.println("2. access_log files fetching using map/reduce");
    583 
    584584        }
    585 
    586 
    587 
    588585        public static void main(String[] args) throws IOException {
    589 
    590586                String table_name = "apache-log2";
    591 
    592587                String dir = "/user/waue/apache-log";
    593 
    594 
    595588                creatTable(table_name);
    596 
    597589                runMapReduce(table_name, dir);
    598 
    599 
    600 
    601590        }
    602 
    603 
    604 
    605591}
    606592