-
Notifications
You must be signed in to change notification settings - Fork 15.4k
KAFKA-15030: Add connect-plugin-path command-line tool. #14064
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
gharris1727
merged 30 commits into
apache:trunk
from
gharris1727:kafka-15030-connect-plugin-path-script
Aug 11, 2023
Merged
Changes from 12 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
1c18e17
KAFKA-15030: Add connect-plugin-path command-line tool
gharris1727 417c264
fixup: remove unused variables
gharris1727 72cb970
fixup: remove NoManifestConverter
gharris1727 3f28fe6
fixup: review comments
gharris1727 b104153
fixup: restructure iteration to compute aliases across all scan results
gharris1727 3ab85d3
fixup: redo iteration with new Row construct, print summary table at …
gharris1727 c2f2755
Merge remote-tracking branch 'upstream/trunk' into kafka-15030-connec…
gharris1727 eff3247
fixup: add NonMigrated TestPlugins, fix NPE in enumerateRows
gharris1727 913589e
fixup: resolve OOM by preventing leaks of PluginSource objects via Row
gharris1727 2a8dfe9
fixup: change summary format to a column-oriented table
gharris1727 4366dd6
fixup: checkstyle
gharris1727 26330a7
fixup: checkstyle
gharris1727 85321f5
fixup: review comments
gharris1727 643ea94
fixup: fix URL uniqueness problem
gharris1727 f1adfe3
fixup: hide altered paths from table output
gharris1727 3f06205
fixup: false positive for multi-plugins
gharris1727 a404497
fixup: typo inverted condition
gharris1727 501159c
fixup: increase heap available to connect-plugin-path command
gharris1727 c477ee8
fixup: use null as classpath pluginLocation sentinel value, inject cl…
gharris1727 a18c83d
fixup: add warning for incompatible classpath plugins not present on …
gharris1727 ad8f26a
fixup: inject classpath string into PluginSource::location calls used…
gharris1727 d89b4e6
fixup: replace path uniqueness soln with counting soln
gharris1727 d00e6e1
Merge remote-tracking branch 'upstream' into kafka-15030-connect-plug…
gharris1727 c9b855b
fixup: Add assertions on list table output
gharris1727 9742d90
fixup: add javadocs for new test-plugins, add more interfaces to the …
gharris1727 1955722
fixup: move logging source.location() functionality to source.toString()
gharris1727 f858b9a
fixup: incorrect comment
gharris1727 b05dae6
fixup: checkstyle
gharris1727 9c1dc0e
fixup: revert changes to alias computation, only provide aliases for …
gharris1727 0d7077a
fixup: remove unnecessary functionality and warnings
gharris1727 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/bin/bash | ||
| # 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. | ||
|
|
||
| exec $(dirname $0)/kafka-run-class.sh org.apache.kafka.tools.ConnectPluginPath "$@" |
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,17 @@ | ||
| @echo off | ||
| rem Licensed to the Apache Software Foundation (ASF) under one or more | ||
| rem contributor license agreements. See the NOTICE file distributed with | ||
| rem this work for additional information regarding copyright ownership. | ||
| rem The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| rem (the "License"); you may not use this file except in compliance with | ||
| rem the License. You may obtain a copy of the License at | ||
| rem | ||
| rem http://www.apache.org/licenses/LICENSE-2.0 | ||
| rem | ||
| rem Unless required by applicable law or agreed to in writing, software | ||
| rem distributed under the License is distributed on an "AS IS" BASIS, | ||
| rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| rem See the License for the specific language governing permissions and | ||
| rem limitations under the License. | ||
|
|
||
| "%~dp0kafka-run-class.bat" org.apache.kafka.tools.ConnectPluginPath %* |
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
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
46 changes: 46 additions & 0 deletions
46
...ntime/src/test/resources/test-plugins/non-migrated/test/plugins/NonMigratedConverter.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,46 @@ | ||
| /* | ||
| * 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 test.plugins; | ||
|
|
||
| import org.apache.kafka.connect.data.Schema; | ||
| import org.apache.kafka.connect.data.SchemaAndValue; | ||
| import org.apache.kafka.connect.storage.Converter; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| /** | ||
| * Fake plugin class for testing classloading isolation. | ||
| * See {@link org.apache.kafka.connect.runtime.isolation.TestPlugins}. | ||
| * <p>Class which is not migrated to include a service loader manifest. | ||
| */ | ||
| public final class NonMigratedConverter implements Converter { | ||
|
|
||
| @Override | ||
| public void configure(final Map<String, ?> configs, final boolean isKey) { | ||
| } | ||
|
|
||
| @Override | ||
| public byte[] fromConnectData(final String topic, final Schema schema, final Object value) { | ||
| return new byte[0]; | ||
| } | ||
|
|
||
| @Override | ||
| public SchemaAndValue toConnectData(final String topic, final byte[] value) { | ||
| return null; | ||
| } | ||
| } |
57 changes: 57 additions & 0 deletions
57
...src/test/resources/test-plugins/non-migrated/test/plugins/NonMigratedHeaderConverter.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,57 @@ | ||
| /* | ||
| * 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 test.plugins; | ||
|
|
||
| import org.apache.kafka.common.config.ConfigDef; | ||
| import org.apache.kafka.connect.data.Schema; | ||
| import org.apache.kafka.connect.data.SchemaAndValue; | ||
| import org.apache.kafka.connect.storage.HeaderConverter; | ||
|
|
||
| import java.io.IOException; | ||
| import java.util.Map; | ||
|
|
||
| /** | ||
| * Fake plugin class for testing classloading isolation. | ||
| * See {@link org.apache.kafka.connect.runtime.isolation.TestPlugins}. | ||
| * <p>Class which is not migrated to include a service loader manifest. | ||
| */ | ||
| public class NonMigratedHeaderConverter implements HeaderConverter { | ||
|
|
||
| @Override | ||
| public SchemaAndValue toConnectHeader(String topic, String headerKey, byte[] value) { | ||
| return null; | ||
| } | ||
|
|
||
| @Override | ||
| public byte[] fromConnectHeader(String topic, String headerKey, Schema schema, Object value) { | ||
| return new byte[0]; | ||
| } | ||
|
|
||
| @Override | ||
| public ConfigDef config() { | ||
| return null; | ||
| } | ||
|
|
||
| @Override | ||
| public void close() throws IOException { | ||
| } | ||
|
|
||
| @Override | ||
| public void configure(Map<String, ?> configs) { | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.