Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
spring-boot-starter-dsp
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
shenjiaqing
spring-boot-starter-dsp
Commits
02b72d3e
Commit
02b72d3e
authored
Jul 05, 2023
by
wangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加warn抽样日志
parent
76853267
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
+22
-4
build.gradle
build.gradle
+2
-2
SamplerLog.java
...com/duiba/spring/boot/starter/dsp/sampler/SamplerLog.java
+18
-0
RedisBloomHandler.java
...duiba/spring/boot/starter/dsp/util/RedisBloomHandler.java
+2
-2
No files found.
build.gradle
View file @
02b72d3e
buildscript
{
buildscript
{
ext
[
"duibaExtVersion"
]
=
"2.0.0-h
45
"
ext
[
"duibaExtVersion"
]
=
"2.0.0-h
86
"
ext
[
"springBootVersion"
]
=
"2.2.7.RELEASE"
ext
[
"springBootVersion"
]
=
"2.2.7.RELEASE"
ext
[
"springCloudVersion"
]
=
"Hoxton.SR6"
ext
[
"springCloudVersion"
]
=
"Hoxton.SR6"
ext
[
"hazelcast.version"
]
=
"3.11"
ext
[
"hazelcast.version"
]
=
"3.11"
...
@@ -38,7 +38,7 @@ allprojects {
...
@@ -38,7 +38,7 @@ allprojects {
}
}
group
=
"cn.com.duiba.boot"
group
=
"cn.com.duiba.boot"
version
=
"0.0.5
7
"
version
=
"0.0.5
8
"
}
}
subprojects
{
subprojects
{
...
...
spring-boot-starter-dsp-sampler/src/main/java/cn/com/duiba/spring/boot/starter/dsp/sampler/SamplerLog.java
View file @
02b72d3e
...
@@ -92,6 +92,24 @@ public class SamplerLog {
...
@@ -92,6 +92,24 @@ public class SamplerLog {
info
(
format
,
arguments
);
info
(
format
,
arguments
);
}
}
public
static
void
warn
(
String
format
,
Object
...
arguments
)
{
try
{
if
(
infoFlag
())
{
logger
.
warn
(
"samplingId-"
+
LOCAL
.
get
()
+
","
+
format
,
arguments
);
}
}
catch
(
Exception
e
)
{
logger
.
warn
(
"SamplerLog info error"
,
e
);
}
}
public
static
void
warn
(
boolean
fullFlag
,
String
format
,
Object
...
arguments
)
{
if
(
fullFlag
)
{
logger
.
warn
(
format
,
arguments
);
return
;
}
warn
(
format
,
arguments
);
}
public
static
void
end
()
{
public
static
void
end
()
{
LOCAL
.
remove
();
LOCAL
.
remove
();
}
}
...
...
spring-boot-starter-dsp-util/src/main/java/cn/com/duiba/spring/boot/starter/dsp/util/RedisBloomHandler.java
View file @
02b72d3e
...
@@ -225,8 +225,8 @@ public class RedisBloomHandler<K, V> {
...
@@ -225,8 +225,8 @@ public class RedisBloomHandler<K, V> {
* @return
* @return
*/
*/
public
Integer
saveBloom
(
String
key
,
String
value
,
Integer
levelCount
)
{
public
Integer
saveBloom
(
String
key
,
String
value
,
Integer
levelCount
)
{
String
luaText
=
"local a = "
+
(
levelCount
+
1
)
+
"\n"
+
String
luaText
=
"local a = "
+
levelCount
+
"\n"
+
"for i = 1,
#(ARGV)+1
do\n"
+
"for i = 1,
(ARGV[2])
do\n"
+
" if(redis.call('BF.ADD', KEYS[1], (ARGV[1] .. '_' .. i)) == 1) then\n"
+
" if(redis.call('BF.ADD', KEYS[1], (ARGV[1] .. '_' .. i)) == 1) then\n"
+
" a = i;\n"
+
" a = i;\n"
+
" break;\n"
+
" break;\n"
+
...
...
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