Content-Length: 278964 | pFad | http://github.com/apache/iceberg/pull/10186/commits/ddb26a68bb15615a95dccf302c0c7ff6c9890662

BD Kafka-connect: Handle namespace creation for auto table creation by ajantha-bhat · Pull Request #10186 · apache/iceberg · GitHub
Skip to content
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

Kafka-connect: Handle namespace creation for auto table creation #10186

Merged
merged 3 commits into from
May 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address comments
  • Loading branch information
ajantha-bhat committed May 9, 2024
commit ddb26a68bb15615a95dccf302c0c7ff6c9890662
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.iceberg.catalog.TableIdentifier;
import org.apache.iceberg.connect.IcebergSinkConfig;
import org.apache.iceberg.exceptions.AlreadyExistsException;
import org.apache.iceberg.exceptions.ForbiddenException;
import org.apache.iceberg.exceptions.NoSuchTableException;
import org.apache.iceberg.relocated.com.google.common.annotations.VisibleForTesting;
import org.apache.iceberg.types.Type;
Expand Down Expand Up @@ -125,7 +126,7 @@ static void createNamespaceIfNotExist(Catalog catalog, Namespace identifierNames
Namespace namespace = Namespace.of(Arrays.copyOfRange(levels, 0, index + 1));
try {
((SupportsNamespaces) catalog).createNamespace(namespace);
Copy link
Contributor

@bryanck bryanck Apr 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can cause a ClassCastException so we should check that the catalog implements SupportsNamespaces first.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

} catch (AlreadyExistsException ex) {
} catch (AlreadyExistsException | ForbiddenException ex) {
// Ignoring the error as forcefully creating the namespace even if it exists
// to avoid double namespaceExists() check.
}
Expand Down








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/apache/iceberg/pull/10186/commits/ddb26a68bb15615a95dccf302c0c7ff6c9890662

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy