Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
streamingUserPortrait
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵威
streamingUserPortrait
Commits
0a302563
Commit
0a302563
authored
Feb 05, 2021
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update printer
parent
28744592
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
Main.scala
src/main/scala/com.gmei.up/Main.scala
+1
-1
Redis.scala
src/main/scala/com.gmei.up/utils/Redis.scala
+1
-0
No files found.
src/main/scala/com.gmei.up/Main.scala
View file @
0a302563
...
...
@@ -18,7 +18,7 @@ class UserInfoDeserializationSchema extends KafkaDeserializationSchema[UserInfo]
override
def
deserialize
(
consumerRecord
:
ConsumerRecord
[
Array
[
Byte
]
,
Array
[
Byte
]])
:
UserInfo
=
{
val
info
=
new
String
(
consumerRecord
.
value
(),
"UTF-8"
)
println
(
info
)
//
println(info)
val
userInfo
:
UserInfo
=
JSON
.
parseObject
(
info
,
classOf
[
UserInfo
])
userInfo
}
...
...
src/main/scala/com.gmei.up/utils/Redis.scala
View file @
0a302563
...
...
@@ -16,6 +16,7 @@ object Redis {
contentF
.
foreach
{
seq
=>
val
ids
=
seq
.
map
(
c
=>
c
.
id
)
if
(
ids
.
size
>
0
)
{
println
(
ids
.
head
,
ids
.
tail
)
pRc4
.
lpush
(
key
,
ids
.
head
,
ids
.
tail
)
pRc4
.
expire
(
key
,
60
*
60
*
24
*
15
)
}
...
...
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