Apache Drill启用Hive插件失败及正确启动方法咨询
Hey there! Let's work through your Apache Drill and Hive setup issues together—since you're new to Drill, I'll break this down step by step to keep things clear.
1. Correct Ways to Start Apache Drill
First, let's cover the two common deployment modes, since you asked about proper startup:
Embedded Mode (Great for Testing/Single Node)
This is the simplest way to get started:
- Navigate to your Apache Drill installation directory
- Run this command in your terminal:
bin/drill-embedded
Once it's running, you can access the web console at http://localhost:8047
Distributed Mode (Cluster Deployment)
If you're setting up Drill across multiple nodes:
- First, edit the
conf/drill-override.conffile to configure your ZooKeeper cluster (skip this if using Drill's embedded ZK for small clusters):drill.exec: { cluster-id: "drill-cluster-1", zk.connect: "zk-node-1:2181,zk-node-2:2181,zk-node-3:2181" } - On every Drill node in your cluster, start the Drillbit service:
bin/drillbit.sh start - Access the web console via any Drill node's IP:
http://<drill-node-ip>:8047
2. Fixing Hive Plugin Enablement Errors
Since only the Hive plugin is throwing errors (others work fine), this is almost certainly a configuration mismatch or access issue. Let's troubleshoot:
Step 1: Ensure Drill Can Access Hive's Configuration
- Copy your
hive-site.xmlfile into Drill'sconfdirectory. This lets Drill pick up your Hive metastore and warehouse settings automatically. - Double-check that the user running Drill has read permissions on this file.
Step 2: Manually Configure the Hive Plugin (Instead of Web Console "Enable")
Sometimes the one-click "Enable" option in the web console fails due to default config mismatches. Try updating the plugin manually:
- Go to the Storage tab in the Drill web console
- Find the Hive plugin in the list and click Update
- Replace the default JSON config with one tailored to your Hive environment. Here's a basic example—adjust values to match your setup:
{ "type": "hive", "enabled": true, "configProps": { "hive.metastore.uris": "thrift://<your-hive-metastore-host>:9083", "hive.metastore.warehouse.dir": "/user/hive/warehouse", "hive.metastore.sasl.enabled": "false" } }- Replace
<your-hive-metastore-host>with the actual hostname/IP of your Hive metastore server - If your Hive uses Kerberos authentication, add the required Kerberos properties here (like
hive.metastore.kerberos.principal, etc.)
- Replace
- Click Update to save the config. Check your terminal/Drill logs for any new errors.
Step 3: Verify Hive Metastore & Permissions
- Make sure your Hive Metastore service is running: Run
ps aux | grep metastorein your terminal. If it's not running, start it withhive --service metastore & - Confirm the Drill user has access to your Hive warehouse directory (whether it's on HDFS or local storage). For HDFS, use
hdfs dfs -ls /user/hive/warehouseto check permissions. - If you're using a Hadoop distribution like CDH or HDP, ensure there's no version conflict between Drill's built-in Hive libraries and your cluster's Hive version. You may need to replace Drill's Hive JARs with ones matching your cluster's Hive version (place them in Drill's
jars/3rdpartydirectory).
3. Next Steps If Issues Persist
Since you didn't share the exact error message from your terminal, the most helpful next step is to:
- Check Drill's log file (located at
logs/drillbit.login your Drill installation directory) for the full error stack trace. This will pinpoint exactly what's failing (e.g., metastore connection, permission denied, version mismatch). - Confirm your Hive version is compatible with your Drill version (Drill 1.20+ supports Hive 3.x; older Drill versions work best with Hive 2.x).
内容的提问来源于stack exchange,提问作者sabbisetty bhagavan

