[
https://issues.apache.org/jira/browse/IMPALA-14659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18050059#comment-18050059
]
guangxiji commented on IMPALA-14659:
------------------------------------
Thank you for the insight. I checked my environment setup, and you are
right—the issue is indeed related to how the classpath is constructed in my
deployment.
*1. Environment Context (systemd & impala-env.sh)* In my environment, I am
managing Impala services via {*}systemd{*}. Since systemd starts with a clean
environment, I am using a custom {{impala-env.sh}} (sourced by a wrapper
script) to manually construct the {{{}CLASSPATH{}}}.
[Unit]
Description=Impala Catalog Server
After=impala-state-store.service
[Service]
User=impala
Group=impala
Type=forking
ExecStart=/opt/impala/bin/impala.sh start catalogd
ExecStop=/opt/impala/bin/impala.sh stop catalogd
Restart=always
[Install]
WantedBy=multi-user.target
*2. The Classpath Conflict Logic* I realized that my manual concatenation logic
was the culprit. Even though I tried to add Impala's directories first, the use
of wildcards and the order of assignment caused the shadowing. Here is the
relevant snippet from my {{{}impala-env.sh{}}}:
# My manual setup in impala-env.sh
export IMPALA_HOME=/opt/impala
export HIVE_HOME=/opt/apache-hive-3.1.3-bin
# Step 1: Adding Impala jars (including flatbuffers-java-1.9.0.jar)
export CLASSPATH=$CLASSPATH:$IMPALA_HOME/lib/*.jar:$IMPALA_HOME/lib/jars/*.jar
# Step 2: Adding Hive jars via wildcard
# This is where flatbuffers-1.2.0.jar from Hive likely took precedence
# due to shell expansion order or specific classpath positioning.
export CLASSPATH=$CLASSPATH:$HIVE_HOME/lib/*
# Step 3: Explicitly pinning only certain jars to the front
export
CLASSPATH=/opt/impala/lib/libthrift-0.11.0.jar:/opt/impala/lib/guava-32.0.1-jre.jar:$CLASSPATH
> Impala 4.5 Iceberg table on Tencent Cloud COS fails with"failedto load 1
> paths" during metadata refresh.
> --------------------------------------------------------------------------------------------------------
>
> Key: IMPALA-14659
> URL: https://issues.apache.org/jira/browse/IMPALA-14659
> Project: IMPALA
> Issue Type: Improvement
> Components: Catalog
> Affects Versions: Impala 4.5.0
> Reporter: guangxiji
> Priority: Major
> Labels: catalog-server, newbie
> Attachments: image-2026-01-06-10-11-25-474.png, impala_log.txt
>
>
> I applied {{--max_nonhdfs_partitions_parallel_load=1}} and
> {{--max_hdfs_partitions_parallel_load=1}} to my {{catalogd_flags}} and
> restarted the service. Unfortunately, the issue persists even with
> single-threaded loading.
> It seems that in Impala 4.5, {{ParallelFileMetadataLoader}} encounters
> difficulties when processing metadata returned by the {{cosn://}} driver,
> regardless of the thread count. This suggests there might be a specific
> compatibility issue with how file/block metadata is interpreted for this
> storage scheme.
> Below are the raw logs from my session showing that {*}SHOW METADATA{*},
> {*}INSERT{*}, and *SELECT* all trigger the same metadata loading error:
> [9.192.163.17:21050] db_on_cos_test> SHOW METADATA TABLES IN
> iceberg_cos_employee_test;
> Query: SHOW METADATA TABLES IN iceberg_cos_employee_test
> 2026-01-05 22:28:58 [Exception] ERROR: Query
> 9349f0ef1c788ec2:8548051e00000000 failed:
> AnalysisException: Could not load table
> db_on_cos_test.iceberg_cos_employee_test from catalog
> ... (此处省略部分重复输出以保持简洁,或按您要求保留全部) ...
> CAUSED BY: TableLoadingException: Loading file and block metadata for 1 paths
> for table db_on_cos_test.iceberg_cos_employee_test: failed to load 1 paths.
> Check the catalog server log for more details.
> [9.192.163.17:21050] db_on_cos_test> INSERT INTO iceberg_cos_employee_test
> VALUES (1, '张三', '研发部', 15001.5, now());
> Query: INSERT INTO iceberg_cos_employee_test VALUES (1, '张三', '研发部', 15001.5,
> now())
> Query submitted at: 2026-01-05 22:29:08 (Coordinator:
> http://9.192.163.17:8080)
> 2026-01-05 22:29:08 [Exception] ERROR: Query
> ad4f18bf73bf1157:772c7c7600000000 failed:
> AnalysisException: org.apache.impala.catalog.TableLoadingException: Could not
> load table db_on_cos_test.iceberg_cos_employee_test from catalog
> ...
> CAUSED BY: TableLoadingException: Loading file and block metadata for 1 paths
> for table db_on_cos_test.iceberg_cos_employee_test: failed to load 1 paths.
> [9.192.163.17:21050] db_on_cos_test> select * from iceberg_cos_employee_test;
> Query: select * from iceberg_cos_employee_test
> Query submitted at: 2026-01-05 22:30:42 (Coordinator:
> http://9.192.163.17:8080)
> 2026-01-05 22:30:42 [Exception] ERROR: Query
> 274fea8afd3f9dde:8d9847ab00000000 failed:
> AnalysisException: Failed to load metadata for table:
> 'iceberg_cos_employee_test'
> ...
> CAUSED BY: TableLoadingException: Loading file and block metadata for 1 paths
> for table db_on_cos_test.iceberg_cos_employee_test: failed to load 1 paths.
> I have attached the full *catalogd logs* to this email for further
> investigation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]