-
Notifications
You must be signed in to change notification settings - Fork 38
Change HDFS settings to easily allow Accumulo init #246
Description
In all docker-compose.yaml files that involve Accumulo, there's this comment on each Accumulo service:
gaffer-docker/docker/gaffer/docker-compose.yaml
Lines 82 to 86 in 61df018
| # There doesn't seem to be an easy way (with docker-compose) to init our | |
| # HDFS instance with the right permissions so that Accumulo can create the | |
| # file structure it needs. Using the following workaround to allow | |
| # accumulo to "auth" with HDFS as the super user so that it can: | |
| - HADOOP_USER_NAME=hadoop |
For Kubernetes the following is done to grant "the right permissions":
gaffer-docker/kubernetes/accumulo/values.yaml
Lines 29 to 32 in 61df018
| - hadoop fs -mkdir -p /accumulo | |
| - hadoop fs -chown accumulo /accumulo | |
| - hadoop fs -chmod 700 /accumulo | |
| - hadoop fs -ls / |
The claim that this cannot be done in docker-compose doesn't seem to be correct. It should be possible to run the same commands in the HDFS container when using docker-compose.
However, seeing as secure mode is not in use and the only client is Accumulo, there's very little point in using HDFS permissions. Disabling them (by setting dfs.permissions.enabled to false) removes the need for this workaround and this tedious repeating comment in many docker-compose.yaml files.