实时数仓任务2更新
This commit is contained in:
parent
47beed6aa1
commit
2aaa3a3931
|
|
@ -0,0 +1,97 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>rt-gmall-parent</artifactId>
|
||||||
|
<groupId>com.atguigu.rtgmall</groupId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>gmall-cdc</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.flink</groupId>
|
||||||
|
<artifactId>flink-java</artifactId>
|
||||||
|
<version>1.12.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.flink</groupId>
|
||||||
|
<artifactId>flink-streaming-java_2.12</artifactId>
|
||||||
|
<version>1.12.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.flink</groupId>
|
||||||
|
<artifactId>flink-clients_2.12</artifactId>
|
||||||
|
<version>1.12.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.hadoop</groupId>
|
||||||
|
<artifactId>hadoop-client</artifactId>
|
||||||
|
<version>3.1.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>5.1.48</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.ververica</groupId>
|
||||||
|
<artifactId>flink-connector-mysql-cdc</artifactId>
|
||||||
|
<version>1.2.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<version>1.2.75</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- flink sql-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.flink</groupId>
|
||||||
|
<artifactId>flink-table-planner-blink_2.12</artifactId>
|
||||||
|
<version>1.12.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
<configuration>
|
||||||
|
<descriptorRefs>
|
||||||
|
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||||
|
</descriptorRefs>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>make-assembly</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.atguigu.gmall.cdc;
|
||||||
|
|
||||||
|
import com.alibaba.ververica.cdc.connectors.mysql.table.StartupOptions;
|
||||||
|
import org.apache.flink.api.common.eventtime.WatermarkStrategy;
|
||||||
|
import org.apache.flink.api.common.restartstrategy.RestartStrategies;
|
||||||
|
import org.apache.flink.runtime.state.filesystem.FsStateBackend;
|
||||||
|
import org.apache.flink.streaming.api.CheckpointingMode;
|
||||||
|
import org.apache.flink.streaming.api.environment.CheckpointConfig;
|
||||||
|
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
|
||||||
|
import com.alibaba.ververica.cdc.debezium.StringDebeziumDeserializationSchema;
|
||||||
|
import com.alibaba.ververica.cdc.connectors.mysql.MySQLSource;
|
||||||
|
import org.apache.flink.streaming.api.functions.source.SourceFunction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@BelongsProject: rt-gmall-parent
|
||||||
|
*@BelongsPackage: com.atguigu.gmall.cdc
|
||||||
|
*@Author: markilue
|
||||||
|
*@CreateTime: 2023-05-06 14:26
|
||||||
|
*@Description: TODO 通过FlinkCDC动态读取Mysql表中的数据 -- DataStreamAPI
|
||||||
|
*@Version: 1.0
|
||||||
|
*/
|
||||||
|
public class FlinkCDC01_DS {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
|
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
|
||||||
|
|
||||||
|
// enable checkpoint
|
||||||
|
// env.enableCheckpointing(3000);
|
||||||
|
|
||||||
|
env.setParallelism(1);
|
||||||
|
|
||||||
|
//TODO 2.开启检查点 Flink-CDC将读取binlog的位置信息以状态的方式保存在CK,如果想要做到断点续传,
|
||||||
|
// 需要从Checkpoint或者Savepoint启动程序
|
||||||
|
//2.1 开启Checkpoint,每隔5秒钟做一次CK ,并指定CK的一致性语义
|
||||||
|
env.enableCheckpointing(5000L, CheckpointingMode.EXACTLY_ONCE);
|
||||||
|
//2.2 设置超时时间为1分钟
|
||||||
|
env.getCheckpointConfig().setCheckpointTimeout(60000);
|
||||||
|
//2.3 指定从CK自动重启策略
|
||||||
|
env.setRestartStrategy(RestartStrategies.fixedDelayRestart(2,2000L));
|
||||||
|
//2.4 设置任务关闭的时候保留最后一次CK数据
|
||||||
|
env.getCheckpointConfig().enableExternalizedCheckpoints(CheckpointConfig.ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION);
|
||||||
|
//2.5 设置状态后端
|
||||||
|
env.setStateBackend(new FsStateBackend("hdfs://Ding202:8020/flinkCDC"));
|
||||||
|
//2.6 设置访问HDFS的用户名
|
||||||
|
System.setProperty("HADOOP_USER_NAME", "dingjiawen");
|
||||||
|
|
||||||
|
|
||||||
|
SourceFunction<String> mySqlSource = MySQLSource.<String>builder()
|
||||||
|
.hostname("Ding202")
|
||||||
|
.port(3306)
|
||||||
|
.databaseList("rt_gmall_realtime") // set captured database
|
||||||
|
.tableList("rt_gmall_realtime.t_user") // set captured table
|
||||||
|
.username("root")
|
||||||
|
.password("123456")
|
||||||
|
.startupOptions(StartupOptions.initial())
|
||||||
|
.deserializer(new StringDebeziumDeserializationSchema()) // converts SourceRecord to JSON String
|
||||||
|
.build();
|
||||||
|
|
||||||
|
env.addSource(mySqlSource)
|
||||||
|
.print();
|
||||||
|
|
||||||
|
|
||||||
|
env.execute("Print MySQL Snapshot + Binlog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.atguigu.gmall.cdc;
|
||||||
|
|
||||||
|
import com.alibaba.ververica.cdc.connectors.mysql.MySQLSource;
|
||||||
|
import com.alibaba.ververica.cdc.connectors.mysql.table.StartupOptions;
|
||||||
|
import com.alibaba.ververica.cdc.debezium.StringDebeziumDeserializationSchema;
|
||||||
|
import org.apache.flink.api.common.restartstrategy.RestartStrategies;
|
||||||
|
import org.apache.flink.runtime.state.filesystem.FsStateBackend;
|
||||||
|
import org.apache.flink.streaming.api.CheckpointingMode;
|
||||||
|
import org.apache.flink.streaming.api.environment.CheckpointConfig;
|
||||||
|
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
|
||||||
|
import org.apache.flink.streaming.api.functions.source.SourceFunction;
|
||||||
|
import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@BelongsProject: rt-gmall-parent
|
||||||
|
*@BelongsPackage: com.atguigu.gmall.cdc
|
||||||
|
*@Author: markilue
|
||||||
|
*@CreateTime: 2023-05-06 14:26
|
||||||
|
*@Description: TODO 通过FlinkCDC动态读取Mysql表中的数据
|
||||||
|
*@Version: 1.0
|
||||||
|
*/
|
||||||
|
public class FlinkCDC02_SQL {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
|
//TODO 1.基本环境准备
|
||||||
|
//1.1 流处理环境
|
||||||
|
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
|
||||||
|
|
||||||
|
|
||||||
|
//1.2 表处理环境
|
||||||
|
StreamTableEnvironment tableEnvironment = StreamTableEnvironment.create(env);
|
||||||
|
//1.3 设置并行度
|
||||||
|
env.setParallelism(1);
|
||||||
|
|
||||||
|
//TODO 2.转换动态表
|
||||||
|
tableEnvironment.executeSql("CREATE TABLE user_info (" +
|
||||||
|
" id INT NOT NULL," +
|
||||||
|
" name STRING" +
|
||||||
|
") WITH (" +
|
||||||
|
" 'connector' = 'mysql-cdc'," +
|
||||||
|
" 'hostname' = 'Ding202'," +
|
||||||
|
" 'port' = '3306'," +
|
||||||
|
" 'username' = 'root'," +
|
||||||
|
" 'password' = '123456'," +
|
||||||
|
" 'database-name' = 'rt_gmall_realtime'," +
|
||||||
|
" 'table-name' = 't_user'" +
|
||||||
|
")");
|
||||||
|
|
||||||
|
tableEnvironment.executeSql("select * from user_info").print();
|
||||||
|
|
||||||
|
|
||||||
|
env.execute("Print MySQL Snapshot + Binlog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,131 @@
|
||||||
|
package com.atguigu.gmall.cdc;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.ververica.cdc.connectors.mysql.MySQLSource;
|
||||||
|
import com.alibaba.ververica.cdc.connectors.mysql.table.StartupOptions;
|
||||||
|
import com.alibaba.ververica.cdc.debezium.DebeziumDeserializationSchema;
|
||||||
|
import com.alibaba.ververica.cdc.debezium.StringDebeziumDeserializationSchema;
|
||||||
|
import io.debezium.data.Envelope;
|
||||||
|
import org.apache.flink.api.common.restartstrategy.RestartStrategies;
|
||||||
|
import org.apache.flink.api.common.typeinfo.TypeInformation;
|
||||||
|
import org.apache.flink.runtime.state.filesystem.FsStateBackend;
|
||||||
|
import org.apache.flink.streaming.api.CheckpointingMode;
|
||||||
|
import org.apache.flink.streaming.api.environment.CheckpointConfig;
|
||||||
|
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
|
||||||
|
import org.apache.flink.streaming.api.functions.source.SourceFunction;
|
||||||
|
import org.apache.flink.util.Collector;
|
||||||
|
import org.apache.kafka.connect.data.Field;
|
||||||
|
import org.apache.kafka.connect.data.Struct;
|
||||||
|
import org.apache.kafka.connect.source.SourceRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@BelongsProject: rt-gmall-parent
|
||||||
|
*@BelongsPackage: com.atguigu.gmall.cdc
|
||||||
|
*@Author: markilue
|
||||||
|
*@CreateTime: 2023-05-06 14:26
|
||||||
|
*@Description:
|
||||||
|
* TODO 通过FlinkCDC动态读取Mysql表中的数据 -- DataStreamAPI
|
||||||
|
* 自定义序列化器
|
||||||
|
*@Version: 1.0
|
||||||
|
*/
|
||||||
|
public class FlinkCDC03_CustomSchema {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
|
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
|
||||||
|
|
||||||
|
|
||||||
|
env.setParallelism(1);
|
||||||
|
|
||||||
|
//TODO 2.开启检查点 Flink-CDC将读取binlog的位置信息以状态的方式保存在CK,如果想要做到断点续传,
|
||||||
|
// 需要从Checkpoint或者Savepoint启动程序
|
||||||
|
// //2.1 开启Checkpoint,每隔5秒钟做一次CK ,并指定CK的一致性语义
|
||||||
|
// env.enableCheckpointing(5000L, CheckpointingMode.EXACTLY_ONCE);
|
||||||
|
// //2.2 设置超时时间为1分钟
|
||||||
|
// env.getCheckpointConfig().setCheckpointTimeout(60000);
|
||||||
|
// //2.3 指定从CK自动重启策略
|
||||||
|
// env.setRestartStrategy(RestartStrategies.fixedDelayRestart(2,2000L));
|
||||||
|
// //2.4 设置任务关闭的时候保留最后一次CK数据
|
||||||
|
// env.getCheckpointConfig().enableExternalizedCheckpoints(CheckpointConfig.ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION);
|
||||||
|
// //2.5 设置状态后端
|
||||||
|
// env.setStateBackend(new FsStateBackend("hdfs://Ding202:8020/flinkCDC"));
|
||||||
|
// //2.6 设置访问HDFS的用户名
|
||||||
|
// System.setProperty("HADOOP_USER_NAME", "dingjiawen");
|
||||||
|
|
||||||
|
|
||||||
|
SourceFunction<String> mySqlSource = MySQLSource.<String>builder()
|
||||||
|
.hostname("Ding202")
|
||||||
|
.port(3306)
|
||||||
|
.databaseList("rt_gmall_realtime") // set captured database
|
||||||
|
.tableList("rt_gmall_realtime.t_user") // set captured table
|
||||||
|
.username("root")
|
||||||
|
.password("123456")
|
||||||
|
.startupOptions(StartupOptions.initial())
|
||||||
|
.deserializer(new MySchema()) // converts SourceRecord to JSON String
|
||||||
|
.build();
|
||||||
|
|
||||||
|
env.addSource(mySqlSource)
|
||||||
|
.print();
|
||||||
|
|
||||||
|
|
||||||
|
env.execute("Print MySQL Snapshot + Binlog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义反序列化方式:希望把它转换为一个json字符串,信息简洁一点
|
||||||
|
*/
|
||||||
|
class MySchema implements DebeziumDeserializationSchema<String> {
|
||||||
|
|
||||||
|
/*
|
||||||
|
//flink cdc对象
|
||||||
|
value=Struct{
|
||||||
|
after=Struct{
|
||||||
|
id=1,
|
||||||
|
name=ssss
|
||||||
|
},
|
||||||
|
source=Struct{
|
||||||
|
db=rt_gmall_realtime,
|
||||||
|
table=t_user
|
||||||
|
}
|
||||||
|
op=c
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deserialize(SourceRecord sourceRecord, Collector collector) throws Exception {
|
||||||
|
Struct valueStruct = (Struct) sourceRecord.value();//要用kafka的Struct,因为本质上使用的是Debezium,Debezium使用了kafka的struct
|
||||||
|
Struct source = valueStruct.getStruct("source");
|
||||||
|
|
||||||
|
String database = source.getString("db");
|
||||||
|
String table = source.getString("table");
|
||||||
|
//类型
|
||||||
|
String type = Envelope.operationFor(sourceRecord).toString().toLowerCase();//内部通过枚举类,将op转为对应的string
|
||||||
|
if (type.equals("create")) {
|
||||||
|
type = "insert";
|
||||||
|
}
|
||||||
|
//获取影响的数据data
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("database", database);
|
||||||
|
jsonObject.put("table", table);
|
||||||
|
jsonObject.put("type", type);
|
||||||
|
JSONObject dataObject = new JSONObject();
|
||||||
|
Struct after = valueStruct.getStruct("after");
|
||||||
|
if(after!=null){
|
||||||
|
for (Field field : after.schema().fields()) {
|
||||||
|
String fieldName = field.name();
|
||||||
|
Object fieldValue = after.get(field);
|
||||||
|
dataObject.put(fieldName, fieldValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jsonObject.put("data",dataObject);
|
||||||
|
collector.collect(jsonObject.toJSONString());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypeInformation<String> getProducedType() {
|
||||||
|
return TypeInformation.of(String.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
BIN
Big_data_example/rt-gmall-parent/gmall-logger/.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
BIN
Big_data_example/rt-gmall-parent/gmall-logger/.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
Binary file not shown.
2
Big_data_example/rt-gmall-parent/gmall-logger/.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
2
Big_data_example/rt-gmall-parent/gmall-logger/.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
|
||||||
|
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
|
||||||
|
|
@ -0,0 +1,316 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Maven Start Up Batch script
|
||||||
|
#
|
||||||
|
# Required ENV vars:
|
||||||
|
# ------------------
|
||||||
|
# JAVA_HOME - location of a JDK home dir
|
||||||
|
#
|
||||||
|
# Optional ENV vars
|
||||||
|
# -----------------
|
||||||
|
# M2_HOME - location of maven2's installed home dir
|
||||||
|
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
# e.g. to debug Maven itself, use
|
||||||
|
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||||
|
|
||||||
|
if [ -f /usr/local/etc/mavenrc ] ; then
|
||||||
|
. /usr/local/etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/mavenrc ] ; then
|
||||||
|
. /etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$HOME/.mavenrc" ] ; then
|
||||||
|
. "$HOME/.mavenrc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false;
|
||||||
|
darwin=false;
|
||||||
|
mingw=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*) cygwin=true ;;
|
||||||
|
MINGW*) mingw=true;;
|
||||||
|
Darwin*) darwin=true
|
||||||
|
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||||
|
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
if [ -x "/usr/libexec/java_home" ]; then
|
||||||
|
export JAVA_HOME="`/usr/libexec/java_home`"
|
||||||
|
else
|
||||||
|
export JAVA_HOME="/Library/Java/Home"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
if [ -r /etc/gentoo-release ] ; then
|
||||||
|
JAVA_HOME=`java-config --jre-home`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$M2_HOME" ] ; then
|
||||||
|
## resolve links - $0 may be a link to maven's home
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
# need this for relative symlinks
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG="`dirname "$PRG"`/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
saveddir=`pwd`
|
||||||
|
|
||||||
|
M2_HOME=`dirname "$PRG"`/..
|
||||||
|
|
||||||
|
# make it fully qualified
|
||||||
|
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||||
|
|
||||||
|
cd "$saveddir"
|
||||||
|
# echo Using m2 at $M2_HOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Mingw, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $mingw ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
javaExecutable="`which javac`"
|
||||||
|
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||||
|
# readlink(1) is not available as standard on Solaris 10.
|
||||||
|
readLink=`which readlink`
|
||||||
|
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||||
|
if $darwin ; then
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||||
|
else
|
||||||
|
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||||
|
fi
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||||
|
JAVA_HOME="$javaHome"
|
||||||
|
export JAVA_HOME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVACMD" ] ; then
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="`\\unset -f command; \\command -v java`"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||||
|
echo " We cannot execute $JAVACMD" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
echo "Warning: JAVA_HOME environment variable is not set."
|
||||||
|
fi
|
||||||
|
|
||||||
|
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||||
|
|
||||||
|
# traverses directory structure from process work directory to filesystem root
|
||||||
|
# first directory with .mvn subdirectory is considered project base directory
|
||||||
|
find_maven_basedir() {
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
echo "Path not specified to find_maven_basedir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
basedir="$1"
|
||||||
|
wdir="$1"
|
||||||
|
while [ "$wdir" != '/' ] ; do
|
||||||
|
if [ -d "$wdir"/.mvn ] ; then
|
||||||
|
basedir=$wdir
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||||
|
if [ -d "${wdir}" ]; then
|
||||||
|
wdir=`cd "$wdir/.."; pwd`
|
||||||
|
fi
|
||||||
|
# end of workaround
|
||||||
|
done
|
||||||
|
echo "${basedir}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# concatenates all lines of a file
|
||||||
|
concat_lines() {
|
||||||
|
if [ -f "$1" ]; then
|
||||||
|
echo "$(tr -s '\n' ' ' < "$1")"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
BASE_DIR=`find_maven_basedir "$(pwd)"`
|
||||||
|
if [ -z "$BASE_DIR" ]; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
##########################################################################################
|
||||||
|
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found .mvn/wrapper/maven-wrapper.jar"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
|
||||||
|
fi
|
||||||
|
if [ -n "$MVNW_REPOURL" ]; then
|
||||||
|
jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
else
|
||||||
|
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
fi
|
||||||
|
while IFS="=" read key value; do
|
||||||
|
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
|
||||||
|
esac
|
||||||
|
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Downloading from: $jarUrl"
|
||||||
|
fi
|
||||||
|
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
|
||||||
|
if $cygwin; then
|
||||||
|
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v wget > /dev/null; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found wget ... using wget"
|
||||||
|
fi
|
||||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||||
|
wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||||
|
else
|
||||||
|
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||||
|
fi
|
||||||
|
elif command -v curl > /dev/null; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found curl ... using curl"
|
||||||
|
fi
|
||||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||||
|
curl -o "$wrapperJarPath" "$jarUrl" -f
|
||||||
|
else
|
||||||
|
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Falling back to using Java to download"
|
||||||
|
fi
|
||||||
|
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
|
||||||
|
# For Cygwin, switch paths to Windows format before running javac
|
||||||
|
if $cygwin; then
|
||||||
|
javaClass=`cygpath --path --windows "$javaClass"`
|
||||||
|
fi
|
||||||
|
if [ -e "$javaClass" ]; then
|
||||||
|
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo " - Compiling MavenWrapperDownloader.java ..."
|
||||||
|
fi
|
||||||
|
# Compiling the Java class
|
||||||
|
("$JAVA_HOME/bin/javac" "$javaClass")
|
||||||
|
fi
|
||||||
|
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||||
|
# Running the downloader
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo " - Running MavenWrapperDownloader.java ..."
|
||||||
|
fi
|
||||||
|
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
##########################################################################################
|
||||||
|
# End of extension
|
||||||
|
##########################################################################################
|
||||||
|
|
||||||
|
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo $MAVEN_PROJECTBASEDIR
|
||||||
|
fi
|
||||||
|
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||||
|
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||||
|
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
# work with both Windows and non-Windows executions.
|
||||||
|
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
|
||||||
|
export MAVEN_CMD_LINE_ARGS
|
||||||
|
|
||||||
|
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
exec "$JAVACMD" \
|
||||||
|
$MAVEN_OPTS \
|
||||||
|
$MAVEN_DEBUG_OPTS \
|
||||||
|
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||||
|
"-Dmaven.home=${M2_HOME}" \
|
||||||
|
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||||
|
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
||||||
|
|
@ -0,0 +1,188 @@
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
@REM or more contributor license agreements. See the NOTICE file
|
||||||
|
@REM distributed with this work for additional information
|
||||||
|
@REM regarding copyright ownership. The ASF licenses this file
|
||||||
|
@REM to you under the Apache License, Version 2.0 (the
|
||||||
|
@REM "License"); you may not use this file except in compliance
|
||||||
|
@REM with the License. You may obtain a copy of the License at
|
||||||
|
@REM
|
||||||
|
@REM https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@REM
|
||||||
|
@REM Unless required by applicable law or agreed to in writing,
|
||||||
|
@REM software distributed under the License is distributed on an
|
||||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
@REM KIND, either express or implied. See the License for the
|
||||||
|
@REM specific language governing permissions and limitations
|
||||||
|
@REM under the License.
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Maven Start Up Batch script
|
||||||
|
@REM
|
||||||
|
@REM Required ENV vars:
|
||||||
|
@REM JAVA_HOME - location of a JDK home dir
|
||||||
|
@REM
|
||||||
|
@REM Optional ENV vars
|
||||||
|
@REM M2_HOME - location of maven2's installed home dir
|
||||||
|
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||||
|
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
|
||||||
|
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
@REM e.g. to debug Maven itself, use
|
||||||
|
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||||
|
@echo off
|
||||||
|
@REM set title of command window
|
||||||
|
title %0
|
||||||
|
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
|
||||||
|
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||||
|
|
||||||
|
@REM set %HOME% to equivalent of $HOME
|
||||||
|
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||||
|
|
||||||
|
@REM Execute a user defined script before this one
|
||||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||||
|
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
|
||||||
|
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
|
||||||
|
:skipRcPre
|
||||||
|
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
set ERROR_CODE=0
|
||||||
|
|
||||||
|
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
@REM ==== START VALIDATION ====
|
||||||
|
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME not found in your environment. >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:OkJHome
|
||||||
|
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||||
|
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
@REM ==== END VALIDATION ====
|
||||||
|
|
||||||
|
:init
|
||||||
|
|
||||||
|
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||||
|
@REM Fallback to current working directory if not found.
|
||||||
|
|
||||||
|
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||||
|
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||||
|
|
||||||
|
set EXEC_DIR=%CD%
|
||||||
|
set WDIR=%EXEC_DIR%
|
||||||
|
:findBaseDir
|
||||||
|
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||||
|
cd ..
|
||||||
|
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||||
|
set WDIR=%CD%
|
||||||
|
goto findBaseDir
|
||||||
|
|
||||||
|
:baseDirFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
goto endDetectBaseDir
|
||||||
|
|
||||||
|
:baseDirNotFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
|
||||||
|
:endDetectBaseDir
|
||||||
|
|
||||||
|
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||||
|
|
||||||
|
@setlocal EnableExtensions EnableDelayedExpansion
|
||||||
|
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||||
|
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||||
|
|
||||||
|
:endReadAdditionalConfig
|
||||||
|
|
||||||
|
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||||
|
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||||
|
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
|
||||||
|
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
||||||
|
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
|
||||||
|
)
|
||||||
|
|
||||||
|
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
if exist %WRAPPER_JAR% (
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Found %WRAPPER_JAR%
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
if not "%MVNW_REPOURL%" == "" (
|
||||||
|
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
)
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
||||||
|
echo Downloading from: %DOWNLOAD_URL%
|
||||||
|
)
|
||||||
|
|
||||||
|
powershell -Command "&{"^
|
||||||
|
"$webclient = new-object System.Net.WebClient;"^
|
||||||
|
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
|
||||||
|
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
|
||||||
|
"}"^
|
||||||
|
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
|
||||||
|
"}"
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Finished downloading %WRAPPER_JAR%
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@REM End of extension
|
||||||
|
|
||||||
|
@REM Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
@REM work with both Windows and non-Windows executions.
|
||||||
|
set MAVEN_CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
%MAVEN_JAVA_EXE% ^
|
||||||
|
%JVM_CONFIG_MAVEN_PROPS% ^
|
||||||
|
%MAVEN_OPTS% ^
|
||||||
|
%MAVEN_DEBUG_OPTS% ^
|
||||||
|
-classpath %WRAPPER_JAR% ^
|
||||||
|
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
|
||||||
|
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||||
|
if ERRORLEVEL 1 goto error
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:error
|
||||||
|
set ERROR_CODE=1
|
||||||
|
|
||||||
|
:end
|
||||||
|
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||||
|
|
||||||
|
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
|
||||||
|
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
|
||||||
|
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
|
||||||
|
:skipRcPost
|
||||||
|
|
||||||
|
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||||
|
if "%MAVEN_BATCH_PAUSE%"=="on" pause
|
||||||
|
|
||||||
|
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
|
||||||
|
|
||||||
|
cmd /C exit /B %ERROR_CODE%
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>2.6.8</version>
|
||||||
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
|
</parent>
|
||||||
|
<groupId>com.atguigu.rtgmall</groupId>
|
||||||
|
<artifactId>gmall-logger</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<name>gmall-logger</name>
|
||||||
|
<description>Demo project for Spring Boot</description>
|
||||||
|
<properties>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.kafka</groupId>
|
||||||
|
<artifactId>spring-kafka</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.kafka</groupId>
|
||||||
|
<artifactId>spring-kafka-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<!--加上这个之后才可以打包-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</exclude>
|
||||||
|
</excludes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.atguigu.rtgmall;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
public class GmallLoggerApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(GmallLoggerApplication.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
{"common":{"ar":"420000","ba":"Huawei","ch":"huawei","is_new":"1","md":"Huawei P30","mid":"mid_6","os":"Android 11.0","uid":"21","vc":"v2.1.134"},"start":{"entry":"icon","loading_time":2116,"open_ad_id":4,"open_ad_ms":3162,"open_ad_skip_ms":0},"ts":1655279132000}
|
||||||
|
{"common":{"ar":"420000","ba":"Huawei","ch":"huawei","is_new":"1","md":"Huawei P30","mid":"mid_6","os":"Android 11.0","uid":"21","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"1","item_type":"activity_id","order":1,"pos_id":4},{"display_type":"query","item":"2","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"query","item":"4","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"query","item":"6","item_type":"sku_id","order":4,"pos_id":5},{"display_type":"query","item":"8","item_type":"sku_id","order":5,"pos_id":3},{"display_type":"promotion","item":"2","item_type":"sku_id","order":6,"pos_id":5},{"display_type":"query","item":"5","item_type":"sku_id","order":7,"pos_id":3},{"display_type":"query","item":"7","item_type":"sku_id","order":8,"pos_id":3},{"display_type":"query","item":"9","item_type":"sku_id","order":9,"pos_id":5},{"display_type":"query","item":"5","item_type":"sku_id","order":10,"pos_id":4}],"page":{"during_time":9542,"page_id":"home"},"ts":1655279132000}
|
||||||
|
{"actions":[{"action_id":"get_coupon","item":"1","item_type":"coupon_id","ts":1655279136319}],"common":{"ar":"420000","ba":"Huawei","ch":"huawei","is_new":"1","md":"Huawei P30","mid":"mid_6","os":"Android 11.0","uid":"21","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"5","item_type":"sku_id","order":1,"pos_id":4},{"display_type":"promotion","item":"2","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"promotion","item":"9","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"promotion","item":"9","item_type":"sku_id","order":4,"pos_id":2},{"display_type":"promotion","item":"2","item_type":"sku_id","order":5,"pos_id":3},{"display_type":"query","item":"4","item_type":"sku_id","order":6,"pos_id":2},{"display_type":"query","item":"9","item_type":"sku_id","order":7,"pos_id":5},{"display_type":"query","item":"3","item_type":"sku_id","order":8,"pos_id":2},{"display_type":"query","item":"1","item_type":"sku_id","order":9,"pos_id":1}],"page":{"during_time":8638,"item":"3","item_type":"sku_id","last_page_id":"home","page_id":"good_detail","source_type":"query"},"ts":1655279132000}
|
||||||
|
{"common":{"ar":"310000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone 8","mid":"mid_12","os":"iOS 13.3.1","uid":"35","vc":"v2.1.132"},"start":{"entry":"icon","loading_time":18029,"open_ad_id":20,"open_ad_ms":8125,"open_ad_skip_ms":0},"ts":1655279134000}
|
||||||
|
{"common":{"ar":"310000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone 8","mid":"mid_12","os":"iOS 13.3.1","uid":"35","vc":"v2.1.132"},"displays":[{"display_type":"activity","item":"2","item_type":"activity_id","order":1,"pos_id":4},{"display_type":"promotion","item":"9","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"query","item":"8","item_type":"sku_id","order":3,"pos_id":5},{"display_type":"query","item":"5","item_type":"sku_id","order":4,"pos_id":4},{"display_type":"query","item":"3","item_type":"sku_id","order":5,"pos_id":2},{"display_type":"promotion","item":"2","item_type":"sku_id","order":6,"pos_id":3},{"display_type":"query","item":"2","item_type":"sku_id","order":7,"pos_id":5},{"display_type":"query","item":"10","item_type":"sku_id","order":8,"pos_id":1},{"display_type":"query","item":"7","item_type":"sku_id","order":9,"pos_id":3}],"page":{"during_time":11196,"page_id":"home"},"ts":1655279134000}
|
||||||
|
{"actions":[{"action_id":"cart_add","item":"7","item_type":"sku_id","ts":1655279135904}],"common":{"ar":"310000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone 8","mid":"mid_12","os":"iOS 13.3.1","uid":"35","vc":"v2.1.132"},"displays":[{"display_type":"query","item":"1","item_type":"sku_id","order":1,"pos_id":2},{"display_type":"promotion","item":"8","item_type":"sku_id","order":2,"pos_id":3},{"display_type":"query","item":"2","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"query","item":"6","item_type":"sku_id","order":4,"pos_id":2},{"display_type":"query","item":"7","item_type":"sku_id","order":5,"pos_id":2},{"display_type":"query","item":"2","item_type":"sku_id","order":6,"pos_id":1},{"display_type":"query","item":"6","item_type":"sku_id","order":7,"pos_id":2},{"display_type":"query","item":"8","item_type":"sku_id","order":8,"pos_id":1},{"display_type":"promotion","item":"10","item_type":"sku_id","order":9,"pos_id":4}],"page":{"during_time":3809,"item":"7","item_type":"sku_id","last_page_id":"home","page_id":"good_detail","source_type":"promotion"},"ts":1655279134000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"web","is_new":"1","md":"Xiaomi Mix2 ","mid":"mid_10","os":"Android 11.0","uid":"18","vc":"v2.1.132"},"start":{"entry":"notice","loading_time":9350,"open_ad_id":13,"open_ad_ms":5748,"open_ad_skip_ms":4498},"ts":1655279134000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"web","is_new":"1","md":"Xiaomi Mix2 ","mid":"mid_10","os":"Android 11.0","uid":"18","vc":"v2.1.132"},"displays":[{"display_type":"activity","item":"1","item_type":"activity_id","order":1,"pos_id":5},{"display_type":"recommend","item":"4","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"query","item":"7","item_type":"sku_id","order":3,"pos_id":5},{"display_type":"query","item":"9","item_type":"sku_id","order":4,"pos_id":3},{"display_type":"query","item":"6","item_type":"sku_id","order":5,"pos_id":2},{"display_type":"query","item":"1","item_type":"sku_id","order":6,"pos_id":5},{"display_type":"query","item":"5","item_type":"sku_id","order":7,"pos_id":2},{"display_type":"query","item":"10","item_type":"sku_id","order":8,"pos_id":3},{"display_type":"promotion","item":"9","item_type":"sku_id","order":9,"pos_id":1},{"display_type":"query","item":"7","item_type":"sku_id","order":10,"pos_id":5},{"display_type":"query","item":"9","item_type":"sku_id","order":11,"pos_id":3}],"page":{"during_time":17565,"page_id":"home"},"ts":1655279134000}
|
||||||
|
{"common":{"ar":"310000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"42","vc":"v2.1.134"},"start":{"entry":"icon","loading_time":14187,"open_ad_id":14,"open_ad_ms":3161,"open_ad_skip_ms":0},"ts":1655279135000}
|
||||||
|
{"common":{"ar":"310000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"42","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"2","item_type":"activity_id","order":1,"pos_id":2},{"display_type":"activity","item":"2","item_type":"activity_id","order":2,"pos_id":2},{"display_type":"query","item":"9","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"promotion","item":"9","item_type":"sku_id","order":4,"pos_id":2},{"display_type":"query","item":"8","item_type":"sku_id","order":5,"pos_id":1},{"display_type":"query","item":"10","item_type":"sku_id","order":6,"pos_id":4},{"display_type":"promotion","item":"3","item_type":"sku_id","order":7,"pos_id":1},{"display_type":"query","item":"3","item_type":"sku_id","order":8,"pos_id":1},{"display_type":"query","item":"7","item_type":"sku_id","order":9,"pos_id":4},{"display_type":"query","item":"2","item_type":"sku_id","order":10,"pos_id":3}],"page":{"during_time":8255,"page_id":"home"},"ts":1655279135000}
|
||||||
|
{"common":{"ar":"310000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"42","vc":"v2.1.134"},"page":{"during_time":4119,"last_page_id":"home","page_id":"search"},"ts":1655279135000}
|
||||||
|
{"common":{"ar":"310000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"42","vc":"v2.1.134"},"displays":[{"display_type":"promotion","item":"3","item_type":"sku_id","order":1,"pos_id":5},{"display_type":"query","item":"5","item_type":"sku_id","order":2,"pos_id":3},{"display_type":"promotion","item":"1","item_type":"sku_id","order":3,"pos_id":4},{"display_type":"query","item":"9","item_type":"sku_id","order":4,"pos_id":2},{"display_type":"query","item":"9","item_type":"sku_id","order":5,"pos_id":2},{"display_type":"query","item":"10","item_type":"sku_id","order":6,"pos_id":1},{"display_type":"recommend","item":"5","item_type":"sku_id","order":7,"pos_id":4},{"display_type":"query","item":"1","item_type":"sku_id","order":8,"pos_id":3},{"display_type":"query","item":"5","item_type":"sku_id","order":9,"pos_id":4}],"page":{"during_time":10562,"item":"图书","item_type":"keyword","last_page_id":"search","page_id":"good_list"},"ts":1655279135000}
|
||||||
|
{"actions":[{"action_id":"get_coupon","item":"2","item_type":"coupon_id","ts":1655279143500}],"common":{"ar":"310000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"42","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"10","item_type":"sku_id","order":1,"pos_id":1},{"display_type":"promotion","item":"7","item_type":"sku_id","order":2,"pos_id":2},{"display_type":"query","item":"5","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"query","item":"9","item_type":"sku_id","order":4,"pos_id":3},{"display_type":"recommend","item":"8","item_type":"sku_id","order":5,"pos_id":2},{"display_type":"promotion","item":"2","item_type":"sku_id","order":6,"pos_id":4}],"page":{"during_time":17001,"item":"8","item_type":"sku_id","last_page_id":"good_list","page_id":"good_detail","source_type":"query"},"ts":1655279135000}
|
||||||
|
{"common":{"ar":"310000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"42","vc":"v2.1.134"},"page":{"during_time":5954,"last_page_id":"good_detail","page_id":"login"},"ts":1655279135000}
|
||||||
|
{"actions":[{"action_id":"get_coupon","item":"1","item_type":"coupon_id","ts":1655279135616}],"common":{"ar":"310000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"42","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"6","item_type":"sku_id","order":1,"pos_id":5},{"display_type":"promotion","item":"2","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"recommend","item":"4","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"recommend","item":"7","item_type":"sku_id","order":4,"pos_id":4},{"display_type":"query","item":"10","item_type":"sku_id","order":5,"pos_id":4},{"display_type":"recommend","item":"6","item_type":"sku_id","order":6,"pos_id":5}],"page":{"during_time":1232,"item":"8","item_type":"sku_id","last_page_id":"login","page_id":"good_detail","source_type":"query"},"ts":1655279135000}
|
||||||
|
{"actions":[{"action_id":"cart_minus_num","item":"6","item_type":"sku_id","ts":1655279144814}],"common":{"ar":"310000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"42","vc":"v2.1.134"},"page":{"during_time":19629,"last_page_id":"good_detail","page_id":"cart"},"ts":1655279135000}
|
||||||
|
{"common":{"ar":"310000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"42","vc":"v2.1.134"},"page":{"during_time":7666,"item":"2,6","item_type":"sku_ids","last_page_id":"cart","page_id":"trade"},"ts":1655279135000}
|
||||||
|
{"common":{"ar":"310000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"42","vc":"v2.1.134"},"page":{"during_time":3828,"item":"3,6,8","item_type":"sku_ids","last_page_id":"trade","page_id":"payment"},"ts":1655279135000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_20","os":"iOS 13.3.1","uid":"38","vc":"v2.1.134"},"start":{"entry":"icon","loading_time":3586,"open_ad_id":1,"open_ad_ms":3511,"open_ad_skip_ms":0},"ts":1655279136000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_20","os":"iOS 13.3.1","uid":"38","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"2","item_type":"activity_id","order":1,"pos_id":4},{"display_type":"query","item":"7","item_type":"sku_id","order":2,"pos_id":2},{"display_type":"query","item":"1","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"recommend","item":"10","item_type":"sku_id","order":4,"pos_id":3},{"display_type":"query","item":"7","item_type":"sku_id","order":5,"pos_id":1},{"display_type":"query","item":"1","item_type":"sku_id","order":6,"pos_id":1},{"display_type":"query","item":"2","item_type":"sku_id","order":7,"pos_id":2},{"display_type":"query","item":"5","item_type":"sku_id","order":8,"pos_id":1},{"display_type":"query","item":"2","item_type":"sku_id","order":9,"pos_id":3}],"page":{"during_time":12076,"page_id":"home"},"ts":1655279136000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_20","os":"iOS 13.3.1","uid":"38","vc":"v2.1.134"},"page":{"during_time":7600,"last_page_id":"home","page_id":"search"},"ts":1655279136000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_20","os":"iOS 13.3.1","uid":"38","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"1","item_type":"sku_id","order":1,"pos_id":3},{"display_type":"promotion","item":"2","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"promotion","item":"10","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"promotion","item":"4","item_type":"sku_id","order":4,"pos_id":5}],"page":{"during_time":19058,"item":"小米盒子","item_type":"keyword","last_page_id":"search","page_id":"good_list"},"ts":1655279136000}
|
||||||
|
{"actions":[{"action_id":"favor_add","item":"5","item_type":"sku_id","ts":1655279139470},{"action_id":"get_coupon","item":"1","item_type":"coupon_id","ts":1655279142940}],"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_20","os":"iOS 13.3.1","uid":"38","vc":"v2.1.134"},"displays":[{"display_type":"promotion","item":"7","item_type":"sku_id","order":1,"pos_id":5},{"display_type":"query","item":"10","item_type":"sku_id","order":2,"pos_id":2},{"display_type":"recommend","item":"7","item_type":"sku_id","order":3,"pos_id":2},{"display_type":"query","item":"5","item_type":"sku_id","order":4,"pos_id":1}],"page":{"during_time":10411,"item":"5","item_type":"sku_id","last_page_id":"good_list","page_id":"good_detail","source_type":"promotion"},"ts":1655279136000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_20","os":"iOS 13.3.1","uid":"38","vc":"v2.1.134"},"page":{"during_time":2665,"last_page_id":"good_detail","page_id":"login"},"ts":1655279136000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_20","os":"iOS 13.3.1","uid":"38","vc":"v2.1.134"},"displays":[{"display_type":"promotion","item":"10","item_type":"sku_id","order":1,"pos_id":5},{"display_type":"query","item":"6","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"promotion","item":"10","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"query","item":"1","item_type":"sku_id","order":4,"pos_id":2},{"display_type":"query","item":"7","item_type":"sku_id","order":5,"pos_id":1},{"display_type":"query","item":"7","item_type":"sku_id","order":6,"pos_id":5},{"display_type":"query","item":"8","item_type":"sku_id","order":7,"pos_id":5}],"page":{"during_time":14956,"item":"5","item_type":"sku_id","last_page_id":"login","page_id":"good_detail","source_type":"recommend"},"ts":1655279136000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_20","os":"iOS 13.3.1","uid":"38","vc":"v2.1.134"},"page":{"during_time":13085,"last_page_id":"good_detail","page_id":"cart"},"ts":1655279136000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_20","os":"iOS 13.3.1","uid":"38","vc":"v2.1.134"},"page":{"during_time":2924,"item":"10","item_type":"sku_ids","last_page_id":"cart","page_id":"trade"},"ts":1655279136000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_20","os":"iOS 13.3.1","uid":"38","vc":"v2.1.134"},"page":{"during_time":5939,"item":"7","item_type":"sku_ids","last_page_id":"trade","page_id":"payment"},"ts":1655279136000}
|
||||||
|
{"common":{"ar":"310000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone X","mid":"mid_11","os":"iOS 13.3.1","uid":"40","vc":"v2.1.134"},"start":{"entry":"icon","loading_time":19763,"open_ad_id":9,"open_ad_ms":8038,"open_ad_skip_ms":5987},"ts":1655279137000}
|
||||||
|
{"common":{"ar":"310000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone X","mid":"mid_11","os":"iOS 13.3.1","uid":"40","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"1","item_type":"activity_id","order":1,"pos_id":4},{"display_type":"activity","item":"2","item_type":"activity_id","order":2,"pos_id":4},{"display_type":"query","item":"1","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"recommend","item":"2","item_type":"sku_id","order":4,"pos_id":2},{"display_type":"query","item":"10","item_type":"sku_id","order":5,"pos_id":1},{"display_type":"query","item":"4","item_type":"sku_id","order":6,"pos_id":2}],"page":{"during_time":3624,"page_id":"home"},"ts":1655279137000}
|
||||||
|
{"actions":[{"action_id":"get_coupon","item":"1","item_type":"coupon_id","ts":1655279145089}],"common":{"ar":"310000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone X","mid":"mid_11","os":"iOS 13.3.1","uid":"40","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"7","item_type":"sku_id","order":1,"pos_id":5},{"display_type":"promotion","item":"9","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"query","item":"2","item_type":"sku_id","order":3,"pos_id":2},{"display_type":"query","item":"8","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"query","item":"6","item_type":"sku_id","order":5,"pos_id":4}],"page":{"during_time":16179,"item":"7","item_type":"sku_id","last_page_id":"home","page_id":"good_detail","source_type":"recommend"},"ts":1655279137000}
|
||||||
|
{"common":{"ar":"230000","ba":"Huawei","ch":"360","is_new":"0","md":"Huawei P30","mid":"mid_16","os":"Android 11.0","uid":"45","vc":"v2.1.134"},"start":{"entry":"icon","loading_time":9088,"open_ad_id":18,"open_ad_ms":9437,"open_ad_skip_ms":0},"ts":1655279137000}
|
||||||
|
{"common":{"ar":"230000","ba":"Huawei","ch":"360","is_new":"0","md":"Huawei P30","mid":"mid_16","os":"Android 11.0","uid":"45","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"1","item_type":"activity_id","order":1,"pos_id":3},{"display_type":"promotion","item":"9","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"promotion","item":"7","item_type":"sku_id","order":3,"pos_id":4},{"display_type":"promotion","item":"5","item_type":"sku_id","order":4,"pos_id":2},{"display_type":"query","item":"10","item_type":"sku_id","order":5,"pos_id":4}],"page":{"during_time":15488,"page_id":"home"},"ts":1655279137000}
|
||||||
|
{"common":{"ar":"230000","ba":"Huawei","ch":"360","is_new":"0","md":"Huawei P30","mid":"mid_16","os":"Android 11.0","uid":"45","vc":"v2.1.134"},"page":{"during_time":7551,"last_page_id":"home","page_id":"search"},"ts":1655279137000}
|
||||||
|
{"common":{"ar":"230000","ba":"Huawei","ch":"360","is_new":"0","md":"Huawei P30","mid":"mid_16","os":"Android 11.0","uid":"45","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"3","item_type":"sku_id","order":1,"pos_id":4},{"display_type":"query","item":"5","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"query","item":"1","item_type":"sku_id","order":3,"pos_id":5},{"display_type":"promotion","item":"7","item_type":"sku_id","order":4,"pos_id":5},{"display_type":"query","item":"6","item_type":"sku_id","order":5,"pos_id":1},{"display_type":"query","item":"1","item_type":"sku_id","order":6,"pos_id":5},{"display_type":"promotion","item":"3","item_type":"sku_id","order":7,"pos_id":4},{"display_type":"query","item":"10","item_type":"sku_id","order":8,"pos_id":2},{"display_type":"recommend","item":"2","item_type":"sku_id","order":9,"pos_id":5},{"display_type":"promotion","item":"7","item_type":"sku_id","order":10,"pos_id":5}],"page":{"during_time":18119,"item":"小米盒子","item_type":"keyword","last_page_id":"search","page_id":"good_list"},"ts":1655279137000}
|
||||||
|
{"actions":[{"action_id":"favor_add","item":"10","item_type":"sku_id","ts":1655279142854},{"action_id":"get_coupon","item":"2","item_type":"coupon_id","ts":1655279148708}],"common":{"ar":"230000","ba":"Huawei","ch":"360","is_new":"0","md":"Huawei P30","mid":"mid_16","os":"Android 11.0","uid":"45","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"9","item_type":"sku_id","order":1,"pos_id":2},{"display_type":"query","item":"8","item_type":"sku_id","order":2,"pos_id":3},{"display_type":"query","item":"10","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"query","item":"6","item_type":"sku_id","order":4,"pos_id":2}],"page":{"during_time":17562,"item":"10","item_type":"sku_id","last_page_id":"good_list","page_id":"good_detail","source_type":"recommend"},"ts":1655279137000}
|
||||||
|
{"common":{"ar":"230000","ba":"Huawei","ch":"360","is_new":"0","md":"Huawei P30","mid":"mid_16","os":"Android 11.0","uid":"45","vc":"v2.1.134"},"page":{"during_time":15834,"last_page_id":"good_detail","page_id":"login"},"ts":1655279137000}
|
||||||
|
{"actions":[{"action_id":"favor_add","item":"9","item_type":"sku_id","ts":1655279143423}],"common":{"ar":"230000","ba":"Huawei","ch":"360","is_new":"0","md":"Huawei P30","mid":"mid_16","os":"Android 11.0","uid":"45","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"6","item_type":"sku_id","order":1,"pos_id":5},{"display_type":"query","item":"5","item_type":"sku_id","order":2,"pos_id":2},{"display_type":"query","item":"6","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"query","item":"1","item_type":"sku_id","order":4,"pos_id":4},{"display_type":"promotion","item":"2","item_type":"sku_id","order":5,"pos_id":3},{"display_type":"query","item":"2","item_type":"sku_id","order":6,"pos_id":4},{"display_type":"promotion","item":"4","item_type":"sku_id","order":7,"pos_id":5},{"display_type":"promotion","item":"6","item_type":"sku_id","order":8,"pos_id":5},{"display_type":"promotion","item":"7","item_type":"sku_id","order":9,"pos_id":5},{"display_type":"query","item":"10","item_type":"sku_id","order":10,"pos_id":3}],"page":{"during_time":12847,"item":"9","item_type":"sku_id","last_page_id":"login","page_id":"good_detail","source_type":"promotion"},"ts":1655279137000}
|
||||||
|
{"actions":[{"action_id":"cart_remove","item":"9","item_type":"sku_id","ts":1655279144267}],"common":{"ar":"230000","ba":"Huawei","ch":"360","is_new":"0","md":"Huawei P30","mid":"mid_16","os":"Android 11.0","uid":"45","vc":"v2.1.134"},"page":{"during_time":14534,"last_page_id":"good_detail","page_id":"cart"},"ts":1655279137000}
|
||||||
|
{"common":{"ar":"230000","ba":"Huawei","ch":"360","is_new":"0","md":"Huawei P30","mid":"mid_16","os":"Android 11.0","uid":"45","vc":"v2.1.134"},"page":{"during_time":19066,"item":"7,10","item_type":"sku_ids","last_page_id":"cart","page_id":"trade"},"ts":1655279137000}
|
||||||
|
{"common":{"ar":"230000","ba":"Huawei","ch":"360","is_new":"0","md":"Huawei P30","mid":"mid_16","os":"Android 11.0","uid":"45","vc":"v2.1.134"},"page":{"during_time":17424,"item":"3,7","item_type":"sku_ids","last_page_id":"trade","page_id":"payment"},"ts":1655279137000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"49","vc":"v2.1.132"},"start":{"entry":"icon","loading_time":15593,"open_ad_id":13,"open_ad_ms":5913,"open_ad_skip_ms":0},"ts":1655279138000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"49","vc":"v2.1.132"},"displays":[{"display_type":"activity","item":"2","item_type":"activity_id","order":1,"pos_id":2},{"display_type":"recommend","item":"6","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"query","item":"1","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"recommend","item":"10","item_type":"sku_id","order":4,"pos_id":3},{"display_type":"promotion","item":"7","item_type":"sku_id","order":5,"pos_id":4},{"display_type":"promotion","item":"10","item_type":"sku_id","order":6,"pos_id":1},{"display_type":"query","item":"6","item_type":"sku_id","order":7,"pos_id":2},{"display_type":"promotion","item":"7","item_type":"sku_id","order":8,"pos_id":3},{"display_type":"recommend","item":"7","item_type":"sku_id","order":9,"pos_id":2},{"display_type":"query","item":"4","item_type":"sku_id","order":10,"pos_id":5}],"page":{"during_time":2996,"page_id":"home"},"ts":1655279138000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"49","vc":"v2.1.132"},"err":{"error_code":1473,"msg":" Exception in thread \\ java.net.SocketTimeoutException\\n \\tat com.atgugu.gmall2020.mock.log.bean.AppError.main(AppError.java:xxxxxx)"},"page":{"during_time":5097,"last_page_id":"home","page_id":"mine"},"ts":1655279138000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"49","vc":"v2.1.132"},"page":{"during_time":8882,"last_page_id":"mine","page_id":"orders_unpaid"},"ts":1655279138000}
|
||||||
|
{"actions":[{"action_id":"get_coupon","item":"3","item_type":"coupon_id","ts":1655279146452}],"common":{"ar":"440000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"49","vc":"v2.1.132"},"displays":[{"display_type":"recommend","item":"3","item_type":"sku_id","order":1,"pos_id":3},{"display_type":"query","item":"2","item_type":"sku_id","order":2,"pos_id":1},{"display_type":"query","item":"9","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"recommend","item":"8","item_type":"sku_id","order":4,"pos_id":2},{"display_type":"query","item":"10","item_type":"sku_id","order":5,"pos_id":5},{"display_type":"query","item":"2","item_type":"sku_id","order":6,"pos_id":5},{"display_type":"query","item":"7","item_type":"sku_id","order":7,"pos_id":3},{"display_type":"promotion","item":"1","item_type":"sku_id","order":8,"pos_id":1},{"display_type":"query","item":"2","item_type":"sku_id","order":9,"pos_id":2},{"display_type":"query","item":"6","item_type":"sku_id","order":10,"pos_id":1}],"page":{"during_time":16905,"item":"3","item_type":"sku_id","last_page_id":"orders_unpaid","page_id":"good_detail","source_type":"promotion"},"ts":1655279138000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"49","vc":"v2.1.132"},"displays":[{"display_type":"query","item":"3","item_type":"sku_id","order":1,"pos_id":2},{"display_type":"query","item":"4","item_type":"sku_id","order":2,"pos_id":2},{"display_type":"query","item":"7","item_type":"sku_id","order":3,"pos_id":2},{"display_type":"query","item":"6","item_type":"sku_id","order":4,"pos_id":5},{"display_type":"promotion","item":"5","item_type":"sku_id","order":5,"pos_id":2},{"display_type":"query","item":"5","item_type":"sku_id","order":6,"pos_id":4},{"display_type":"promotion","item":"8","item_type":"sku_id","order":7,"pos_id":1},{"display_type":"query","item":"1","item_type":"sku_id","order":8,"pos_id":2},{"display_type":"promotion","item":"8","item_type":"sku_id","order":9,"pos_id":4},{"display_type":"recommend","item":"10","item_type":"sku_id","order":10,"pos_id":1}],"page":{"during_time":9651,"item":"4","item_type":"sku_id","last_page_id":"good_detail","page_id":"good_spec","source_type":"activity"},"ts":1655279138000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"49","vc":"v2.1.132"},"page":{"during_time":8606,"item":"3","item_type":"sku_id","last_page_id":"good_spec","page_id":"comment","source_type":"activity"},"ts":1655279138000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"49","vc":"v2.1.132"},"page":{"during_time":10147,"item":"1,9","item_type":"sku_ids","last_page_id":"comment","page_id":"trade"},"ts":1655279138000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"xiaomi","is_new":"0","md":"Xiaomi 9","mid":"mid_19","os":"Android 10.0","uid":"49","vc":"v2.1.132"},"page":{"during_time":3322,"item":"1","item_type":"sku_ids","last_page_id":"trade","page_id":"payment"},"ts":1655279138000}
|
||||||
|
{"common":{"ar":"370000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs Max","mid":"mid_2","os":"iOS 13.2.3","uid":"24","vc":"v2.1.134"},"start":{"entry":"notice","loading_time":5388,"open_ad_id":15,"open_ad_ms":9018,"open_ad_skip_ms":8891},"ts":1655279139000}
|
||||||
|
{"common":{"ar":"370000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs Max","mid":"mid_2","os":"iOS 13.2.3","uid":"24","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"1","item_type":"activity_id","order":1,"pos_id":1},{"display_type":"activity","item":"1","item_type":"activity_id","order":2,"pos_id":1},{"display_type":"query","item":"2","item_type":"sku_id","order":3,"pos_id":2},{"display_type":"query","item":"7","item_type":"sku_id","order":4,"pos_id":4},{"display_type":"query","item":"1","item_type":"sku_id","order":5,"pos_id":3},{"display_type":"promotion","item":"6","item_type":"sku_id","order":6,"pos_id":5},{"display_type":"promotion","item":"10","item_type":"sku_id","order":7,"pos_id":4},{"display_type":"recommend","item":"6","item_type":"sku_id","order":8,"pos_id":1},{"display_type":"query","item":"3","item_type":"sku_id","order":9,"pos_id":5},{"display_type":"promotion","item":"4","item_type":"sku_id","order":10,"pos_id":2},{"display_type":"query","item":"8","item_type":"sku_id","order":11,"pos_id":2}],"page":{"during_time":12294,"page_id":"home"},"ts":1655279139000}
|
||||||
|
{"common":{"ar":"370000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs Max","mid":"mid_2","os":"iOS 13.2.3","uid":"24","vc":"v2.1.134"},"page":{"during_time":1484,"last_page_id":"home","page_id":"mine"},"ts":1655279139000}
|
||||||
|
{"common":{"ar":"370000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs Max","mid":"mid_2","os":"iOS 13.2.3","uid":"24","vc":"v2.1.134"},"page":{"during_time":2271,"last_page_id":"mine","page_id":"orders_unpaid"},"ts":1655279139000}
|
||||||
|
{"actions":[{"action_id":"get_coupon","item":"1","item_type":"coupon_id","ts":1655279146468}],"common":{"ar":"370000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs Max","mid":"mid_2","os":"iOS 13.2.3","uid":"24","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"9","item_type":"sku_id","order":1,"pos_id":2},{"display_type":"query","item":"1","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"query","item":"6","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"query","item":"3","item_type":"sku_id","order":4,"pos_id":4},{"display_type":"recommend","item":"10","item_type":"sku_id","order":5,"pos_id":5}],"page":{"during_time":14936,"item":"1","item_type":"sku_id","last_page_id":"orders_unpaid","page_id":"good_detail","source_type":"query"},"ts":1655279139000}
|
||||||
|
{"common":{"ar":"370000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs Max","mid":"mid_2","os":"iOS 13.2.3","uid":"24","vc":"v2.1.134"},"displays":[{"display_type":"promotion","item":"2","item_type":"sku_id","order":1,"pos_id":5},{"display_type":"promotion","item":"5","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"recommend","item":"9","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"promotion","item":"6","item_type":"sku_id","order":4,"pos_id":3}],"page":{"during_time":16768,"item":"1","item_type":"sku_id","last_page_id":"good_detail","page_id":"good_spec","source_type":"query"},"ts":1655279139000}
|
||||||
|
{"common":{"ar":"370000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs Max","mid":"mid_2","os":"iOS 13.2.3","uid":"24","vc":"v2.1.134"},"page":{"during_time":14951,"item":"7","item_type":"sku_id","last_page_id":"good_spec","page_id":"comment","source_type":"query"},"ts":1655279139000}
|
||||||
|
{"common":{"ar":"370000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs Max","mid":"mid_2","os":"iOS 13.2.3","uid":"24","vc":"v2.1.134"},"page":{"during_time":6208,"item":"2,4,7","item_type":"sku_ids","last_page_id":"comment","page_id":"trade"},"ts":1655279139000}
|
||||||
|
{"common":{"ar":"370000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs Max","mid":"mid_2","os":"iOS 13.2.3","uid":"24","vc":"v2.1.134"},"page":{"during_time":7648,"item":"4","item_type":"sku_ids","last_page_id":"trade","page_id":"payment"},"ts":1655279139000}
|
||||||
|
{"common":{"ar":"370000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_10","os":"iOS 13.3.1","uid":"27","vc":"v2.1.134"},"start":{"entry":"icon","loading_time":11717,"open_ad_id":5,"open_ad_ms":2065,"open_ad_skip_ms":1121},"ts":1655279140000}
|
||||||
|
{"common":{"ar":"370000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_10","os":"iOS 13.3.1","uid":"27","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"1","item_type":"activity_id","order":1,"pos_id":5},{"display_type":"activity","item":"1","item_type":"activity_id","order":2,"pos_id":5},{"display_type":"query","item":"5","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"query","item":"3","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"query","item":"3","item_type":"sku_id","order":5,"pos_id":4},{"display_type":"query","item":"1","item_type":"sku_id","order":6,"pos_id":2},{"display_type":"query","item":"3","item_type":"sku_id","order":7,"pos_id":2},{"display_type":"query","item":"8","item_type":"sku_id","order":8,"pos_id":1},{"display_type":"query","item":"7","item_type":"sku_id","order":9,"pos_id":3},{"display_type":"query","item":"6","item_type":"sku_id","order":10,"pos_id":1}],"page":{"during_time":5945,"page_id":"home"},"ts":1655279140000}
|
||||||
|
{"actions":[{"action_id":"favor_add","item":"3","item_type":"sku_id","ts":1655279144864},{"action_id":"get_coupon","item":"2","item_type":"coupon_id","ts":1655279149728}],"common":{"ar":"370000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_10","os":"iOS 13.3.1","uid":"27","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"10","item_type":"sku_id","order":1,"pos_id":4},{"display_type":"query","item":"8","item_type":"sku_id","order":2,"pos_id":3},{"display_type":"query","item":"7","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"promotion","item":"2","item_type":"sku_id","order":4,"pos_id":5},{"display_type":"query","item":"8","item_type":"sku_id","order":5,"pos_id":5},{"display_type":"query","item":"9","item_type":"sku_id","order":6,"pos_id":4},{"display_type":"query","item":"5","item_type":"sku_id","order":7,"pos_id":1}],"page":{"during_time":14594,"item":"3","item_type":"sku_id","last_page_id":"home","page_id":"good_detail","source_type":"query"},"ts":1655279140000}
|
||||||
|
{"common":{"ar":"110000","ba":"Xiaomi","ch":"xiaomi","is_new":"1","md":"Xiaomi 9","mid":"mid_7","os":"Android 11.0","uid":"10","vc":"v2.1.134"},"start":{"entry":"icon","loading_time":13131,"open_ad_id":8,"open_ad_ms":5355,"open_ad_skip_ms":1309},"ts":1655279141000}
|
||||||
|
{"common":{"ar":"110000","ba":"Xiaomi","ch":"xiaomi","is_new":"1","md":"Xiaomi 9","mid":"mid_7","os":"Android 11.0","uid":"10","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"1","item_type":"activity_id","order":1,"pos_id":1},{"display_type":"activity","item":"2","item_type":"activity_id","order":2,"pos_id":1},{"display_type":"query","item":"8","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"promotion","item":"5","item_type":"sku_id","order":4,"pos_id":5},{"display_type":"query","item":"6","item_type":"sku_id","order":5,"pos_id":1},{"display_type":"recommend","item":"3","item_type":"sku_id","order":6,"pos_id":3},{"display_type":"promotion","item":"1","item_type":"sku_id","order":7,"pos_id":1}],"page":{"during_time":17125,"page_id":"home"},"ts":1655279141000}
|
||||||
|
{"common":{"ar":"110000","ba":"Xiaomi","ch":"xiaomi","is_new":"1","md":"Xiaomi 9","mid":"mid_7","os":"Android 11.0","uid":"10","vc":"v2.1.134"},"displays":[{"display_type":"recommend","item":"7","item_type":"sku_id","order":1,"pos_id":1},{"display_type":"promotion","item":"5","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"promotion","item":"6","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"query","item":"9","item_type":"sku_id","order":4,"pos_id":3},{"display_type":"query","item":"5","item_type":"sku_id","order":5,"pos_id":1},{"display_type":"query","item":"3","item_type":"sku_id","order":6,"pos_id":2}],"page":{"during_time":18147,"item":"口红","item_type":"keyword","last_page_id":"home","page_id":"good_list"},"ts":1655279141000}
|
||||||
|
{"actions":[{"action_id":"get_coupon","item":"1","item_type":"coupon_id","ts":1655279142242}],"common":{"ar":"110000","ba":"Xiaomi","ch":"xiaomi","is_new":"1","md":"Xiaomi 9","mid":"mid_7","os":"Android 11.0","uid":"10","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"1","item_type":"sku_id","order":1,"pos_id":3},{"display_type":"promotion","item":"4","item_type":"sku_id","order":2,"pos_id":1},{"display_type":"recommend","item":"9","item_type":"sku_id","order":3,"pos_id":4},{"display_type":"promotion","item":"3","item_type":"sku_id","order":4,"pos_id":4},{"display_type":"recommend","item":"7","item_type":"sku_id","order":5,"pos_id":4},{"display_type":"query","item":"1","item_type":"sku_id","order":6,"pos_id":5},{"display_type":"promotion","item":"10","item_type":"sku_id","order":7,"pos_id":4},{"display_type":"query","item":"3","item_type":"sku_id","order":8,"pos_id":3},{"display_type":"query","item":"7","item_type":"sku_id","order":9,"pos_id":2},{"display_type":"promotion","item":"3","item_type":"sku_id","order":10,"pos_id":4}],"page":{"during_time":2484,"item":"8","item_type":"sku_id","last_page_id":"good_list","page_id":"good_detail","source_type":"activity"},"ts":1655279141000}
|
||||||
|
{"common":{"ar":"110000","ba":"Xiaomi","ch":"xiaomi","is_new":"1","md":"Xiaomi 9","mid":"mid_7","os":"Android 11.0","uid":"10","vc":"v2.1.134"},"page":{"during_time":19404,"last_page_id":"good_detail","page_id":"cart"},"ts":1655279141000}
|
||||||
|
{"common":{"ar":"110000","ba":"Xiaomi","ch":"xiaomi","is_new":"1","md":"Xiaomi 9","mid":"mid_7","os":"Android 11.0","uid":"10","vc":"v2.1.134"},"page":{"during_time":13879,"item":"2,3","item_type":"sku_ids","last_page_id":"cart","page_id":"trade"},"ts":1655279141000}
|
||||||
|
{"common":{"ar":"110000","ba":"Xiaomi","ch":"xiaomi","is_new":"1","md":"Xiaomi 9","mid":"mid_7","os":"Android 11.0","uid":"10","vc":"v2.1.134"},"page":{"during_time":10617,"item":"1,4,5","item_type":"sku_ids","last_page_id":"trade","page_id":"payment"},"ts":1655279141000}
|
||||||
|
{"common":{"ar":"370000","ba":"Xiaomi","ch":"xiaomi","is_new":"1","md":"Xiaomi 10 Pro ","mid":"mid_14","os":"Android 8.1","uid":"32","vc":"v2.1.134"},"start":{"entry":"icon","loading_time":9468,"open_ad_id":9,"open_ad_ms":1444,"open_ad_skip_ms":1313},"ts":1655279141000}
|
||||||
|
{"common":{"ar":"370000","ba":"Xiaomi","ch":"xiaomi","is_new":"1","md":"Xiaomi 10 Pro ","mid":"mid_14","os":"Android 8.1","uid":"32","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"2","item_type":"activity_id","order":1,"pos_id":3},{"display_type":"promotion","item":"4","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"promotion","item":"4","item_type":"sku_id","order":3,"pos_id":5},{"display_type":"query","item":"2","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"promotion","item":"7","item_type":"sku_id","order":5,"pos_id":5},{"display_type":"query","item":"10","item_type":"sku_id","order":6,"pos_id":1}],"page":{"during_time":18898,"page_id":"home"},"ts":1655279141000}
|
||||||
|
{"common":{"ar":"230000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_7","os":"iOS 13.2.9","uid":"34","vc":"v2.1.134"},"start":{"entry":"icon","loading_time":6046,"open_ad_id":4,"open_ad_ms":4840,"open_ad_skip_ms":2385},"ts":1655281316000}
|
||||||
|
{"common":{"ar":"230000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_7","os":"iOS 13.2.9","uid":"34","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"2","item_type":"activity_id","order":1,"pos_id":4},{"display_type":"query","item":"2","item_type":"sku_id","order":2,"pos_id":1},{"display_type":"promotion","item":"5","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"query","item":"2","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"promotion","item":"3","item_type":"sku_id","order":5,"pos_id":2},{"display_type":"query","item":"7","item_type":"sku_id","order":6,"pos_id":3},{"display_type":"promotion","item":"9","item_type":"sku_id","order":7,"pos_id":5},{"display_type":"query","item":"1","item_type":"sku_id","order":8,"pos_id":2},{"display_type":"promotion","item":"4","item_type":"sku_id","order":9,"pos_id":4},{"display_type":"recommend","item":"7","item_type":"sku_id","order":10,"pos_id":5},{"display_type":"promotion","item":"9","item_type":"sku_id","order":11,"pos_id":4}],"page":{"during_time":6963,"page_id":"home"},"ts":1655281316000}
|
||||||
|
{"common":{"ar":"230000","ba":"iPhone","ch":"Appstore","is_new":"1","md":"iPhone Xs","mid":"mid_7","os":"iOS 13.2.9","uid":"34","vc":"v2.1.134"},"displays":[{"display_type":"recommend","item":"4","item_type":"sku_id","order":1,"pos_id":4},{"display_type":"query","item":"2","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"recommend","item":"2","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"query","item":"6","item_type":"sku_id","order":4,"pos_id":4},{"display_type":"promotion","item":"2","item_type":"sku_id","order":5,"pos_id":4}],"page":{"during_time":8478,"item":"8","item_type":"sku_id","last_page_id":"home","page_id":"good_detail","source_type":"query"},"ts":1655281316000}
|
||||||
|
{"common":{"ar":"230000","ba":"Xiaomi","ch":"huawei","is_new":"0","md":"Xiaomi 9","mid":"mid_12","os":"Android 11.0","uid":"39","vc":"v2.1.134"},"start":{"entry":"icon","loading_time":11117,"open_ad_id":8,"open_ad_ms":5592,"open_ad_skip_ms":4065},"ts":1655281318000}
|
||||||
|
{"common":{"ar":"230000","ba":"Xiaomi","ch":"huawei","is_new":"0","md":"Xiaomi 9","mid":"mid_12","os":"Android 11.0","uid":"39","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"2","item_type":"activity_id","order":1,"pos_id":1},{"display_type":"activity","item":"1","item_type":"activity_id","order":2,"pos_id":1},{"display_type":"query","item":"6","item_type":"sku_id","order":3,"pos_id":1},{"display_type":"query","item":"7","item_type":"sku_id","order":4,"pos_id":5},{"display_type":"query","item":"1","item_type":"sku_id","order":5,"pos_id":3},{"display_type":"query","item":"3","item_type":"sku_id","order":6,"pos_id":4}],"page":{"during_time":13780,"page_id":"home"},"ts":1655281318000}
|
||||||
|
{"common":{"ar":"230000","ba":"Xiaomi","ch":"huawei","is_new":"0","md":"Xiaomi 9","mid":"mid_12","os":"Android 11.0","uid":"39","vc":"v2.1.134"},"page":{"during_time":16748,"last_page_id":"home","page_id":"search"},"ts":1655281318000}
|
||||||
|
{"common":{"ar":"230000","ba":"Xiaomi","ch":"huawei","is_new":"0","md":"Xiaomi 9","mid":"mid_12","os":"Android 11.0","uid":"39","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"2","item_type":"sku_id","order":1,"pos_id":3},{"display_type":"query","item":"7","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"query","item":"9","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"query","item":"10","item_type":"sku_id","order":4,"pos_id":2},{"display_type":"query","item":"2","item_type":"sku_id","order":5,"pos_id":3},{"display_type":"promotion","item":"7","item_type":"sku_id","order":6,"pos_id":3},{"display_type":"query","item":"2","item_type":"sku_id","order":7,"pos_id":4}],"page":{"during_time":7077,"item":"ps5","item_type":"keyword","last_page_id":"search","page_id":"good_list"},"ts":1655281318000}
|
||||||
|
{"actions":[{"action_id":"get_coupon","item":"1","item_type":"coupon_id","ts":1655281325191}],"common":{"ar":"230000","ba":"Xiaomi","ch":"huawei","is_new":"0","md":"Xiaomi 9","mid":"mid_12","os":"Android 11.0","uid":"39","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"2","item_type":"sku_id","order":1,"pos_id":2},{"display_type":"query","item":"6","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"promotion","item":"2","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"query","item":"3","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"query","item":"4","item_type":"sku_id","order":5,"pos_id":4}],"page":{"during_time":14382,"item":"1","item_type":"sku_id","last_page_id":"good_list","page_id":"good_detail","source_type":"recommend"},"ts":1655281318000}
|
||||||
|
{"common":{"ar":"230000","ba":"Xiaomi","ch":"huawei","is_new":"0","md":"Xiaomi 9","mid":"mid_12","os":"Android 11.0","uid":"39","vc":"v2.1.134"},"page":{"during_time":6152,"last_page_id":"good_detail","page_id":"login"},"ts":1655281318000}
|
||||||
|
{"actions":[{"action_id":"favor_add","item":"1","item_type":"sku_id","ts":1655281324407},{"action_id":"get_coupon","item":"2","item_type":"coupon_id","ts":1655281330814}],"common":{"ar":"230000","ba":"Xiaomi","ch":"huawei","is_new":"0","md":"Xiaomi 9","mid":"mid_12","os":"Android 11.0","uid":"39","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"5","item_type":"sku_id","order":1,"pos_id":3},{"display_type":"promotion","item":"5","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"query","item":"9","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"query","item":"6","item_type":"sku_id","order":4,"pos_id":2},{"display_type":"query","item":"3","item_type":"sku_id","order":5,"pos_id":3},{"display_type":"query","item":"2","item_type":"sku_id","order":6,"pos_id":3},{"display_type":"promotion","item":"4","item_type":"sku_id","order":7,"pos_id":4},{"display_type":"promotion","item":"6","item_type":"sku_id","order":8,"pos_id":2},{"display_type":"promotion","item":"4","item_type":"sku_id","order":9,"pos_id":4},{"display_type":"query","item":"3","item_type":"sku_id","order":10,"pos_id":4}],"page":{"during_time":19222,"item":"1","item_type":"sku_id","last_page_id":"login","page_id":"good_detail","source_type":"activity"},"ts":1655281318000}
|
||||||
|
{"common":{"ar":"230000","ba":"Xiaomi","ch":"huawei","is_new":"0","md":"Xiaomi 9","mid":"mid_12","os":"Android 11.0","uid":"39","vc":"v2.1.134"},"page":{"during_time":16715,"last_page_id":"good_detail","page_id":"cart"},"ts":1655281318000}
|
||||||
|
{"common":{"ar":"230000","ba":"Xiaomi","ch":"huawei","is_new":"0","md":"Xiaomi 9","mid":"mid_12","os":"Android 11.0","uid":"39","vc":"v2.1.134"},"page":{"during_time":11667,"item":"5","item_type":"sku_ids","last_page_id":"cart","page_id":"trade"},"ts":1655281318000}
|
||||||
|
{"common":{"ar":"230000","ba":"Xiaomi","ch":"huawei","is_new":"0","md":"Xiaomi 9","mid":"mid_12","os":"Android 11.0","uid":"39","vc":"v2.1.134"},"page":{"during_time":10886,"item":"4","item_type":"sku_ids","last_page_id":"trade","page_id":"payment"},"ts":1655281318000}
|
||||||
|
{"common":{"ar":"310000","ba":"Xiaomi","ch":"oppo","is_new":"0","md":"Xiaomi Mix2 ","mid":"mid_17","os":"Android 9.0","uid":"39","vc":"v2.1.134"},"start":{"entry":"notice","loading_time":5266,"open_ad_id":20,"open_ad_ms":7358,"open_ad_skip_ms":4762},"ts":1655281319000}
|
||||||
|
{"common":{"ar":"310000","ba":"Xiaomi","ch":"oppo","is_new":"0","md":"Xiaomi Mix2 ","mid":"mid_17","os":"Android 9.0","uid":"39","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"1","item_type":"activity_id","order":1,"pos_id":2},{"display_type":"activity","item":"2","item_type":"activity_id","order":2,"pos_id":2},{"display_type":"promotion","item":"4","item_type":"sku_id","order":3,"pos_id":2},{"display_type":"promotion","item":"10","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"recommend","item":"6","item_type":"sku_id","order":5,"pos_id":3},{"display_type":"recommend","item":"10","item_type":"sku_id","order":6,"pos_id":1},{"display_type":"query","item":"6","item_type":"sku_id","order":7,"pos_id":2},{"display_type":"promotion","item":"3","item_type":"sku_id","order":8,"pos_id":5}],"page":{"during_time":17236,"page_id":"home"},"ts":1655281319000}
|
||||||
|
{"actions":[{"action_id":"favor_add","item":"4","item_type":"sku_id","ts":1655281321935},{"action_id":"get_coupon","item":"2","item_type":"coupon_id","ts":1655281324870}],"common":{"ar":"310000","ba":"Xiaomi","ch":"oppo","is_new":"0","md":"Xiaomi Mix2 ","mid":"mid_17","os":"Android 9.0","uid":"39","vc":"v2.1.134"},"displays":[{"display_type":"promotion","item":"3","item_type":"sku_id","order":1,"pos_id":1},{"display_type":"promotion","item":"2","item_type":"sku_id","order":2,"pos_id":1},{"display_type":"promotion","item":"5","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"query","item":"8","item_type":"sku_id","order":4,"pos_id":3}],"page":{"during_time":8805,"item":"4","item_type":"sku_id","last_page_id":"home","page_id":"good_detail","source_type":"activity"},"ts":1655281319000}
|
||||||
|
{"common":{"ar":"230000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_14","os":"iOS 13.2.3","uid":"29","vc":"v2.1.134"},"start":{"entry":"icon","loading_time":4249,"open_ad_id":8,"open_ad_ms":9162,"open_ad_skip_ms":3451},"ts":1655281320000}
|
||||||
|
{"common":{"ar":"230000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_14","os":"iOS 13.2.3","uid":"29","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"2","item_type":"activity_id","order":1,"pos_id":2},{"display_type":"activity","item":"2","item_type":"activity_id","order":2,"pos_id":2},{"display_type":"recommend","item":"3","item_type":"sku_id","order":3,"pos_id":5},{"display_type":"query","item":"7","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"query","item":"6","item_type":"sku_id","order":5,"pos_id":1},{"display_type":"query","item":"1","item_type":"sku_id","order":6,"pos_id":4},{"display_type":"query","item":"10","item_type":"sku_id","order":7,"pos_id":1},{"display_type":"promotion","item":"4","item_type":"sku_id","order":8,"pos_id":3},{"display_type":"query","item":"6","item_type":"sku_id","order":9,"pos_id":5}],"page":{"during_time":13921,"page_id":"home"},"ts":1655281320000}
|
||||||
|
{"actions":[{"action_id":"get_coupon","item":"1","item_type":"coupon_id","ts":1655281326699}],"common":{"ar":"230000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_14","os":"iOS 13.2.3","uid":"29","vc":"v2.1.134"},"displays":[{"display_type":"promotion","item":"5","item_type":"sku_id","order":1,"pos_id":4},{"display_type":"promotion","item":"4","item_type":"sku_id","order":2,"pos_id":1},{"display_type":"promotion","item":"10","item_type":"sku_id","order":3,"pos_id":5},{"display_type":"query","item":"8","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"query","item":"4","item_type":"sku_id","order":5,"pos_id":1},{"display_type":"recommend","item":"4","item_type":"sku_id","order":6,"pos_id":1},{"display_type":"query","item":"9","item_type":"sku_id","order":7,"pos_id":3},{"display_type":"query","item":"10","item_type":"sku_id","order":8,"pos_id":2}],"page":{"during_time":13399,"item":"3","item_type":"sku_id","last_page_id":"home","page_id":"good_detail","source_type":"recommend"},"ts":1655281320000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_12","os":"iOS 13.2.9","uid":"4","vc":"v2.0.1"},"start":{"entry":"icon","loading_time":15894,"open_ad_id":18,"open_ad_ms":9284,"open_ad_skip_ms":0},"ts":1655281320000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_12","os":"iOS 13.2.9","uid":"4","vc":"v2.0.1"},"displays":[{"display_type":"activity","item":"2","item_type":"activity_id","order":1,"pos_id":1},{"display_type":"promotion","item":"2","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"query","item":"6","item_type":"sku_id","order":3,"pos_id":5},{"display_type":"query","item":"5","item_type":"sku_id","order":4,"pos_id":4},{"display_type":"promotion","item":"9","item_type":"sku_id","order":5,"pos_id":1},{"display_type":"query","item":"6","item_type":"sku_id","order":6,"pos_id":3},{"display_type":"promotion","item":"10","item_type":"sku_id","order":7,"pos_id":2}],"page":{"during_time":8547,"page_id":"home"},"ts":1655281320000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_12","os":"iOS 13.2.9","uid":"4","vc":"v2.0.1"},"page":{"during_time":19952,"last_page_id":"home","page_id":"search"},"ts":1655281320000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_12","os":"iOS 13.2.9","uid":"4","vc":"v2.0.1"},"displays":[{"display_type":"query","item":"6","item_type":"sku_id","order":1,"pos_id":1},{"display_type":"query","item":"1","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"query","item":"4","item_type":"sku_id","order":3,"pos_id":2},{"display_type":"query","item":"9","item_type":"sku_id","order":4,"pos_id":3},{"display_type":"promotion","item":"7","item_type":"sku_id","order":5,"pos_id":4},{"display_type":"query","item":"1","item_type":"sku_id","order":6,"pos_id":2},{"display_type":"query","item":"8","item_type":"sku_id","order":7,"pos_id":3},{"display_type":"recommend","item":"5","item_type":"sku_id","order":8,"pos_id":4}],"page":{"during_time":16423,"item":"ps5","item_type":"keyword","last_page_id":"search","page_id":"good_list"},"ts":1655281320000}
|
||||||
|
{"actions":[{"action_id":"get_coupon","item":"1","item_type":"coupon_id","ts":1655281323559}],"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_12","os":"iOS 13.2.9","uid":"4","vc":"v2.0.1"},"displays":[{"display_type":"query","item":"5","item_type":"sku_id","order":1,"pos_id":4},{"display_type":"query","item":"10","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"promotion","item":"7","item_type":"sku_id","order":3,"pos_id":2},{"display_type":"query","item":"1","item_type":"sku_id","order":4,"pos_id":5},{"display_type":"query","item":"2","item_type":"sku_id","order":5,"pos_id":2}],"page":{"during_time":7118,"item":"5","item_type":"sku_id","last_page_id":"good_list","page_id":"good_detail","source_type":"promotion"},"ts":1655281320000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_12","os":"iOS 13.2.9","uid":"4","vc":"v2.0.1"},"page":{"during_time":3560,"last_page_id":"good_detail","page_id":"login"},"ts":1655281320000}
|
||||||
|
{"actions":[{"action_id":"get_coupon","item":"2","item_type":"coupon_id","ts":1655281322290}],"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_12","os":"iOS 13.2.9","uid":"4","vc":"v2.0.1"},"displays":[{"display_type":"query","item":"6","item_type":"sku_id","order":1,"pos_id":5},{"display_type":"query","item":"5","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"query","item":"10","item_type":"sku_id","order":3,"pos_id":5},{"display_type":"promotion","item":"9","item_type":"sku_id","order":4,"pos_id":3},{"display_type":"recommend","item":"9","item_type":"sku_id","order":5,"pos_id":5},{"display_type":"query","item":"3","item_type":"sku_id","order":6,"pos_id":2},{"display_type":"recommend","item":"7","item_type":"sku_id","order":7,"pos_id":1},{"display_type":"query","item":"3","item_type":"sku_id","order":8,"pos_id":1},{"display_type":"promotion","item":"10","item_type":"sku_id","order":9,"pos_id":3}],"page":{"during_time":4580,"item":"2","item_type":"sku_id","last_page_id":"login","page_id":"good_detail","source_type":"promotion"},"ts":1655281320000}
|
||||||
|
{"actions":[{"action_id":"cart_add_num","item":"10","item_type":"sku_id","ts":1655281320967}],"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_12","os":"iOS 13.2.9","uid":"4","vc":"v2.0.1"},"err":{"error_code":3074,"msg":" Exception in thread \\ java.net.SocketTimeoutException\\n \\tat com.atgugu.gmall2020.mock.log.bean.AppError.main(AppError.java:xxxxxx)"},"page":{"during_time":1935,"last_page_id":"good_detail","page_id":"cart"},"ts":1655281320000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_12","os":"iOS 13.2.9","uid":"4","vc":"v2.0.1"},"page":{"during_time":14693,"item":"4","item_type":"sku_ids","last_page_id":"cart","page_id":"trade"},"ts":1655281320000}
|
||||||
|
{"common":{"ar":"110000","ba":"iPhone","ch":"Appstore","is_new":"0","md":"iPhone X","mid":"mid_12","os":"iOS 13.2.9","uid":"4","vc":"v2.0.1"},"page":{"during_time":4302,"item":"5","item_type":"sku_ids","last_page_id":"trade","page_id":"payment"},"ts":1655281320000}
|
||||||
|
{"common":{"ar":"530000","ba":"Xiaomi","ch":"vivo","is_new":"0","md":"Xiaomi 10 Pro ","mid":"mid_4","os":"Android 11.0","uid":"5","vc":"v2.1.132"},"start":{"entry":"icon","loading_time":8448,"open_ad_id":10,"open_ad_ms":4130,"open_ad_skip_ms":1305},"ts":1655281321000}
|
||||||
|
{"common":{"ar":"530000","ba":"Xiaomi","ch":"vivo","is_new":"0","md":"Xiaomi 10 Pro ","mid":"mid_4","os":"Android 11.0","uid":"5","vc":"v2.1.132"},"displays":[{"display_type":"activity","item":"2","item_type":"activity_id","order":1,"pos_id":1},{"display_type":"query","item":"6","item_type":"sku_id","order":2,"pos_id":3},{"display_type":"recommend","item":"4","item_type":"sku_id","order":3,"pos_id":4},{"display_type":"query","item":"2","item_type":"sku_id","order":4,"pos_id":3},{"display_type":"promotion","item":"8","item_type":"sku_id","order":5,"pos_id":4},{"display_type":"query","item":"5","item_type":"sku_id","order":6,"pos_id":1},{"display_type":"query","item":"4","item_type":"sku_id","order":7,"pos_id":5},{"display_type":"promotion","item":"5","item_type":"sku_id","order":8,"pos_id":2},{"display_type":"query","item":"5","item_type":"sku_id","order":9,"pos_id":1},{"display_type":"promotion","item":"8","item_type":"sku_id","order":10,"pos_id":1},{"display_type":"promotion","item":"9","item_type":"sku_id","order":11,"pos_id":4}],"page":{"during_time":17188,"page_id":"home"},"ts":1655281321000}
|
||||||
|
{"common":{"ar":"530000","ba":"Xiaomi","ch":"vivo","is_new":"0","md":"Xiaomi 10 Pro ","mid":"mid_4","os":"Android 11.0","uid":"5","vc":"v2.1.132"},"page":{"during_time":19812,"last_page_id":"home","page_id":"search"},"ts":1655281321000}
|
||||||
|
{"common":{"ar":"530000","ba":"Xiaomi","ch":"vivo","is_new":"0","md":"Xiaomi 10 Pro ","mid":"mid_4","os":"Android 11.0","uid":"5","vc":"v2.1.132"},"displays":[{"display_type":"query","item":"2","item_type":"sku_id","order":1,"pos_id":2},{"display_type":"query","item":"9","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"promotion","item":"8","item_type":"sku_id","order":3,"pos_id":4},{"display_type":"query","item":"8","item_type":"sku_id","order":4,"pos_id":1}],"page":{"during_time":13735,"item":"图书","item_type":"keyword","last_page_id":"search","page_id":"good_list"},"ts":1655281321000}
|
||||||
|
{"actions":[{"action_id":"get_coupon","item":"3","item_type":"coupon_id","ts":1655281326117}],"common":{"ar":"530000","ba":"Xiaomi","ch":"vivo","is_new":"0","md":"Xiaomi 10 Pro ","mid":"mid_4","os":"Android 11.0","uid":"5","vc":"v2.1.132"},"displays":[{"display_type":"promotion","item":"4","item_type":"sku_id","order":1,"pos_id":3},{"display_type":"query","item":"2","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"promotion","item":"3","item_type":"sku_id","order":3,"pos_id":2},{"display_type":"query","item":"6","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"recommend","item":"8","item_type":"sku_id","order":5,"pos_id":5},{"display_type":"query","item":"8","item_type":"sku_id","order":6,"pos_id":3},{"display_type":"query","item":"9","item_type":"sku_id","order":7,"pos_id":1}],"page":{"during_time":10235,"item":"10","item_type":"sku_id","last_page_id":"good_list","page_id":"good_detail","source_type":"query"},"ts":1655281321000}
|
||||||
|
{"common":{"ar":"530000","ba":"Xiaomi","ch":"vivo","is_new":"0","md":"Xiaomi 10 Pro ","mid":"mid_4","os":"Android 11.0","uid":"5","vc":"v2.1.132"},"page":{"during_time":17524,"last_page_id":"good_detail","page_id":"login"},"ts":1655281321000}
|
||||||
|
{"actions":[{"action_id":"favor_add","item":"10","item_type":"sku_id","ts":1655281324637},{"action_id":"get_coupon","item":"2","item_type":"coupon_id","ts":1655281328274}],"common":{"ar":"530000","ba":"Xiaomi","ch":"vivo","is_new":"0","md":"Xiaomi 10 Pro ","mid":"mid_4","os":"Android 11.0","uid":"5","vc":"v2.1.132"},"displays":[{"display_type":"query","item":"8","item_type":"sku_id","order":1,"pos_id":5},{"display_type":"promotion","item":"3","item_type":"sku_id","order":2,"pos_id":2},{"display_type":"query","item":"8","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"query","item":"6","item_type":"sku_id","order":4,"pos_id":3},{"display_type":"query","item":"1","item_type":"sku_id","order":5,"pos_id":1},{"display_type":"query","item":"10","item_type":"sku_id","order":6,"pos_id":1},{"display_type":"query","item":"3","item_type":"sku_id","order":7,"pos_id":5}],"page":{"during_time":10913,"item":"10","item_type":"sku_id","last_page_id":"login","page_id":"good_detail","source_type":"activity"},"ts":1655281321000}
|
||||||
|
{"common":{"ar":"530000","ba":"Xiaomi","ch":"vivo","is_new":"0","md":"Xiaomi 10 Pro ","mid":"mid_4","os":"Android 11.0","uid":"5","vc":"v2.1.132"},"page":{"during_time":6681,"last_page_id":"good_detail","page_id":"cart"},"ts":1655281321000}
|
||||||
|
{"common":{"ar":"530000","ba":"Xiaomi","ch":"vivo","is_new":"0","md":"Xiaomi 10 Pro ","mid":"mid_4","os":"Android 11.0","uid":"5","vc":"v2.1.132"},"page":{"during_time":8132,"item":"2,3,5","item_type":"sku_ids","last_page_id":"cart","page_id":"trade"},"ts":1655281321000}
|
||||||
|
{"common":{"ar":"530000","ba":"Xiaomi","ch":"vivo","is_new":"0","md":"Xiaomi 10 Pro ","mid":"mid_4","os":"Android 11.0","uid":"5","vc":"v2.1.132"},"page":{"during_time":6369,"item":"2,8,10","item_type":"sku_ids","last_page_id":"trade","page_id":"payment"},"ts":1655281321000}
|
||||||
|
{"common":{"ar":"440000","ba":"Honor","ch":"xiaomi","is_new":"1","md":"Honor 20s","mid":"mid_14","os":"Android 11.0","uid":"9","vc":"v2.1.134"},"start":{"entry":"icon","loading_time":13898,"open_ad_id":16,"open_ad_ms":3327,"open_ad_skip_ms":0},"ts":1655281322000}
|
||||||
|
{"common":{"ar":"440000","ba":"Honor","ch":"xiaomi","is_new":"1","md":"Honor 20s","mid":"mid_14","os":"Android 11.0","uid":"9","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"2","item_type":"activity_id","order":1,"pos_id":3},{"display_type":"query","item":"3","item_type":"sku_id","order":2,"pos_id":4},{"display_type":"query","item":"5","item_type":"sku_id","order":3,"pos_id":4},{"display_type":"query","item":"6","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"promotion","item":"4","item_type":"sku_id","order":5,"pos_id":2},{"display_type":"query","item":"7","item_type":"sku_id","order":6,"pos_id":2},{"display_type":"query","item":"3","item_type":"sku_id","order":7,"pos_id":1},{"display_type":"recommend","item":"3","item_type":"sku_id","order":8,"pos_id":2}],"page":{"during_time":5066,"page_id":"home"},"ts":1655281322000}
|
||||||
|
{"common":{"ar":"420000","ba":"Xiaomi","ch":"vivo","is_new":"1","md":"Xiaomi 10 Pro ","mid":"mid_13","os":"Android 10.0","uid":"31","vc":"v2.1.134"},"err":{"error_code":3443,"msg":" Exception in thread \\ java.net.SocketTimeoutException\\n \\tat com.atgugu.gmall2020.mock.log.bean.AppError.main(AppError.java:xxxxxx)"},"start":{"entry":"icon","loading_time":19980,"open_ad_id":15,"open_ad_ms":2899,"open_ad_skip_ms":1368},"ts":1655281323000}
|
||||||
|
{"common":{"ar":"420000","ba":"Xiaomi","ch":"vivo","is_new":"1","md":"Xiaomi 10 Pro ","mid":"mid_13","os":"Android 10.0","uid":"31","vc":"v2.1.134"},"displays":[{"display_type":"activity","item":"1","item_type":"activity_id","order":1,"pos_id":5},{"display_type":"query","item":"1","item_type":"sku_id","order":2,"pos_id":5},{"display_type":"query","item":"5","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"query","item":"2","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"query","item":"9","item_type":"sku_id","order":5,"pos_id":5},{"display_type":"promotion","item":"5","item_type":"sku_id","order":6,"pos_id":5},{"display_type":"query","item":"5","item_type":"sku_id","order":7,"pos_id":1},{"display_type":"query","item":"3","item_type":"sku_id","order":8,"pos_id":5},{"display_type":"recommend","item":"2","item_type":"sku_id","order":9,"pos_id":3}],"page":{"during_time":13666,"page_id":"home"},"ts":1655281323000}
|
||||||
|
{"actions":[{"action_id":"favor_add","item":"8","item_type":"sku_id","ts":1655281329042},{"action_id":"get_coupon","item":"2","item_type":"coupon_id","ts":1655281335084}],"common":{"ar":"420000","ba":"Xiaomi","ch":"vivo","is_new":"1","md":"Xiaomi 10 Pro ","mid":"mid_13","os":"Android 10.0","uid":"31","vc":"v2.1.134"},"displays":[{"display_type":"query","item":"1","item_type":"sku_id","order":1,"pos_id":1},{"display_type":"query","item":"1","item_type":"sku_id","order":2,"pos_id":2},{"display_type":"query","item":"5","item_type":"sku_id","order":3,"pos_id":2},{"display_type":"promotion","item":"2","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"recommend","item":"3","item_type":"sku_id","order":5,"pos_id":1},{"display_type":"query","item":"8","item_type":"sku_id","order":6,"pos_id":3},{"display_type":"query","item":"7","item_type":"sku_id","order":7,"pos_id":5}],"page":{"during_time":18126,"item":"8","item_type":"sku_id","last_page_id":"home","page_id":"good_detail","source_type":"promotion"},"ts":1655281323000}
|
||||||
|
{"common":{"ar":"370000","ba":"Huawei","ch":"oppo","is_new":"1","md":"Huawei Mate 30","mid":"mid_20","os":"Android 11.0","uid":"47","vc":"v2.1.132"},"start":{"entry":"icon","loading_time":2289,"open_ad_id":19,"open_ad_ms":2126,"open_ad_skip_ms":0},"ts":1655281323000}
|
||||||
|
{"common":{"ar":"370000","ba":"Huawei","ch":"oppo","is_new":"1","md":"Huawei Mate 30","mid":"mid_20","os":"Android 11.0","uid":"47","vc":"v2.1.132"},"displays":[{"display_type":"activity","item":"2","item_type":"activity_id","order":1,"pos_id":2},{"display_type":"query","item":"8","item_type":"sku_id","order":2,"pos_id":3},{"display_type":"query","item":"4","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"query","item":"8","item_type":"sku_id","order":4,"pos_id":4},{"display_type":"query","item":"2","item_type":"sku_id","order":5,"pos_id":1}],"page":{"during_time":17345,"page_id":"home"},"ts":1655281323000}
|
||||||
|
{"common":{"ar":"370000","ba":"Huawei","ch":"oppo","is_new":"1","md":"Huawei Mate 30","mid":"mid_20","os":"Android 11.0","uid":"47","vc":"v2.1.132"},"displays":[{"display_type":"query","item":"5","item_type":"sku_id","order":1,"pos_id":5},{"display_type":"query","item":"7","item_type":"sku_id","order":2,"pos_id":1},{"display_type":"query","item":"10","item_type":"sku_id","order":3,"pos_id":5},{"display_type":"query","item":"3","item_type":"sku_id","order":4,"pos_id":1},{"display_type":"query","item":"5","item_type":"sku_id","order":5,"pos_id":3}],"err":{"error_code":1382,"msg":" Exception in thread \\ java.net.SocketTimeoutException\\n \\tat com.atgugu.gmall2020.mock.log.bean.AppError.main(AppError.java:xxxxxx)"},"page":{"during_time":10983,"item":"电视","item_type":"keyword","last_page_id":"home","page_id":"good_list"},"ts":1655281323000}
|
||||||
|
{"actions":[{"action_id":"favor_add","item":"8","item_type":"sku_id","ts":1655281328853},{"action_id":"get_coupon","item":"3","item_type":"coupon_id","ts":1655281334706}],"common":{"ar":"370000","ba":"Huawei","ch":"oppo","is_new":"1","md":"Huawei Mate 30","mid":"mid_20","os":"Android 11.0","uid":"47","vc":"v2.1.132"},"displays":[{"display_type":"query","item":"8","item_type":"sku_id","order":1,"pos_id":2},{"display_type":"query","item":"1","item_type":"sku_id","order":2,"pos_id":3},{"display_type":"promotion","item":"6","item_type":"sku_id","order":3,"pos_id":5},{"display_type":"query","item":"1","item_type":"sku_id","order":4,"pos_id":2}],"page":{"during_time":17560,"item":"8","item_type":"sku_id","last_page_id":"good_list","page_id":"good_detail","source_type":"recommend"},"ts":1655281323000}
|
||||||
|
{"common":{"ar":"370000","ba":"Huawei","ch":"oppo","is_new":"1","md":"Huawei Mate 30","mid":"mid_20","os":"Android 11.0","uid":"47","vc":"v2.1.132"},"page":{"during_time":4680,"last_page_id":"good_detail","page_id":"cart"},"ts":1655281323000}
|
||||||
|
{"common":{"ar":"370000","ba":"Huawei","ch":"oppo","is_new":"1","md":"Huawei Mate 30","mid":"mid_20","os":"Android 11.0","uid":"47","vc":"v2.1.132"},"page":{"during_time":12706,"item":"1,4,10","item_type":"sku_ids","last_page_id":"cart","page_id":"trade"},"ts":1655281323000}
|
||||||
|
{"common":{"ar":"370000","ba":"Huawei","ch":"oppo","is_new":"1","md":"Huawei Mate 30","mid":"mid_20","os":"Android 11.0","uid":"47","vc":"v2.1.132"},"page":{"during_time":8631,"item":"1,5","item_type":"sku_ids","last_page_id":"trade","page_id":"payment"},"ts":1655281323000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"web","is_new":"1","md":"Xiaomi Mix2 ","mid":"mid_6","os":"Android 11.0","uid":"43","vc":"v2.0.1"},"start":{"entry":"icon","loading_time":5597,"open_ad_id":16,"open_ad_ms":6587,"open_ad_skip_ms":5736},"ts":1655281324000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"web","is_new":"1","md":"Xiaomi Mix2 ","mid":"mid_6","os":"Android 11.0","uid":"43","vc":"v2.0.1"},"displays":[{"display_type":"activity","item":"1","item_type":"activity_id","order":1,"pos_id":2},{"display_type":"activity","item":"2","item_type":"activity_id","order":2,"pos_id":2},{"display_type":"promotion","item":"9","item_type":"sku_id","order":3,"pos_id":3},{"display_type":"promotion","item":"5","item_type":"sku_id","order":4,"pos_id":2},{"display_type":"recommend","item":"1","item_type":"sku_id","order":5,"pos_id":4},{"display_type":"query","item":"9","item_type":"sku_id","order":6,"pos_id":1}],"page":{"during_time":5689,"page_id":"home"},"ts":1655281324000}
|
||||||
|
{"common":{"ar":"440000","ba":"Xiaomi","ch":"web","is_new":"1","md":"Xiaomi Mix2 ","mid":"mid_6","os":"Android 11.0","uid":"43","vc":"v2.0.1"},"page":{"during_time":1730,"last_page_id":"home","page_id":"search"},"ts":1655281324000}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
server.port=8081
|
||||||
|
# kafka????
|
||||||
|
spring.kafka.bootstrap-servers = Ding202:9092,Ding203:9092,Ding204:9092
|
||||||
|
spring.kafka.producer.key-serializer= org.apache.kafka.common.serialization.StringSerializer
|
||||||
|
spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.atguigu.rtgmall;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
class GmallLoggerApplicationTests {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void contextLoads() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -87,6 +87,27 @@
|
||||||
<version>2.14.0</version>
|
<version>2.14.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--lomback插件依赖-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.14</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--添加flink-mysql的cdc依赖-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>5.1.47</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.ververica</groupId>
|
||||||
|
<artifactId>flink-connector-mysql-cdc</artifactId>
|
||||||
|
<version>1.2.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
@ -114,5 +135,4 @@
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -2,15 +2,27 @@ package com.atguigu.gmall.realtime.app.dwd;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.ververica.cdc.connectors.mysql.MySQLSource;
|
||||||
|
import com.alibaba.ververica.cdc.connectors.mysql.table.StartupOptions;
|
||||||
|
import com.alibaba.ververica.cdc.debezium.StringDebeziumDeserializationSchema;
|
||||||
|
import com.atguigu.gmall.realtime.app.func.MyDeserializationSchemaFunction;
|
||||||
|
import com.atguigu.gmall.realtime.app.func.TableProcessFunction;
|
||||||
|
import com.atguigu.gmall.realtime.beans.TableProcess;
|
||||||
import com.atguigu.gmall.realtime.utils.MyKafkaUtils;
|
import com.atguigu.gmall.realtime.utils.MyKafkaUtils;
|
||||||
|
import com.mysql.cj.xdevapi.Table;
|
||||||
import org.apache.flink.api.common.restartstrategy.RestartStrategies;
|
import org.apache.flink.api.common.restartstrategy.RestartStrategies;
|
||||||
|
import org.apache.flink.api.common.state.MapState;
|
||||||
|
import org.apache.flink.api.common.state.MapStateDescriptor;
|
||||||
import org.apache.flink.runtime.state.filesystem.FsStateBackend;
|
import org.apache.flink.runtime.state.filesystem.FsStateBackend;
|
||||||
import org.apache.flink.streaming.api.CheckpointingMode;
|
import org.apache.flink.streaming.api.CheckpointingMode;
|
||||||
import org.apache.flink.streaming.api.datastream.DataStreamSource;
|
import org.apache.flink.streaming.api.datastream.*;
|
||||||
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;
|
|
||||||
import org.apache.flink.streaming.api.environment.CheckpointConfig;
|
import org.apache.flink.streaming.api.environment.CheckpointConfig;
|
||||||
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
|
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
|
||||||
|
import org.apache.flink.streaming.api.functions.co.BroadcastProcessFunction;
|
||||||
|
import org.apache.flink.streaming.api.functions.source.SourceFunction;
|
||||||
import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer;
|
import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer;
|
||||||
|
import org.apache.flink.util.Collector;
|
||||||
|
import org.apache.flink.util.OutputTag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*@BelongsProject: rt-gmall-parent
|
*@BelongsProject: rt-gmall-parent
|
||||||
|
|
@ -66,14 +78,48 @@ public class BaseDBApp {
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
filterDs.print(">>>>");
|
// filterDs.print(">>>>");
|
||||||
|
|
||||||
//TODO 6.动态分流 ****
|
//TODO 6.使用FlinkCDC读取配置表数据
|
||||||
|
//6.1 获取datasource
|
||||||
|
SourceFunction<String> mySqlSource = MySQLSource.<String>builder()
|
||||||
|
.hostname("Ding202")
|
||||||
|
.port(3306)
|
||||||
|
.databaseList("rt_gmall_realtime") // set captured database
|
||||||
|
.tableList("rt_gmall_realtime.table_process") // set captured table
|
||||||
|
.username("root")
|
||||||
|
.password("123456")
|
||||||
|
.startupOptions(StartupOptions.initial())
|
||||||
|
.deserializer(new MyDeserializationSchemaFunction()) // converts SourceRecord to JSON String
|
||||||
|
.build();
|
||||||
|
|
||||||
|
//6.2 读取数据封装流
|
||||||
|
DataStreamSource<String> mysqlDS = env.addSource(mySqlSource);
|
||||||
|
|
||||||
|
//6.3 为了让主流中的每一个并行度流上处理业务时都能够使用配置流mysqlDS的数据,所以需要将配置流进行广播(广播只能是map类型<k,v>)
|
||||||
|
MapStateDescriptor<String, TableProcess> mapStateDescriptor = new MapStateDescriptor<>("table_process", String.class, TableProcess.class);//广播的时候是一个什么类型
|
||||||
|
BroadcastStream<String> broadcastDS = mysqlDS.broadcast(mapStateDescriptor);//转化为了广播流
|
||||||
|
|
||||||
|
//6.4 调用非广播流的connect方法 将业务流与配置流进行连接
|
||||||
|
BroadcastConnectedStream<JSONObject, String> connectDS = filterDs.connect(broadcastDS);
|
||||||
|
|
||||||
|
//TODO 7. 动态分流 将维度数据放入维度侧输出流 事实数据放入主流
|
||||||
|
//声明维度侧输出流的标记
|
||||||
|
OutputTag<JSONObject> dimTag = new OutputTag<JSONObject>("dimTag") {
|
||||||
|
};
|
||||||
|
SingleOutputStreamOperator<JSONObject> realDS = connectDS.process(
|
||||||
|
new TableProcessFunction(dimTag,mapStateDescriptor)
|
||||||
|
);
|
||||||
|
|
||||||
|
//获取维度侧输出流
|
||||||
|
DataStream<JSONObject> dimDS = realDS.getSideOutput(dimTag);
|
||||||
|
dimDS.print(">>>>");
|
||||||
|
realDS.print("####");
|
||||||
|
|
||||||
|
|
||||||
//TODO 7.将维度侧输出流的数据写到Hbase中
|
//TODO 8.将维度侧输出流的数据写到Hbase中
|
||||||
|
|
||||||
//TODO 8.将主流数据写回到Kafka的dwd层中
|
//TODO 9.将主流数据写回到Kafka的dwd层中
|
||||||
|
|
||||||
env.execute();
|
env.execute();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -230,4 +230,7 @@
|
||||||
"type": "insert",
|
"type": "insert",
|
||||||
"table": "order_status_log",
|
"table": "order_status_log",
|
||||||
"ts": 1683293507
|
"ts": 1683293507
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.atguigu.gmall.realtime.app.func;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.ververica.cdc.debezium.DebeziumDeserializationSchema;
|
||||||
|
import io.debezium.data.Envelope;
|
||||||
|
import org.apache.flink.api.common.typeinfo.TypeInformation;
|
||||||
|
import org.apache.flink.util.Collector;
|
||||||
|
import org.apache.kafka.connect.data.Field;
|
||||||
|
import org.apache.kafka.connect.data.Struct;
|
||||||
|
import org.apache.kafka.connect.source.SourceRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@BelongsProject: rt-gmall-parent
|
||||||
|
*@BelongsPackage: com.atguigu.gmall.realtime.app.func
|
||||||
|
*@Author: markilue
|
||||||
|
*@CreateTime: 2023-05-06 17:39
|
||||||
|
*@Description: TODO 自定义反序列化器
|
||||||
|
*@Version: 1.0
|
||||||
|
*/
|
||||||
|
public class MyDeserializationSchemaFunction implements DebeziumDeserializationSchema<String> {
|
||||||
|
@Override
|
||||||
|
public void deserialize(SourceRecord sourceRecord, Collector collector) throws Exception {
|
||||||
|
Struct valueStruct = (Struct) sourceRecord.value();//要用kafka的Struct,因为本质上使用的是Debezium,Debezium使用了kafka的struct
|
||||||
|
Struct source = valueStruct.getStruct("source");
|
||||||
|
|
||||||
|
String database = source.getString("db");
|
||||||
|
String table = source.getString("table");
|
||||||
|
//类型
|
||||||
|
String type = Envelope.operationFor(sourceRecord).toString().toLowerCase();//内部通过枚举类,将op转为对应的string
|
||||||
|
if (type.equals("create")) {
|
||||||
|
type = "insert";
|
||||||
|
}
|
||||||
|
//获取影响的数据data
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("database", database);
|
||||||
|
jsonObject.put("table", table);
|
||||||
|
jsonObject.put("type", type);
|
||||||
|
JSONObject dataObject = new JSONObject();
|
||||||
|
Struct after = valueStruct.getStruct("after");
|
||||||
|
if(after!=null){
|
||||||
|
for (Field field : after.schema().fields()) {
|
||||||
|
String fieldName = field.name();
|
||||||
|
Object fieldValue = after.get(field);
|
||||||
|
dataObject.put(fieldName, fieldValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jsonObject.put("data",dataObject);
|
||||||
|
collector.collect(jsonObject.toJSONString());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypeInformation<String> getProducedType() {
|
||||||
|
return TypeInformation.of(String.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
package com.atguigu.gmall.realtime.app.func;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.atguigu.gmall.realtime.beans.TableProcess;
|
||||||
|
import org.apache.flink.api.common.state.BroadcastState;
|
||||||
|
import org.apache.flink.api.common.state.MapStateDescriptor;
|
||||||
|
import org.apache.flink.api.common.state.ReadOnlyBroadcastState;
|
||||||
|
import org.apache.flink.streaming.api.functions.co.BroadcastProcessFunction;
|
||||||
|
import org.apache.flink.util.Collector;
|
||||||
|
import org.apache.flink.util.OutputTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@BelongsProject: rt-gmall-parent
|
||||||
|
*@BelongsPackage: com.atguigu.gmall.realtime.app.func
|
||||||
|
*@Author: markilue
|
||||||
|
*@CreateTime: 2023-05-06 18:07
|
||||||
|
*@Description: TODO 动态分流实现
|
||||||
|
*@Version: 1.0
|
||||||
|
*/
|
||||||
|
public class TableProcessFunction extends BroadcastProcessFunction<JSONObject, String, JSONObject> {
|
||||||
|
|
||||||
|
private OutputTag<JSONObject> dimTag;
|
||||||
|
private MapStateDescriptor<String, TableProcess> mapStateDescriptor;
|
||||||
|
|
||||||
|
public TableProcessFunction(OutputTag<JSONObject> dimTag, MapStateDescriptor<String, TableProcess> mapStateDescriptor) {
|
||||||
|
this.dimTag = dimTag;
|
||||||
|
this.mapStateDescriptor = mapStateDescriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
//处理业务流中数据 maxwell从业务数据库中采集到的数据
|
||||||
|
//理论上来说,维度数据一定要比事实数据先到,因为如果没有用户没有订单等信息,就不会有事实
|
||||||
|
//这件事情,可以人为的控制一下,比如先开flinkCDC后开Maxwell
|
||||||
|
@Override
|
||||||
|
public void processElement(JSONObject jsonObject, BroadcastProcessFunction<JSONObject, String, JSONObject>.ReadOnlyContext readOnlyContext, Collector<JSONObject> collector) throws Exception {
|
||||||
|
|
||||||
|
String table = jsonObject.getString("table");
|
||||||
|
String type = jsonObject.getString("type");
|
||||||
|
|
||||||
|
//注意:maxwell可以对历史数据进行处理,这时候type为bootstrap-insert,这时候需要修复
|
||||||
|
if (type.equals("bootstrap-insert")) {
|
||||||
|
type = "insert";
|
||||||
|
jsonObject.put("type", type);
|
||||||
|
}
|
||||||
|
|
||||||
|
String key = table + ":" + type;
|
||||||
|
|
||||||
|
|
||||||
|
//获取状态(只读)
|
||||||
|
ReadOnlyBroadcastState<String, TableProcess> broadcastState = readOnlyContext.getBroadcastState(mapStateDescriptor);
|
||||||
|
//从状态中获取配置信息
|
||||||
|
TableProcess tableProcess = broadcastState.get(key);
|
||||||
|
|
||||||
|
if (tableProcess != null) {
|
||||||
|
//在配置表中找到了该操作对应的配置
|
||||||
|
//判断是事实数据还是维度数据
|
||||||
|
String sinkTable = tableProcess.getSinkTable();
|
||||||
|
jsonObject.put("sink_table", sinkTable);
|
||||||
|
String sinkType = tableProcess.getSinkType();
|
||||||
|
if (sinkType.equals(TableProcess.SINK_TYPE_HBASE)) {
|
||||||
|
//是维度数据 放到维度侧输出流汇总
|
||||||
|
readOnlyContext.output(dimTag,jsonObject);
|
||||||
|
} else if (sinkType.equals(TableProcess.SINK_TYPE_KAFKA)) {
|
||||||
|
//事实数据 放入主流中
|
||||||
|
collector.collect(jsonObject);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//在配置表中没有该操作对应的配置
|
||||||
|
System.out.println("No this Key in TableProcess:" + key);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//处理广播流中的数据 flinkCDC从Mysql中读取配置信息
|
||||||
|
//s: {"database":"rt_gmall_realtime","data":{"name":"ssss","id":1},"type":"insert","table":"t_user"}
|
||||||
|
@Override
|
||||||
|
public void processBroadcastElement(String s, BroadcastProcessFunction<JSONObject, String, JSONObject>.Context context, Collector<JSONObject> collector) throws Exception {
|
||||||
|
//获取广播状态
|
||||||
|
BroadcastState<String, TableProcess> broadcastState = context.getBroadcastState(mapStateDescriptor);
|
||||||
|
//json格式字符串转为对象
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(s);
|
||||||
|
//获取配置表中一条配置信息
|
||||||
|
TableProcess tableProcess = JSON.parseObject(jsonObject.getString("data"), TableProcess.class);
|
||||||
|
String sourceTable = tableProcess.getSourceTable();
|
||||||
|
String operateType = tableProcess.getOperateType();
|
||||||
|
//数据类型 kafka-事实 hbase维度
|
||||||
|
String sinkType = tableProcess.getSinkType();
|
||||||
|
//主键
|
||||||
|
String sinkPk = tableProcess.getSinkPk();
|
||||||
|
//指定保留字段
|
||||||
|
String sinkColumns = tableProcess.getSinkColumns();
|
||||||
|
//指定输出目的地
|
||||||
|
String sinkTable = tableProcess.getSinkTable();
|
||||||
|
//指定建表扩展语句
|
||||||
|
String sinkExtend = tableProcess.getSinkExtend();
|
||||||
|
|
||||||
|
|
||||||
|
//如果说 读取到的配置信息是维度数据的话,那么提前在Hbase中创建维度表
|
||||||
|
if(sinkType.equals(TableProcess.SINK_TYPE_HBASE)&&"insert".equals(operateType)){
|
||||||
|
//如果是维度数据,且是insert,update就没必要在创建
|
||||||
|
checkTable(sinkTable,sinkPk,sinkColumns,sinkExtend);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//拼接key
|
||||||
|
String key = sourceTable + ":" + operateType;
|
||||||
|
//将配置信息放在状态中
|
||||||
|
broadcastState.put(key, tableProcess);
|
||||||
|
}
|
||||||
|
|
||||||
|
//处理配置数据的时候 提前建立维度表 create table if not exist 表空间.表名(字段名 数据类型)
|
||||||
|
private void checkTable(String sinkTable, String sinkPk, String sinkColumns, String sinkExtend) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.atguigu.gmall.realtime.beans;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@BelongsProject: rt-gmall-parent
|
||||||
|
*@BelongsPackage: com.atguigu.gmall.realtime.beans
|
||||||
|
*@Author: markilue
|
||||||
|
*@CreateTime: 2023-05-06 14:07
|
||||||
|
*@Description: TODO 配置表实体类
|
||||||
|
*@Version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class TableProcess {
|
||||||
|
|
||||||
|
//动态分流Sink常量 改为小写和脚本一致
|
||||||
|
public static final String SINK_TYPE_HBASE = "hbase";
|
||||||
|
public static final String SINK_TYPE_KAFKA = "kafka";
|
||||||
|
public static final String SINK_TYPE_CK = "clickhouse";
|
||||||
|
//来源表
|
||||||
|
String sourceTable;
|
||||||
|
//操作类型 insert,update,delete
|
||||||
|
String operateType;
|
||||||
|
//输出类型 hbase kafka
|
||||||
|
String sinkType;
|
||||||
|
//输出表(主题)
|
||||||
|
String sinkTable;
|
||||||
|
//输出字段
|
||||||
|
String sinkColumns;
|
||||||
|
//主键字段
|
||||||
|
String sinkPk;
|
||||||
|
//建表扩展
|
||||||
|
String sinkExtend;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>com.atguigu.rtgmall</groupId>
|
||||||
|
<artifactId>rt-gmall-parent</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<modules>
|
||||||
|
<module>gmall-realtime</module>
|
||||||
|
<module>gmall-logger</module>
|
||||||
|
<module>gmall-cdc</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
||||||
Loading…
Reference in New Issue