- Timestamp:
- 10/03/08 16:17:07 (5 years ago)
- Location:
- lang/perl/App-Hachero/trunk
- Files:
-
- 25 modified
-
lib/App/Hachero.pm (modified) (2 diffs)
-
lib/App/Hachero/Plugin/Analyze/AccessCount.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Analyze/UserAgent.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Base.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Classify/Robot.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Classify/UserAgent.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Fetch/FTP.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Filter/AccessTime.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Input/FTP.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Input/File.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Input/Stdin.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Output/DBIC.pm (modified) (2 diffs)
-
lib/App/Hachero/Plugin/Output/Dump.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Output/TT.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/OutputLine/HadoopMap.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Parse/Common.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Parse/HadoopReduce.pm (modified) (1 diff)
-
lib/App/Hachero/Plugin/Parse/Normalize.pm (modified) (1 diff)
-
lib/App/Hachero/Result.pm (modified) (1 diff)
-
lib/App/Hachero/Result/Data.pm (modified) (1 diff)
-
t/99_pod_coverage.t (modified) (1 diff)
-
t/plugin/fetch/01_ftp.t (modified) (1 diff)
-
t/plugin/fetch/02_ftp_multi.t (modified) (1 diff)
-
t/plugin/input/02_ftp.t (modified) (1 diff)
-
t/plugin/output/04_tt.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/App-Hachero/trunk/lib/App/Hachero.pm
r19898 r20603 51 51 52 52 sub run_hook_and_check { 53 my $self = shift; 54 my $hook = shift; 53 my ($self, $hook) = @_; 55 54 $self->run_hook($hook); 56 55 unless ($self->currentline) { … … 109 108 =pod 110 109 110 =encoding utf-8 111 111 112 =head1 NAME 113 114 App::Hachero - a plaggable log analyzing framework 112 115 113 116 =head1 SYNOPSYS 114 117 118 % hachero.pl -c config.yaml 119 115 120 =head1 DESCRIPTION 116 121 122 =head1 METHODS 123 124 =head2 new({config => $config}) 125 126 instanciates App::Hachero application. you can pass config in Plagger style. 127 128 =head2 initialize (internal use only) 129 130 setups work directory. 131 132 =head2 run 133 134 runs the application. 135 136 =head2 context 137 138 returns context object of the application. 139 140 =head2 set_currentline (internal use only) 141 142 cleanups $context->currentline before input new line. 143 144 =head2 run_hook_and_check($hook) 145 146 runs specified hook and checks whether currentline exists. returns 1 if 147 currentline exists. 148 149 =head2 class_component_load_plugin_resolver 150 151 returns plugin modules in plugin_path for Class::Component. 152 153 =head1 AUTHOR 154 155 Takaaki Mizuno <cpan@takaaki.info> 156 157 Nobuo Danjou <nobuo.danjou@gmail.com> 158 159 =head1 SEE ALSO 160 161 L<Plagger> 162 163 L<Class::Component> 164 165 L<Class::Component::Component::Plaggerize> 166 167 L<Class::Component::Component::DisableDynamicPlugin> 168 169 L<App::MadEye> 170 171 =head1 REPOSITORY 172 173 svn co http://svn.coderepos.org/share/lang/perl/App-Hachero/trunk hachero 174 175 The svn repository of this module is hosted at L<http://coderepos.org/share/>. 176 Patches and commits are welcome. 177 178 =head1 LICENSE 179 180 This library is free software; you can redistribute it and/or modify 181 it under the same terms as Perl itself. 182 117 183 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Analyze/AccessCount.pm
r19768 r20603 20 20 } 21 21 22 package App::Hachero::Result::AccessCount; 22 package # hide from PAUSE 23 App::Hachero::Result::AccessCount; 23 24 use base qw(App::Hachero::Result); 24 25 __PACKAGE__->mk_classdata(primary => ['datetime']); 25 26 26 27 1; 28 __END__ 29 30 =pod 31 32 =encoding utf8 33 34 =head1 NAME 35 36 App::Hachero::Plugin::Analyze::AccessCount - simple analyzer for App::Hachero 37 38 =head1 SYNOPSYS 39 40 =head1 DESCRIPTION 41 42 =head1 IMPLEMENTED HOOKS 43 44 =head2 analyze 45 46 =head1 AUTHOR 47 48 Takaaki Mizuno <cpan@takaaki.info> 49 50 Nobuo Danjou <nobuo.danjou@gmail.com> 51 52 =head1 SEE ALSO 53 54 L<App::Hachero> 55 56 L<App::Hachero::Result> 57 58 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Analyze/UserAgent.pm
r19888 r20603 25 25 } 26 26 27 package App::Hachero::Result::UserAgent; 27 package # hide from PAUSE 28 App::Hachero::Result::UserAgent; 28 29 use base qw(App::Hachero::Result); 29 30 __PACKAGE__->mk_classdata('primary' => [qw(datetime useragent)]); 30 31 31 32 1; 33 __END__ 34 35 =pod 36 37 =encoding utf8 38 39 =head1 NAME 40 41 App::Hachero::Plugin::Analyze::UserAgent - simple analyzer for App::Hachero 42 43 =head1 SYNOPSYS 44 45 =head1 DESCRIPTION 46 47 =head1 IMPLEMENTED HOOKS 48 49 =head2 analyze 50 51 =head1 AUTHOR 52 53 Takaaki Mizuno <cpan@takaaki.info> 54 55 Nobuo Danjou <nobuo.danjou@gmail.com> 56 57 =head1 SEE ALSO 58 59 L<App::Hachero> 60 61 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Base.pm
r18806 r20603 11 11 12 12 1; 13 __END__ 14 15 =pod 16 17 =encoding utf8 18 19 =head1 NAME 20 21 App::Hachero::Plugin::Base - base class of plugin for App::Hachero 22 23 =head1 SYNOPSYS 24 25 =head1 DESCRIPTION 26 27 =head1 METHODS 28 29 =head2 new 30 31 constructor. 32 33 =head1 AUTHOR 34 35 Takaaki Mizuno <cpan@takaaki.info> 36 37 Nobuo Danjou <nobuo.danjou@gmail.com> 38 39 =head1 SEE ALSO 40 41 L<App::Hachero> 42 43 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Classify/Robot.pm
r18806 r20603 21 21 22 22 1; 23 __END__ 24 25 =pod 26 27 =encoding utf8 28 29 =head1 NAME 30 31 App::Hachero::Plugin::Classify::Robot - plugin that marks robot request 32 33 =head1 SYNOPSYS 34 35 =head1 DESCRIPTION 36 37 =head1 IMPLEMENTED HOOKS 38 39 =head2 classify 40 41 =head1 AUTHOR 42 43 Takaaki Mizuno <cpan@takaaki.info> 44 45 Nobuo Danjou <nobuo.danjou@gmail.com> 46 47 =head1 SEE ALSO 48 49 L<App::Hachero> 50 51 =cut 52 -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Classify/UserAgent.pm
r19888 r20603 17 17 18 18 1; 19 __END__ 20 21 =pod 22 23 =encoding utf8 24 25 =head1 NAME 26 27 App::Hachero::Plugin::Classify::UserAgent - sets useragent information for the request 28 29 =head1 SYNOPSYS 30 31 =head1 DESCRIPTION 32 33 =head1 IMPLEMENTED HOOKS 34 35 =head2 classify 36 37 =head1 AUTHOR 38 39 Takaaki Mizuno <cpan@takaaki.info> 40 41 Nobuo Danjou <nobuo.danjou@gmail.com> 42 43 =head1 SEE ALSO 44 45 L<App::Hachero> 46 47 L<HTTP::DetectUserAgent> 48 49 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Fetch/FTP.pm
r18806 r20603 34 34 35 35 1; 36 __END__ 37 38 =pod 39 40 =encoding utf8 41 42 =head1 NAME 43 44 App::Hachero::Plugin::Fetch::FTP - fetchs logs from FTP server 45 46 =head1 SYNOPSIS 47 48 =head1 DESCRIPTION 49 50 =head1 IMPLEMENTED HOOKS 51 52 =head2 fetch 53 54 =head1 AUTHOR 55 56 Takaaki Mizuno <cpan@takaaki.info> 57 58 Nobuo Danjou <nobuo.danjou@gmail.com> 59 60 =head1 SEE ALSO 61 62 L<App::Hachero> 63 64 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Filter/AccessTime.pm
r19899 r20603 30 30 31 31 1; 32 __END__ 33 34 =pod 35 36 =encoding utf8 37 38 =head1 NAME 39 40 App::Hachero::Plugin::Filter::AccessTime - excludes requests in specified time 41 42 =head1 SYNOPSYS 43 44 =head1 DESCRIPTION 45 46 =head1 IMPLEMENTED HOOKS 47 48 =head2 filter 49 50 =head1 AUTHOR 51 52 Takaaki Mizuno <cpan@takaaki.info> 53 54 Nobuo Danjou <nobuo.danjou@gmail.com> 55 56 =head1 SEE ALSO 57 58 L<App::Hachero> 59 60 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Input/FTP.pm
r19262 r20603 53 53 54 54 1; 55 __END__ 56 57 =pod 58 59 =encoding utf8 60 61 =head1 NAME 62 63 App::Hachero::Plugin::Input::FTP - reads logs from FTP server (somehow directly) 64 65 =head1 SYNOPSYS 66 67 =head1 DESCRIPTION 68 69 =head1 IMPLEMENTED HOOKS 70 71 =head2 input 72 73 =head1 AUTHOR 74 75 Takaaki Mizuno <cpan@takaaki.info> 76 77 Nobuo Danjou <nobuo.danjou@gmail.com> 78 79 =head1 SEE ALSO 80 81 L<App::Hachero> 82 83 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Input/File.pm
r19752 r20603 66 66 67 67 1; 68 __END__ 69 70 =pod 71 72 =encoding utf8 73 74 =head1 NAME 75 76 App::Hachero::Plugin::Input::File - reads logs from specified direcotry 77 78 =head1 SYNOPSYS 79 80 =head1 DESCRIPTION 81 82 =head1 IMPLEMENTED HOOKS 83 84 =head2 input 85 86 =head1 AUTHOR 87 88 Takaaki Mizuno <cpan@takaaki.info> 89 90 Nobuo Danjou <nobuo.danjou@gmail.com> 91 92 =head1 SEE ALSO 93 94 L<App::Hachero> 95 96 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Input/Stdin.pm
r18806 r20603 17 17 18 18 1; 19 __END__ 20 21 =pod 22 23 =encoding utf8 24 25 =head1 NAME 26 27 App::Hachero::Plugin::Input::Stdin - reads logs from STDIN 28 29 =head1 SYNOPSYS 30 31 =head1 DESCRIPTION 32 33 =head1 IMPLEMENTED HOOKS 34 35 =head2 input 36 37 =head1 AUTHOR 38 39 Takaaki Mizuno <cpan@takaaki.info> 40 41 Nobuo Danjou <nobuo.danjou@gmail.com> 42 43 =head1 SEE ALSO 44 45 L<App::Hachero> 46 47 =cut 48 -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Output/DBIC.pm
r19883 r20603 35 35 } 36 36 37 package App::Hachero::Plugin::Output::DBIC::Schema; 37 package # hide from PAUSE 38 App::Hachero::Plugin::Output::DBIC::Schema; 38 39 use base qw(DBIx::Class::Schema::Loader); 39 40 … … 41 42 42 43 1; 44 __END__ 45 46 =pod 47 48 =encoding utf8 49 50 =head1 NAME 51 52 App::Hachero::Plugin::Output::DBIC - writes results to databases via DBIx::Class 53 54 =head1 SYNOPSYS 55 56 =head1 DESCRIPTION 57 58 =head1 IMPLEMENTED HOOKS 59 60 =head2 output 61 62 =head1 AUTHOR 63 64 Takaaki Mizuno <cpan@takaaki.info> 65 66 Nobuo Danjou <nobuo.danjou@gmail.com> 67 68 =head1 SEE ALSO 69 70 L<App::Hachero> 71 72 L<DBIx::Class::Schema::Loader> 73 74 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Output/Dump.pm
r19768 r20603 5 5 use YAML; 6 6 7 sub init {8 9 }10 11 7 sub output : Hook { 12 8 my ($self, $context, $args) = @_; 13 warn Dump $context->result; 9 my $fh = \*STDOUT; 10 print $fh $context->result; 14 11 } 15 12 16 13 1; 14 __END__ 15 16 =pod 17 18 =encoding utf8 19 20 =head1 NAME 21 22 App::Hachero::Plugin::Output::Dump - dumps result to STDOUT (for debug) 23 24 =head1 SYNOPSYS 25 26 =head1 DESCRIPTION 27 28 =head1 IMPLEMENTED HOOKS 29 30 =head2 output 31 32 =head1 AUTHOR 33 34 Takaaki Mizuno <cpan@takaaki.info> 35 36 Nobuo Danjou <nobuo.danjou@gmail.com> 37 38 =head1 SEE ALSO 39 40 L<App::Hachero> 41 42 L<YAML> 43 44 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Output/TT.pm
r19782 r20603 17 17 18 18 1; 19 __DATA__ 19 __END__ 20 21 =pod 22 23 =encoding utf8 24 25 =head1 NAME 26 27 App::Hachero::Plugin::Output::TT - writes results via template toolkit 28 29 =head1 SYNOPSYS 30 31 =head1 DESCRIPTION 32 33 =head1 IMPLEMENTED HOOKS 34 35 =head2 output 36 37 =head1 AUTHOR 38 39 Nobuo Danjou <nobuo.danjou@gmail.com> 40 41 =head1 SEE ALSO 42 43 L<App::Hachero> 44 45 L<Template> 46 47 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/OutputLine/HadoopMap.pm
r19768 r20603 21 21 22 22 1; 23 __END__ 24 25 =pod 26 27 =encoding utf8 28 29 =head1 NAME 30 31 App::Hachero::Plugin::OutputLine::HadoopMap - outpts results with hadoop format 32 33 =head1 SYNOPSYS 34 35 =head1 DESCRIPTION 36 37 =head1 IMPLEMENTED HOOKS 38 39 =head2 output_line 40 41 =head1 AUTHOR 42 43 Nobuo Danjou <nobuo.danjou@gmail.com> 44 45 =head1 SEE ALSO 46 47 L<App::Hachero> 48 49 L<http://hadoop.apache.org> 50 51 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Parse/Common.pm
r18806 r20603 22 22 23 23 1; 24 __END__ 25 26 =pod 27 28 =encoding utf8 29 30 =head1 NAME 31 32 App::Hachero::Plugin::Parse::Common - parses common apache logs 33 34 =head1 SYNOPSYS 35 36 =head1 DESCRIPTION 37 38 =head1 IMPLEMENTED HOOKS 39 40 =head2 parse 41 42 =head1 AUTHOR 43 44 Takaaki Mizuno <cpan@takaaki.info> 45 46 Nobuo Danjou <nobuo.danjou@gmail.com> 47 48 =head1 SEE ALSO 49 50 L<App::Hachero> 51 52 L<Regexp::Log::Common> 53 54 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Parse/HadoopReduce.pm
r19783 r20603 20 20 21 21 1; 22 __END__ 23 24 =pod 25 26 =encoding utf8 27 28 =head1 NAME 29 30 App::Hachero::Plugin::Parse::HadoopReduce - parses line from A::H::P::OutputLine::HadoopMap 31 32 =head1 SYNOPSYS 33 34 =head1 DESCRIPTION 35 36 =head1 IMPLEMENTED HOOKS 37 38 =head2 parse 39 40 =head1 AUTHOR 41 42 Takaaki Mizuno <cpan@takaaki.info> 43 44 Nobuo Danjou <nobuo.danjou@gmail.com> 45 46 =head1 SEE ALSO 47 48 L<App::Hachero> 49 50 Hadoop L<http://hadoop.apache.org/> 51 52 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Parse/Normalize.pm
r19888 r20603 27 27 28 28 1; 29 __END__ 30 31 =pod 32 33 =encoding utf8 34 35 =head1 NAME 36 37 App::Hachero::Plugin::Parse::Normalize - normalizes request informations set by Parse::Common 38 39 =head1 SYNOPSYS 40 41 =head1 DESCRIPTION 42 43 =head1 IMPLEMENTED HOOKS 44 45 =head2 parse 46 47 =head1 AUTHOR 48 49 Takaaki Mizuno <cpan@takaaki.info> 50 51 Nobuo Danjou <nobuo.danjou@gmail.com> 52 53 =head1 SEE ALSO 54 55 L<App::Hachero> 56 57 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Result.pm
r19901 r20603 49 49 50 50 1; 51 __END__ 52 53 =pod 54 55 =encoding utf8 56 57 =head1 NAME 58 59 App::Hachero::Result - represents a series of result of App::Hachero 60 61 =head1 SYNOPSYS 62 63 =head1 DESCRIPTION 64 65 =head1 METHODS 66 67 =head2 new 68 69 =head2 push($hashref) 70 71 pushes new data hashref to the result and set count of the data to 1. 72 73 =head2 values 74 75 returns data array of this result. 76 77 =head2 sort 78 79 sorts data array for values method. you can override this method for your result class. 80 81 =head2 key($data) (internal use only) 82 83 returns md5_hex key for the result data. 84 85 =head1 AUTHOR 86 87 Takaaki Mizuno <cpan@takaaki.info> 88 89 Nobuo Danjou <nobuo.danjou@gmail.com> 90 91 =head1 SEE ALSO 92 93 L<App::Hachero> 94 95 L<App::Hachero::Result::Data> 96 97 =cut -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Result/Data.pm
r19883 r20603 30 30 31 31 1; 32 __END__ 33 34 =pod 35 36 =encoding utf8 37 38 =head1 NAME 39 40 App::Hachero::Result::Data - represents a result data of App::Hachero 41 42 =head1 SYNOPSYS 43 44 =head1 DESCRIPTION 45 46 =head1 METHODS 47 48 =head2 new($hashref) 49 50 creates result data. 51 52 =head2 keys 53 54 returns keys in this data objects. 55 56 =head2 value($key) 57 58 returns data value of specified key. 59 60 =head2 count_up($count) 61 62 increments 'count' value with specified number. default number is 1. 63 64 =head2 hashref 65 66 returns data hashref of this object. 67 68 =head1 AUTHOR 69 70 Nobuo Danjou <nobuo.danjou@gmail.com> 71 72 =head1 SEE ALSO 73 74 L<App::Hachero> 75 76 L<App::Hachero::Result> 77 78 =cut -
lang/perl/App-Hachero/trunk/t/99_pod_coverage.t
r19786 r20603 2 2 eval "use Test::Pod::Coverage 1.04"; 3 3 plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; 4 all_pod_coverage_ok( );4 all_pod_coverage_ok({ also_private => [qw{ init }]}); -
lang/perl/App-Hachero/trunk/t/plugin/fetch/01_ftp.t
r18806 r20603 1 1 use strict; 2 2 use warnings; 3 use Test::More tests => 2;3 use Test::More; 4 4 use App::Hachero; 5 5 use File::Spec; 6 6 7 7 BEGIN { 8 use_ok('App::Hachero::Plugin::Fetch::FTP'); 8 if ($ENV{HACHERO_TEST_FTP}) { 9 plan tests => 2; 10 use_ok('App::Hachero::Plugin::Fetch::FTP'); 11 } else { 12 plan skip_all => 'set "TEST_HACHERO_FTP" to run this test.'; 13 exit 0; 14 } 9 15 } 10 16 -
lang/perl/App-Hachero/trunk/t/plugin/fetch/02_ftp_multi.t
r18806 r20603 1 1 use strict; 2 2 use warnings; 3 use Test::More tests => 2;3 use Test::More; 4 4 use App::Hachero; 5 5 use File::Spec; 6 6 7 7 BEGIN { 8 use_ok('App::Hachero::Plugin::Fetch::FTP'); 8 if ($ENV{HACHERO_TEST_FTP}) { 9 plan tests => 2; 10 use_ok('App::Hachero::Plugin::Fetch::FTP'); 11 } else { 12 plan skip_all => 'set "TEST_HACHERO_FTP" to run this test.'; 13 exit 0; 14 } 9 15 } 10 16 -
lang/perl/App-Hachero/trunk/t/plugin/input/02_ftp.t
r18806 r20603 1 1 use strict; 2 2 use warnings; 3 use Test::More tests => 2;3 use Test::More; 4 4 use App::Hachero; 5 5 6 7 6 BEGIN { 8 use_ok('App::Hachero::Plugin::Input::FTP'); 7 if ($ENV{HACHERO_TEST_FTP}) { 8 plan tests => 2; 9 use_ok('App::Hachero::Plugin::Input::FTP'); 10 } else { 11 plan skip_all => 'set "TEST_HACHERO_FTP" to run this test.'; 12 exit 0; 13 } 9 14 } 10 15 11 SKIP: { 12 my $config = { 13 plugins => [ 14 { 15 module => 'Input::FTP', 16 config => { 17 host => 'ftp.riken.jp', 18 username => 'anonymous', 19 file => '/lang/CPAN/README', 20 } 21 } 22 ], 23 }; 24 my $app = App::Hachero->new({config => $config}); 25 # $app->run_hook('fetch'); 26 $app->run_hook('input'); 27 ok $app->currentline; 28 } 16 my $config = { 17 plugins => [ 18 { 19 module => 'Input::FTP', 20 config => { 21 host => 'ftp.riken.jp', 22 username => 'anonymous', 23 file => '/lang/CPAN/README', 24 } 25 } 26 ], 27 }; 28 my $app = App::Hachero->new({config => $config}); 29 $app->run_hook('input'); 30 ok $app->currentline; 29 31 30 32 1; -
lang/perl/App-Hachero/trunk/t/plugin/output/04_tt.t
r19782 r20603 47 47 my $output < io $out; 48 48 is $output, $block->expected; 49 unlink $template; 50 unlink $out; 49 51 } 50 52
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)