美文网首页
图表显示日志离线信息

图表显示日志离线信息

作者: 那山的狐狸 | 来源:发表于2020-05-14 23:57 被阅读0次

关注公众号:分享电脑学习

回复"百度云盘" 可以免费获取所有学习文档的代码(不定期更新)

云盘目录说明:

tools目录是安装包

res 目录是每一个课件对应的代码和资源等

doc 目录是一些第三方的文档工具

承接上一篇文档《Hive分析统计hour信息

准备数据库lx_data

创建pom项目

配置pom

3.2.1.RELEASE3.1.11.2.17junitjunit3.8.1testjavax.servletservlet-api2.5providedorg.springframeworkspring-core${spring.version}org.springframeworkspring-web${spring.version}org.springframeworkspring-oxm${spring.version}org.springframeworkspring-tx${spring.version}org.springframeworkspring-jdbc${spring.version}org.springframeworkspring-webmvc${spring.version}org.springframeworkspring-aop${spring.version}org.springframeworkspring-context-support${spring.version}org.springframeworkspring-test${spring.version}org.mybatismybatis${mybatis.version}org.mybatismybatis-spring1.2.2mysqlmysql-connector-java5.1.18com.mchangec3p00.9.5log4jlog4j${log4j.version}<!-- spring如果需要返回json格式的数据,那么必须引入下面两个包 -->org.codehaus.jacksonjackson-core-asl1.9.13org.codehaus.jacksonjackson-mapper-asl1.9.13

创建并配置jdbc.properties

# local

jdbc.driverClassName=com.mysql.jdbc.Driver

jdbc.url=jdbc:mysql://localhost:3306/lx_data?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true

jdbc.username=root

jdbc.password=

jdbc.minPoolSize=2

jdbc.maxPoolSize=20

jdbc.acquireIncrement=2

jdbc.initialPoolSize=3

jdbc.testConnectionOnCheckout=false

jdbc.idleConnectionTestPeriod=3600

jdbc.maxIdleTime=3600

创建并配置log4j.properties

log4j.rootCategory=info,stdout,fileout

### stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender

log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

log4j.appender.stdout.layout.ConversionPattern=%d{MM-dd-HH\:mm\:ss} - lx_dataapi - [%t] %-5p [%C\:%L]%x %m%n

### fileout

log4j.appender.fileout=org.apache.log4j.DailyRollingFileAppender

log4j.appender.fileout.File=${catalina.base}/logs/dataapi.log

log4j.appender.fileout.layout=org.apache.log4j.PatternLayout

log4j.appender.fileout.layout.ConversionPattern=%d{MM-dd-HH\:mm\:ss} - lx_dataapi - [%t] %-5p [%C\:%L]%x %m%n

log4j.appender.fileout.DatePattern='.'yyyy-MM-dd

### print the mybatis execute sql

log4j.logger.org.apache.ibatis=DEBUG

log4j.logger.java.sql=DEBUG

创建并配置 ae-mvc.xml

<?xml version="1.0"encoding="UTF-8"?>

http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans-3.0.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context-3.0.xsd

http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop-3.0.xsd

http://www.springframework.org/schema/tx

http://www.springframework.org/schema/tx/spring-tx-3.0.xsd

http://www.springframework.org/schema/mvc

http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">Spring-web MVC配置<!-- 这两个类用来启动基于Spring MVC的注解功能,将控制器与方法映射加入到容器中 --><!-- 对所有类进行扫描,以完成Bean创建和自动依赖注入的功能 --><!-- 添加静态资源访问 -->

创建并配置 ae-beans.xml

<?xml version="1.0"encoding="UTF-8"?>

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop-3.0.xsd

http://www.springframework.org/schema/cache

http://www.springframework.org/schema/cache/spring-cache.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context-3.0.xsd

http://www.springframework.org/schema/mvc

http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd

http://www.springframework.org/schema/util

http://www.springframework.org/schema/util/spring-util-3.0.xsd

"default-autowire="byName"><!-- 创建jdbc -->classpath:jdbc.properties<!-- ae相关配置信息 -->classpath*:com/wzy/ae/**/*Mapper.xml<!-- 具体service bean --><!-- 具体service bean结束 --><!-- bucket.metric 对应的计算类bean --><!-- bucket.metric 对应的计算类bean结束 --><!-- dao相关bean --><!-- dao相关bean结束 --><!-- 共用service bean --><!-- 共用service bean结束 -->创建并配置aeConfigContext.xml

<?xml version="1.0"encoding="UTF-8"?>

http://www.springframework.org/schema/beans/spring-beans-3.0.xsd

http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop-3.0.xsd

http://www.springframework.org/schema/cache

http://www.springframework.org/schema/cache/spring-cache.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context-3.0.xsd

http://www.springframework.org/schema/mvc

http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd

http://www.springframework.org/schema/util

http://www.springframework.org/schema/util/spring-util-3.0.xsd

"><!-- bucket metric 参数,定义的是从mysql获取的列名 --><!-- bucket metric 返回value参数 结束 --><!-- bucket metric query id 参数 --><!-- bucket metric query id 参数结束 --><!-- bucket metric 参数 -->orderssuccess_ordersrefund_ordersorder_amountrevenue_amountrefund_amounttotal_revenue_amounttotal_refund_amounttimesuvvisitbounce_numberview_depth_of_userview_depth_of_sessionuvvisitbounce_numberactive_userstotal_usersnew_usersactive_memberstotal_membersnew_memberssessionssessions_lengthpvactive_usersactive_user_ratetotal_usersnew_usersnew_user_ratenew_user_speed_rateactive_user_speed_ratetotal_user_speed_rateactive_membersactive_member_ratetotal_membersnew_membersnew_member_ratenew_member_speed_rateactive_member_speed_ratetotal_member_speed_ratesessionssessions_lengthhourly_sessionshourly_sessions_lengthhourly_active_user<!-- bucket metric 参数结束--><!-- bucket group 参数-->day<!-- <value>week</value>

<value>month</value>

<value>season</value>

<value>year</value> -->platformbrowserbrowser_versioncountryprovincecityinboundcategoryactioncurrency_typepayment_type<!-- bucket group 参数-->

创建包结构

完成web.xml的内容

环境完成后

完成common包中

创建AEConstants

完成model包中的代码

完成util包中的代码

完成calculate包中的代码

完成dao包中的代码

完成service包下面代码

最后再完成controller中的代码

准备页面

运行,访问http://localhost:8080/dataapi/analyse/index.html

出现错误,将jdk版本降下来就行了

spring 3.2不支持1.8编译环境,解决办法就是降为1.7编译环境

spring官网说了,要使用java8,只支持spring 4.X以上版本,而spring的使用最低java要求java5及以上

再次运行就可以了,因为数据是旧的注意日期的选择

代码和数据库已经上传,直接下载就可以运行了

相关文章

  • 图表显示日志离线信息

    关注公众号:分享电脑学习 回复"百度云盘" 可以免费获取所有学习文档的代码(不定期更新) 云盘目录说明: tool...

  • Linux日志查询

    1、动态获取实时生成日志信息 tail -f nohup.log 2、显示日志信息 -打印出所有日志文件中的日志信...

  • Oracle归档日志

    显示归档日志信息 1,使用ARCHIVE LOG LIST命令可以显示日志操作模式,归档位置,自动归档机器要归档的...

  • Hive分析统计离线日志信息

    关注公众号:分享电脑学习 回复"百度云盘" 可以免费获取所有学习文档的代码(不定期更新) 云盘目录说明: tool...

  • ReadProcessor read fields took x

    Flink merge HDSF小文件任务日志中有大量warn信息,如下: 登入到日志中显示的节点上,进入日志的目...

  • maven 常用命令

    Maven 参数: -D 传入属性参数-P 使用pom中指定的配置-e 显示maven运行出错的信息-o 离线执行...

  • echarts图表在el-dialog中显示问题

    el-dialog 中动态渲染 echarts 图表 现象第一次点开不显示图表,第二次点开虽然显示图表,但是图表挤...

  • Hive基础知识-2

    Hive使用场景: 离线数据 处理大数据 延迟高 数据的离线处理;比如:日志分析,海量结构化数据离线分析… Hiv...

  • 142.如何个性化推荐系统设计-2

    142.1 离线训练 离线训练流程 如何线上实时反馈特征?在线计算,与曝光日志一起上报,离线直接使用 如何解决曝光...

  • yii日志的逻辑(转)

    Yii使用层次的日志处理机制,即日志的收集与日志最终的处理(如显示、保存到文件、保存到数据数)是分离的。 日志信息...

网友评论

      本文标题:图表显示日志离线信息

      本文链接:https://www.haomeiwen.com/subject/gsofohtx.html