Skip to content

[Bug] Malformed error message for unknown client pool cache key element #8638

Description

@thswlsqls

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version
master @ 711481b

Compute Engine
Hive

Minimal reproduce step
Create a Hive catalog with the client-pool-cache.keys option set to an unrecognized element without the conf: prefix, e.g. client-pool-cache.keys=conf (missing the colon). This reaches CachedClientPool.extractKey() (paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/pool/CachedClientPool.java line 179), whose switch default throws the diagnostic.

What doesn't meet your expectations?
Expected the error to read Unknown key element conf. Actual message is Unknown key element %sconf: new RuntimeException("Unknown key element %s" + trimmed) uses RuntimeException(String), which performs no %s substitution, so the literal %s is emitted and trimmed is concatenated after it.

Anything else?
Sibling diagnostics in the same method (lines 162-165, 172-175) use Preconditions.checkArgument(..., "...%s...", arg) where %s is a real Guava-style placeholder; only the raw RuntimeException at line 179 is unformatted. Fix: drop the literal %s and concatenate trimmed directly.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions