Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tanpu-community
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
探普后端
tanpu-community
Commits
37ea56f1
Commit
37ea56f1
authored
Aug 06, 2021
by
张辰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ranklog oss加上目录
parent
cd61f9f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
VisitSummaryManager.java
...java/com/tanpu/community/manager/VisitSummaryManager.java
+1
-1
RankLogService.java
...main/java/com/tanpu/community/service/RankLogService.java
+1
-1
No files found.
community-service/src/main/java/com/tanpu/community/manager/VisitSummaryManager.java
View file @
37ea56f1
...
@@ -31,7 +31,7 @@ public class VisitSummaryManager {
...
@@ -31,7 +31,7 @@ public class VisitSummaryManager {
@KafkaListener
(
topics
=
kafakTopic
)
@KafkaListener
(
topics
=
kafakTopic
)
public
void
updateVisitSummary
(
String
message
)
{
public
void
updateVisitSummary
(
String
message
)
{
// {"durMillsInc":10000,"ident":"AD7B8CE8-2DA4-4FB4-907F-C551B926BA5C","localDate":"2021-08-02","pageId":"p13503","refId":"88737580570230824","visitorId":"275321532031467520"}
// {"durMillsInc":10000,"ident":"AD7B8CE8-2DA4-4FB4-907F-C551B926BA5C","localDate":"2021-08-02","pageId":"p13503","refId":"88737580570230824","visitorId":"275321532031467520"}
log
.
info
(
"receive kafka msg: {}"
,
message
);
//
log.info("receive kafka msg: {}", message);
KafkaDurationUptMsg
msg
=
JSON
.
parseObject
(
message
,
KafkaDurationUptMsg
.
class
);
KafkaDurationUptMsg
msg
=
JSON
.
parseObject
(
message
,
KafkaDurationUptMsg
.
class
);
// ident在每次进入新页面 & 回退 的时候都会随机生成一个,所以用ident做唯一key即可。
// ident在每次进入新页面 & 回退 的时候都会随机生成一个,所以用ident做唯一key即可。
...
...
community-service/src/main/java/com/tanpu/community/service/RankLogService.java
View file @
37ea56f1
...
@@ -109,7 +109,7 @@ public class RankLogService {
...
@@ -109,7 +109,7 @@ public class RankLogService {
String
fileName
=
"ranklog_"
+
type
.
getCode
()
+
"_"
+
t
.
format
(
DateTimeFormatter
.
BASIC_ISO_DATE
)
+
"_"
+
idx
;
String
fileName
=
"ranklog_"
+
type
.
getCode
()
+
"_"
+
t
.
format
(
DateTimeFormatter
.
BASIC_ISO_DATE
)
+
"_"
+
idx
;
ByteArrayOutputStream
os
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
os
=
new
ByteArrayOutputStream
();
IOUtils
.
writeLines
(
logs
.
stream
().
map
(
JSON:
:
toJSONString
).
collect
(
Collectors
.
toList
()),
null
,
os
);
IOUtils
.
writeLines
(
logs
.
stream
().
map
(
JSON:
:
toJSONString
).
collect
(
Collectors
.
toList
()),
null
,
os
);
ossFileService
.
uploadFileNoRecord
(
os
.
toByteArray
(),
fileName
,
"txt"
,
""
);
ossFileService
.
uploadFileNoRecord
(
os
.
toByteArray
(),
fileName
,
"txt"
,
"
rankLog/
"
);
Thread
.
sleep
(
1000
);
Thread
.
sleep
(
1000
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment