I'm trying to integrate HMS Standalone version and Apache Ranger Hive Plug-in. I've compiled the ranger-2.4.0-hive-plugin from source code of Ranger 2.4.0.
Situation:
- Ranger Admin runs as Docker.
- Hive Metastore Standalone is also runs in Docker with Hive Plugin enabled.
Ranger Plugin for hive has been enabled. Please restart hive to ensure that changes are effective.
I can verify the installation with this message.
There is no connection problem between two container. I can verify it the command;
curl -u user:pass -X GET http://ranger_host:port/service/public/v2/api/service/ |jq
Both systems are up and running (as containerized). I've set log level to TRACE via log4j.But I can not see anything the HMS logs related to Apache Ranger Hive Plugin.
But /etc/ranger/hmstest/policycache directory is empty. Also Ranger logs does not container any exception related to HMS.
I can get the policy via Rest API Ranger for hmstest service. hmstest is defined as Hadoop SQL Service in Ranger Admin.
But it seems there is no agent to get policies on Hive Metastore Standalone Service.
I am using open jdk 11. Also I verified the metastore-site.xml and it containers Ranger Related configurations.
Any idea, what can cause the problem?
You are trying to enforce standalone Hive Metastore (HMS) directly, but Ranger enforces security for Hive through Hive Server2 (HS2). If your goal is to achieve direct enforcement for the metastore, you have two options:
ranger-2.4.0-hive-plugin
.Apache Ranger community has not take any specific actions regarding HMS integration, and the second option might be challenging. However, if configured correctly, you should see HMS as a service in the Ranger Admin UI as below: