既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
payment(Double类型):支付总金额
productTotalAmount(Double类型):订单商品总金额
isCod(String类型):是否货到付款
orderStatus(String类型):订单状态
package receiveVo;
import java.io.Serializable;
public class WsOrderVo implements Serializable{
private static final long serialVersionUID = 1L;
private int orderId; //订单ID
private int userId; //下单的用户ID
private String orderNum; //订单编号
private Double payment; //支付总金额
private Double productTotalAmount; //订单商品总金额
private String isCod; //是否货到付款
private String orderStatus; //订单状态
public WsOrderVo()
{
}
public int getOrderId()
{
return orderId;
}
public void setOrderId(int orderId)
{
this.orderId = orderId;
}
public int getUserId()
{
return userId;
}
public void setUserId(int userId)
{
this.userId = userId;
}
public String getOrderNum()
{
return orderNum;
}
public void setOrderNum(String orderNum)
{
this.orderNum = orderNum;
}
public Double getPayment()
{
return payment;
}
public void setPayment(Double payment)
{
this.payment = payment;
}
public Double getProductTotalAmount()
{
return productTotalAmount;
}
public void setProductTotalAmount(Double productTotalAmount)
{
this.productTotalAmount = productTotalAmount;
}
public String getIsCod()
{
return isCod;
}
public void setIsCod(String isCod)
{
this.isCod = isCod;
}
public String getOrderStatus()
{
return orderStatus;
}
public void setOrderStatus(String orderStatus)
{
this.orderStatus = orderStatus;
}
public String toString()
{
return (new StringBuilder()).append("WsOrderVo{orderId=").append(orderId).append(", userId=").append(userId).append(", orderNum='").append(orderNum).append('\'').append(", payment=").append(payment).append(", productTotalAmount=").append(productTotalAmount).append(", isCod='").append(isCod).append('\'').append(", orderStatus='").append(orderStatus).append('\'').append('}').toString();
}
}
5.2.3 采集用户订单项数
WsOrderItemVo.java定义采集用户订单项数据,实现了Serializable接口。它包含了以下属性:
orderItemId(int类型):订单项ID
orderId(int类型):订单ID
productId(int类型):商品ID
productUnitPrice(Double类型):商品单价
num(int类型):商品数量
package receiveVo;
import java.io.Serializable;
public class WsOrderItemVo implements Serializable{
private static final long serialVersionUID = 1L;
private int orderItemId; //订单项ID
private int orderId; //订单ID
private int productId; //商品ID
private Double productUnitPrice; //商品单价
private int num; //商品数量
public WsOrderItemVo()
{
}
public int getOrderItemId()
{
return orderItemId;
}
public void setOrderItemId(int orderItemId)
{
this.orderItemId = orderItemId;
}
public int getOrderId()
{
return orderId;
}
public void setOrderId(int orderId)
{
this.orderId = orderId;
}
public int getProductId()
{
return productId;
}
public void setProductId(int productId)
{
this.productId = productId;
}
public Double getProductUnitPrice()
{
return productUnitPrice;
}
public void setProductUnitPrice(Double productUnitPrice)
{
this.productUnitPrice = productUnitPrice;
}
public int getNum()
{
return num;
}
public void setNum(int num)
{
this.num = num;
}
public String toString()
{
return (new StringBuilder()).append("WsOrderItemVo{orderItemId=").append(orderItemId).append(", orderId=").append(orderId).append(", productId=").append(productId).append(", productUnitPrice=").append(productUnitPrice).append(", num=").append(num).append('}').toString();
}
}
5.3流量分析及经营状况分析
5.3.1流量分析
WsSysDataResultVo.java定义了流量分析数据。实现了Serializable接口。它包含了以下属性:
reportTime(String类型):时间维度
pageView(int类型):浏览量
userView(int类型):访客数
visitView(int类型):访问次数
visitDepth(float类型):平均访问深度
package hbase.resultVo;
import java.io.Serializable;
public class WsSysDataResultVo implements Serializable{
private static final long serialVersionUID = 1L;
//时间维度
private String reportTime;
//浏览量
private int pageView;
//访客数
private int userView;
//访问次数
private int visitView;
//平均访问深度
private float visitDepth;
public String getReportTime() {
return reportTime;
}
public void setReportTime(String reportTime) {
this.reportTime = reportTime;
}
public int getPageView() {
return pageView;
}
public void setPageView(int pageView) {
this.pageView = pageView;
}
public int getUserView() {
return userView;
}
public void setUserView(int userView) {
this.userView = userView;
}
public int getVisitView() {
return visitView;
}
public void setVisitView(int visitView) {
this.visitView = visitView;
}
public float getVisitDepth() {
return visitDepth;
}
public void setVisitDepth(float visitDepth) {
this.visitDepth = visitDepth;
}
}
5.3.2经营状况分析数据
OrderVo.java定义经营状况分析数据,实现了Serializable接口。它包含了以下属性:
reportTime(String类型):时间维度
orderPriceTotal(Double类型):下单金额
orderProductCount(int类型):下单商品件数
orderCount(int类型):下单数量
orderUserCount(int类型):下单客户数
orderSalePrice(Double类型):客单价
package hbase.resultVo;
import java.io.Serializable;
public class OrderVo implements Serializable{
private static final long serialVersionUID = 1L;
private String reportTime; //时间维度
private Double orderPriceTotal; //下单金额
private int orderProductCount; //下单商品件数
private int orderCount; //下单数量
private int orderUserCount; //下单客户数
private Double orderSalePrice; //客单价
public String getReportTime() {
return reportTime;
}
public void setReportTime(String reportTime) {
this.reportTime = reportTime;
}
public Double getOrderPriceTotal() {
return orderPriceTotal;
}
public void setOrderPriceTotal(Double orderPriceTotal) {
this.orderPriceTotal = orderPriceTotal;
}
public int getOrderProductCount() {
return orderProductCount;
}
public void setOrderProductCount(int orderProductCount) {
this.orderProductCount = orderProductCount;
}
public int getOrderCount() {
return orderCount;
}
public void setOrderCount(int orderCount) {
this.orderCount = orderCount;
}
public int getOrderUserCount() {
return orderUserCount;
}
public void setOrderUserCount(int orderUserCount) {
this.orderUserCount = orderUserCount;
}
public Double getOrderSalePrice() {
return orderSalePrice;
}
public void setOrderSalePrice(Double orderSalePrice) {
this.orderSalePrice = orderSalePrice;
}
}
5.4数据存储接口
HBaseDAO.java
package hbase.dao;
import java.util.List;
import receiveVo.WsOrderItemVo;
import receiveVo.WsOrderVo;
import receiveVo.WsSysAgentAccessVo;
public interface HBaseDAO {
//存储流量数据
public void saveAgentAccessData(List<WsSysAgentAccessVo>list) ;
//存储订单数据及订单项数据
public void saveOrderVo(WsOrderVo orderVo, List<WsOrderItemVo>list);
}
HBaseDAOImp.java
package hbase.dao.imp;
import hbase.dao.HBaseDAO;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.client.HConnection;
import org.apache.hadoop.hbase.client.HConnectionManager;
import org.apache.hadoop.hbase.client.HTableInterface;
import org.apache.hadoop.hbase.client.Put;
import receiveVo.WsOrderItemVo;
import receiveVo.WsOrderVo;
import receiveVo.WsSysAgentAccessVo;
import utils.ObjectAndByte;
public class HBaseDAOImp implements HBaseDAO{
HConnection hTbalePool = null ;
public HBaseDAOImp()
{
Configuration conf = new Configuration();
String zk_list = "172.30.0.10,172.30.0.11,172.30.0.12" ;
conf.set("hbase.zookeeper.quorum",zk_list) ;
try {
hTbalePool = HConnectionManager.createConnection(conf) ;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Override
public void saveAgentAccessData(List<WsSysAgentAccessVo> list) {
// TODO Auto-generated method stub
HTableInterface table = null ;
try {
table = hTbalePool.getTable("tb\_data") ;
for (WsSysAgentAccessVo vo : list) {
//行健 :用户类型+当前时间+用户标识
//用户类型,目前只分析pc端
String userTypeString = "1"; //1=PC流量,2=WAP流量,3=微信流量
//当前时间
Date now = new Date() ;
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss") ;//可以方便地修改日期格式
String timeStr = dateFormat.format( now ) ;
String rowkey = userTypeString+"-"+timeStr+"-"+System.currentTimeMillis() ;
System.out.println("rowkey:"+rowkey) ;
Put p = new Put(rowkey.getBytes()) ;
ObjectAndByte objToByte = new ObjectAndByte() ;
System.out.println(objToByte.toByteArray(vo)) ;
p.add("cf".getBytes(), "wsSysAgentAccessVo".getBytes(), objToByte.toByteArray(vo)) ;
table.put(p) ;
}
}catch (Exception e){
e.printStackTrace() ;
}finally{
try {
table.close() ;
} catch (IOException e) {
e.printStackTrace();
}
}
}
@Override
public void saveOrderVo(WsOrderVo orderVo, List<WsOrderItemVo>list) {
// TODO Auto-generated method stub
HTableInterface table = null ;
try {
int orderProductCount = 0; //订单商品件数
for (WsOrderItemVo vo1 : list) {
orderProductCount = orderProductCount + vo1.getNum();
}
table = hTbalePool.getTable("tb\_order") ;
//orderStatus 1 货到付款 0 在线支付 只有这两种把
![img](https://img-blog.csdnimg.cn/img_convert/6e797420ca51a0c0df94c02398ca9012.png)
![img](https://img-blog.csdnimg.cn/img_convert/df7f258869a11e7535d532ecb414186e.png)
**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**
**[需要这份系统化资料的朋友,可以戳这里获取](https://bbs.csdn.net/topics/618545628)**
**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**
table = hTbalePool.getTable("tb\_order") ;
//orderStatus 1 货到付款 0 在线支付 只有这两种把
[外链图片转存中...(img-wrWSnV8E-1715600734259)]
[外链图片转存中...(img-jpmNwypS-1715600734259)]
**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**
**[需要这份系统化资料的朋友,可以戳这里获取](https://bbs.csdn.net/topics/618545628)**
**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**