
Skill
doris-debug-data-lake
debug Apache Doris data lake connectivity
Description
Use for Doris external catalog issues: Hive/Iceberg/Paimon/Hudi query failures, metadata refresh, filesystem S3/HDFS connectivity, external MV rewrite misses.
SKILL.md
Data Lake (Multi-Catalog)
Causes
| ID | Cause | Evidence | Source anchor |
|---|---|---|---|
| A | Metadata stale | Query returns old data / missing partitions after upstream write | HMSClient.java, CachedHMSClient.java |
| B | S3/HDFS connectivity | Access Denied, Timeout, NoSuchBucket | S3FileSystem.java, HdfsResource.java |
| C | External MV rewrite miss | EXPLAIN shows no MATERIALIZED_REWRITE | MTMVService.java rewrite rules |
| D | Schema mismatch | Parquet/ORC schema ≠ Hive Metastore schema | ParquetReader.cpp, schema merge |
| E | Credential / IAM expiry | STS / IAM token rotated; 403 on S3 | S3FileSystem.java credential refresh |
| F | Too many open files | FD exhaustion listing large table directories | BE ulimit -n, FileSystem.listFiles() |
10 min triage
-- Verify catalog is alive
SHOW CATALOGS;
-- Refresh metadata (hive / iceberg / paimon)
REFRESH CATALOG hive_catalog;
REFRESH DATABASE hive_catalog.db_name;
REFRESH TABLE hive_catalog.db_name.tbl_name;
-- Check if external MV rewrite is enabled
SET materialized_view_rewrite_enable_contain_external_table = true;
-- Analyze external table for CBO stats
ANALYZE TABLE hive_catalog.db_name.tbl_name;
# BE logs for S3/HDFS errors
./scripts/doris-debug log-grep be/log --query-id "$QID"
grep -r "403\|Access Denied\|Timeout\|NoSuchBucket\|Token.*expired" be/log/
# Check BE file descriptor limit
cat /proc/$BE_PID/limits | grep "open files"
Cause A — Metadata staleness
Hive Metastore metadata is cached; REFRESH CATALOG invalidates the cache. For large catalogs, prefer:
-- Refresh only the changed partition
REFRESH TABLE catalog.db.tbl PARTITION (dt='2026-07-15');
If refresh is slow, check HMSClient cache settings (fe.conf):
hive_metastore_client_timeout_second = 10
Cause B — S3/HDFS connectivity
# be.conf — S3 credential chain
aws_access_key_id = ...
aws_secret_access_key = ...
aws_region = us-east-1
# Test S3 reachability from BE host
curl -I "https://<bucket>.s3.<region>.amazonaws.com"
# fe.conf for HDFS catalog
hadoop_conf_dir = /path/to/hadoop/conf # must contain core-site.xml + hdfs-site.xml
Cause E — Credential rotation
For STS/AssumeRole-based S3 access, the cached credential may expire:
-- Force credential refresh (Doris 2.1+ / 3.0)
REFRESH CATALOG hive_catalog;
For long-running queries against external tables, ensure credential TTL > query timeout.
Source
fe/.../datasource/hive/HMSExternalCatalog.javafe/.../datasource/hive/HMSClient.javabe/src/io/fs/s3/S3FileSystem.cpp— S3 connectorbe/src/io/fs/hdfs/HdfsFileSystem.cpp— HDFS connectorbe/src/vec/exec/format/parquet/vparquet_reader.cpp— parquet readerfe/.../mtmv/MTMVService.java— external MV rewrite
More skills from the doris-skills repository
View all 14 skillsdoris-architecture-advisor
design Apache Doris data architectures
Jul 12ArchitectureData EngineeringData PipelineDatabasedoris-best-practices
optimize Apache Doris table design and clusters
Jul 12DatabaseEngineeringPerformancedoris-debug
diagnose Apache Doris production issues
Jul 25DebuggingMonitoringOperationsdoris-debug-cloud
debug Apache Doris cloud mode issues
Jul 25CloudDebuggingPerformancedoris-debug-compaction
resolve Apache Doris compaction lag
Jul 25DatabaseDebuggingPerformancedoris-debug-deployment
troubleshoot Apache Doris deployment failures
Jul 25DebuggingDeploymentOperations
More from Apache Software Foundation
View publisherdatafusion-python
write Apache DataFusion Python code
datafusion-python
Jul 12Data AnalysisPythonSQLbydbql
generate and execute BanyanDB BydbQL queries
skywalking-banyandb
Jul 12AnalyticsDatabaseSQLcompiling
compile and build BanyanDB projects
skywalking-banyandb
Jul 12BuildEngineeringgh-pull-request
create GitHub pull requests for BanyanDB
skywalking-banyandb
Jul 12GitHubPull Requestsvendor-update
update Go and Node.js vendor dependencies
skywalking-banyandb
Jul 12GoNode.jscayenne-cgen
generate Cayenne entity Java classes
cayenne
Jul 12Data ModelingJavaORM