-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-4616] Adding PulsarSource to DeltaStreamer to support ingesting from Apache Pulsar
#6386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
5a6029a
Scaffolded `PulsarSource` for DeltaStreamer
e4e1649
Make `PulsarSource` to be properly configured
c4d6ccb
Implemented proper offset-handling
e2c9e3a
Fixing `DebeziumSource` to commit offsets to Kafka
9e590a2
Fixing compilation
f132f71
Make admin-endpoint URL configurable as well
7319ec3
Missing license
3d9823d
Make pulsar-spark-connector dep be provided
ebf95c6
Make sure "pulsar-client-api" is packaged into "hudi-utilities-bundle"
f9836a5
Fetch ending offset from Pulsar (batch API doesn't permit using "late…
0ffb51a
Fetch latest offset instead of using `MessageId.latest` shortcut
0c0aa09
Ack latest consumed offset
eed8b9b
Removing "pulsar-client" jars from "hudi-utilities-bundle" since they…
35eccfa
Fixing subscription to be exclusive to be able to ack "cumulatively"
ed2fd41
Canonicalize topic's name properly
7b892b3
Make `PulsarSource` closeable
16cf07e
Make `SourceFormatAdapter` closeable;
5565869
Worked around Pulsar's client failure to shutdown properly
871afb1
Generate unique subscription-id (for isolation);
a99ac5b
Tidying up
db7f5a2
Fixing compilation in Scala 2.11
1bf346e
Fixing subscription to always start at the beginning of the topic
7ab92ab
Fix pulsar-spark-connector version for Spark 2.x
7f0658d
Subscribe in `Durable` mode;
96b561f
Added `ThreadUtils`;
76f1335
Fixing compilation
a3ee924
Aligning configs w/ Kafka
d2e6816
Fixed dep configuration
f3399b4
Tidying up
b71d1a0
Reverting to previous Pulsar version
79ae2b3
Reverting unrelated changes
513b7d8
Added graceful shutdown timeout
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
hudi-common/src/main/java/org/apache/hudi/common/util/ThreadUtils.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.apache.hudi.common.util; | ||
|
|
||
| import java.util.Arrays; | ||
| import java.util.List; | ||
|
|
||
| public class ThreadUtils { | ||
|
|
||
| /** | ||
| * Fetches all active threads currently running in the JVM | ||
| */ | ||
| public static List<Thread> collectActiveThreads() { | ||
| ThreadGroup threadGroup = Thread.currentThread().getThreadGroup(); | ||
| while (threadGroup.getParent() != null) { | ||
| threadGroup = threadGroup.getParent(); | ||
| } | ||
|
|
||
| Thread[] activeThreads = new Thread[threadGroup.activeCount()]; | ||
| threadGroup.enumerate(activeThreads); | ||
|
|
||
| return Arrays.asList(activeThreads); | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the bundle needs to change too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, wondering how did you happen to test this change w/o the bundle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will have to be provided. We don't want to include this into our bundle (our bundles are neutral now, so we can't include it in "hudi-utilities-bundle")