Giter Club home page Giter Club logo

loganalysis's Introduction

MapReduce课程设计之日志分析

1 课程设计目标

本课程设计通过使用 MapReduce 来实现日志分析,日志分析在互联网企业应用很广,通过本课程设计的学习,可以进一步了解 MapReduce 技术在工业界的应用。

2 学习技能

本次课程设计可以熟悉和掌握以下 MapReduce 编程技能:

1、 海量日志数据的统计分析。

2、 基于 MapReduce 的预测模型设计,通过对历史日志数据的分析建立预测模型。

3 题目描述

电商公司越来越重视接口访问日志的利用,从日志文件里边可以获取到接口的访问性能、访问频率、访问来源,统计有以下的意义:

1、 能够快速获取接口访问性能是否下降,或者接口访问频率异常。

2、 结合公司的访问量,可以预估举行促销活动时,需要增加机器的数量。

3、 接口修改后,是否出现波动等。

3.1 日志文件结构定义

本题给出的日志文件的格式:

i1

具体意义如下表所示:

i2

3.2 任务描述

1、统计日志中各个状态码(200,404,500)出现总的频次,并且按照小时时间窗,输出各个时间段各状态码的统计情况。统计文件命名为 1.txt ,输出格式为:单词与数字之间英文(:)分割。时间之间英文(-)分割,其他是空格或者空行。

2、统计每个 IP 访问总的频次,并且按照小时时间窗,输出各个时间段各个 IP 访问的情 况 。每个 IP 的统计信息是一个文件,并且以 IP 为文件名(后缀为txt,如 :172.22.49.26.txt),每个文件的输出格式同任务1。

3、统计每个接口(请求的 URL)访问总的频次,并且以接口为文件,按照秒为单位的时间窗,输出各个时间段各接口的访问情况。每个接口的统计信息是一个文件,如接口/tour/category/query 的统计文件命名为:our-category-query.txt,每个文件的输出格式同任务1。

4、统计每个接口的平均响应时间,并且以接口为分组,按照小时时间窗,输出各个时间段各个接口平均的响应时间。每个接口的统计信息是一个文件,如接口/tour/category/query 的统计文件命名为:tour-category-query.txt,每个文件的输出格式同任务1。

5、接口访问频次预测,给 2015-09-08.log 到 2015-09-21.log 共 14 天的日志文件,作为训练数据,设计预测算法来预测下一天(2015-09-22)每个小时窗内每个接口(请求的URL)的访问总频次。输出格式同任务 1。该结果会与当天实际的统计值(2015-09-22.log)做 RMSE 验证。

输出格式如下:

i3

3.3 输入文件

输入日志文件均在集群 http://114.212.190.91:50070/explorer.html#/data/task1/JN1_LOG 目录下。

任务 1-4 使用 2015-09-08.log 作为输入文件。

任务 5 使用 2015-09-08.log 到 2015-09-21.log 的日志作为预测的输入文件,并且预测下一天每个小时窗内每个接口(请求的 URL)的访问总频次并根据预测结果和实际值计算 RMSE。

loganalysis's People

Contributors

nju2014cs avatar zzzzwj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.