Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Amazon-Selection-Data
Overview
Overview
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
abel_cjy
Amazon-Selection-Data
Commits
1425f4b3
Commit
1425f4b3
authored
Sep 15, 2026
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
964d93bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
templates.py
Pyspark_job/utils/templates.py
+3
-2
No files found.
Pyspark_job/utils/templates.py
View file @
1425f4b3
...
...
@@ -401,6 +401,7 @@ class Templates(object):
partition_data
=
self
.
get_kafka_partitions_data
(
consumer
=
consumer
,
topic_name
=
self
.
topic_name
)
consumer
.
close
()
# 覆盖topic全部分区(无遗漏分区start=end)
current_offsets
,
target_end_offsets
=
{},
{}
gap_total
=
0
for
pid
,
info
in
partition_data
.
items
():
...
...
@@ -408,9 +409,9 @@ class Templates(object):
begin_offset
=
info
[
'beginning_offsets'
]
if
committed
is
not
None
and
str
(
pid
)
in
committed
:
begin_offset
=
max
(
begin_offset
,
int
(
committed
[
str
(
pid
)]))
current_offsets
[
pid
]
=
begin_offset
target_end_offsets
[
pid
]
=
end_offset
if
end_offset
>
begin_offset
:
current_offsets
[
pid
]
=
begin_offset
target_end_offsets
[
pid
]
=
end_offset
gap_total
+=
end_offset
-
begin_offset
if
gap_total
==
0
:
...
...
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