Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
schbrain-parent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
schbrain-parent
Commits
81c0cca1
Commit
81c0cca1
authored
Dec 12, 2023
by
liaozan
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add log for starrocks
parent
37995567
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
starters/starrocks-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/starrocks/operation/StarrocksStreamLoadHandler.java
...igure/starrocks/operation/StarrocksStreamLoadHandler.java
+11
-2
No files found.
starters/starrocks-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/starrocks/operation/StarrocksStreamLoadHandler.java
View file @
81c0cca1
...
@@ -28,17 +28,26 @@ public class StarrocksStreamLoadHandler {
...
@@ -28,17 +28,26 @@ public class StarrocksStreamLoadHandler {
}
}
public
<
T
>
void
upsertBatch
(
List
<
T
>
entityList
,
List
<
String
>
columns
)
{
public
<
T
>
void
upsertBatch
(
List
<
T
>
entityList
,
List
<
String
>
columns
)
{
log
.
info
(
"Starrocks upsert, dataSize: {}, sample data: {}"
,
entityList
.
size
(),
entityList
.
get
(
0
));
String
content
=
JacksonUtils
.
toJsonString
(
entityList
);
String
content
=
JacksonUtils
.
toJsonString
(
entityList
);
String
upsertResult
=
createUpsertRequest
(
content
,
columns
).
execute
().
body
();
String
upsertResult
=
createUpsertRequest
(
content
,
columns
).
execute
().
body
();
log
.
debug
(
"Starrocks streamLoad upsert result: {}"
,
upsertResult
);
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"Starrocks streamLoad upsert result: {}"
,
upsertResult
);
}
checkResponse
(
upsertResult
);
checkResponse
(
upsertResult
);
}
}
public
<
T
>
void
deleteBatch
(
List
<
T
>
entityList
)
{
public
<
T
>
void
deleteBatch
(
List
<
T
>
entityList
)
{
log
.
info
(
"Starrocks delete, dataSize: {}, sample data: {}"
,
entityList
.
size
(),
entityList
.
get
(
0
));
String
content
=
JacksonUtils
.
toJsonString
(
entityList
);
String
content
=
JacksonUtils
.
toJsonString
(
entityList
);
String
deleteResult
=
createCommonRequest
(
content
).
header
(
"columns"
,
"__op='delete'"
).
execute
().
body
();
String
deleteResult
=
createCommonRequest
(
content
).
header
(
"columns"
,
"__op='delete'"
).
execute
().
body
();
log
.
debug
(
"Starrocks streamLoad delete result: {}"
,
deleteResult
);
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"Starrocks streamLoad delete result: {}"
,
deleteResult
);
}
checkResponse
(
deleteResult
);
checkResponse
(
deleteResult
);
}
}
...
...
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