├── .asf.yaml ├── .dockerignore ├── .gitignore ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── NOTICE ├── README.md ├── download.sh └── properties ├── accumulo.properties ├── log4j-monitor.properties └── log4j-service.properties /.asf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | # https://cwiki.apache.org/confluence/display/INFRA/git+-+.asf.yaml+features 21 | 22 | github: 23 | description: "Apache Accumulo Docker" 24 | homepage: https://accumulo.apache.org 25 | labels: 26 | - accumulo 27 | - big-data 28 | - docker 29 | - hacktoberfest 30 | features: 31 | wiki: false 32 | issues: true 33 | projects: true 34 | 35 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | *.md 3 | Dockerfile 4 | LICENSE 5 | NOTICE 6 | .asf.yml 7 | .dockerignore 8 | .gitignore 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.tar.gz 2 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 17 | 18 | # Contributing to the Accumulo Docker Image 19 | 20 | Contributions to the Accumulo Docker Image can be made by creating a pull request to 21 | this repo on GitHub. 22 | 23 | Before creating a pull request, follow the instructions in the [README.md] to build 24 | the image and use it to run Accumulo in Docker. 25 | 26 | For general instructions on contributing to Accumulo projects, check out the 27 | [Accumulo Contributor guide][contribute]. 28 | 29 | [README.md]: README.md 30 | [contribute]: https://accumulo.apache.org/contributor/ 31 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | ## 18 | ## Base image. Rocky Linux 9 with updates, JRE 11 headless, and updated CA certs. 19 | ## 20 | FROM rockylinux:9 as base 21 | 22 | RUN set -eux; \ 23 | yum install -y ca-certificates java-11-openjdk-headless && \ 24 | update-ca-trust extract && \ 25 | yum clean all && \ 26 | rm -rf /var/cache/yum 27 | 28 | ## 29 | ## Base image for building. Adds wget, JDK and make (for building Accumulo native libs). 30 | ## 31 | FROM base as buildbase 32 | 33 | RUN set -eux; \ 34 | yum install -y java-11-openjdk-devel make gcc-c++ wget && \ 35 | update-ca-trust extract 36 | 37 | COPY download.sh /usr/local/bin/ 38 | 39 | ## 40 | ## Hadoop image. Download/copy and extract the Hadoop installation. 41 | ## 42 | FROM buildbase as hadoop 43 | 44 | ARG HADOOP_VERSION=3.3.6 \ 45 | HADOOP_FILE=_NOT_SET 46 | 47 | # Copy a known file along with the optional files (that might not exist). 48 | # The known file, along with '*' for the optional file allows the command 49 | # to succeed even if the optional file does not exist. If we used an empty 50 | # string for the optional file default value, then this command would copy 51 | # the entire build context, which is not what we want. 52 | COPY download.sh ${HADOOP_FILE}* /tmp/ 53 | 54 | RUN set -eux; \ 55 | download.sh "${HADOOP_FILE}" "hadoop.tar.gz" "hadoop/core/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz"; \ 56 | tar xzf hadoop.tar.gz -C /tmp/; \ 57 | mv /tmp/hadoop-*/ /opt/hadoop; \ 58 | rm -rf /opt/hadoop/share/doc/hadoop 59 | 60 | ## 61 | ## Zookeeper image. Download/copy and extract the Zookeeper installation. 62 | ## 63 | FROM buildbase as zookeeper 64 | 65 | ARG ZOOKEEPER_VERSION=3.8.2 \ 66 | ZOOKEEPER_FILE=_NOT_SET 67 | # Copy a known file along with the optional files (that might not exist). 68 | # The known file, along with '*' for the optional file allows the command 69 | # to succeed even if the optional file does not exist. If we used an empty 70 | # string for the optional file default value, then this command would copy 71 | # the entire build context, which is not what we want. 72 | COPY download.sh ${ZOOKEEPER_FILE}* /tmp/ 73 | 74 | RUN set -eux; \ 75 | download.sh "${ZOOKEEPER_FILE}" "zookeeper.tar.gz" "zookeeper/zookeeper-$ZOOKEEPER_VERSION/apache-zookeeper-$ZOOKEEPER_VERSION-bin.tar.gz"; \ 76 | tar xzf zookeeper.tar.gz -C /tmp/; \ 77 | mv /tmp/apache-zookeeper-*/ /opt/zookeeper 78 | 79 | ## 80 | ## Accumulo image. Download/copy and extract the Accumulo installation, build native libs, and copy in properties. 81 | ## 82 | FROM buildbase as accumulo 83 | 84 | ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk 85 | 86 | ARG ACCUMULO_VERSION=2.1.2 \ 87 | ACCUMULO_FILE=_NOT_SET 88 | # Copy a known file along with the optional files (that might not exist). 89 | # The known file, along with '*' for the optional file allows the command 90 | # to succeed even if the optional file does not exist. If we used an empty 91 | # string for the optional file default value, then this command would copy 92 | # the entire build context, which is not what we want. 93 | COPY download.sh ${ACCUMULO_FILE}* /tmp/ 94 | 95 | RUN set -eux; \ 96 | download.sh "${ACCUMULO_FILE}" "accumulo.tar.gz" "accumulo/$ACCUMULO_VERSION/accumulo-$ACCUMULO_VERSION-bin.tar.gz"; \ 97 | tar xzf accumulo.tar.gz -C /tmp/; \ 98 | mv /tmp/accumulo-*/ /opt/accumulo; \ 99 | /opt/accumulo/bin/accumulo-util build-native 100 | 101 | ADD properties/ /opt/accumulo/conf/ 102 | 103 | ## 104 | ## Final image. Copy extracted/built installations for hadoop, zookeeper, and accumulo. 105 | ## Also set environment variables and entrypoint. 106 | ## 107 | FROM base 108 | 109 | ARG HADOOP_USER_NAME=accumulo 110 | ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk \ 111 | HADOOP_HOME=/opt/hadoop \ 112 | HADOOP_USER_NAME=$HADOOP_USER_NAME \ 113 | ZOOKEEPER_HOME=/opt/zookeeper \ 114 | ACCUMULO_HOME=/opt/accumulo \ 115 | PATH="$PATH:/opt/accumulo/bin" 116 | 117 | COPY --from=hadoop /opt/hadoop /opt/hadoop 118 | COPY --from=zookeeper /opt/zookeeper /opt/zookeeper 119 | COPY --from=accumulo /opt/accumulo /opt/accumulo 120 | 121 | ENTRYPOINT ["accumulo"] 122 | CMD ["help"] 123 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache Accumulo Docker 2 | Copyright 2019 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Apache Accumulo Docker Image 2 | 3 | This is the first release of this project. Eventually, this project will create an `apache/accumulo` image at DockerHub. 4 | Until then, you will need to build your own image. The main branch of this repo creates a Docker image for 5 | Accumulo 2.0+. If you want to create a Docker image for Accumulo 1.9, there is a 6 | [1.9 branch](https://github.com/apache/accumulo-docker/tree/1.9) for that. 7 | 8 | ## Obtain the Docker image 9 | 10 | To obtain the docker image created by this project, you can either pull it from DockerHub at 11 | `apache/accumulo` or build it yourself. To pull the image from DockerHub, run the command below: 12 | 13 | docker pull apache/accumulo 14 | 15 | While it is easier to pull from DockerHub, the image will default to the software versions below: 16 | 17 | | Software | Version | 18 | |-------------|---------------| 19 | | [Accumulo] | 2.1.2 | 20 | | [Hadoop] | 3.3.6 | 21 | | [ZooKeeper] | 3.8.2 | 22 | 23 | If these versions do not match what is running on your cluster, you should consider building 24 | your own image with matching versions. However, Accumulo must be 2.0.0+. Below are instructions for 25 | building an image: 26 | 27 | 1. Clone the Accumulo docker repo 28 | 29 | git clone git@github.com:apache/accumulo-docker.git 30 | 31 | 2. Build the default Accumulo docker image using the command below. 32 | 33 | cd /path/to/accumulo-docker 34 | docker build -t accumulo . 35 | 36 | Or build the Accumulo docker image with specific released versions of Hadoop, Zookeeper, etc that will downloaded from Apache using the command below: 37 | 38 | docker build --build-arg ZOOKEEPER_VERSION=3.4.8 --build-arg HADOOP_VERSION=2.7.0 -t accumulo . 39 | 40 | Or build with an Accumulo tarball (located in same directory as DockerFile) using the command below: 41 | 42 | docker build --build-arg ACCUMULO_FILE=accumulo--bin.tar.gz -t accumulo . 43 | 44 | ## Image basics 45 | 46 | The entrypoint for the Accumulo docker image is the `accumulo` script. While the primary use 47 | case for this image is to start Accumulo processes (i.e tserver, master, etc), you can run other 48 | commands in the `accumulo` script to test out the image: 49 | 50 | ```bash 51 | # No arguments prints Accumulo command usage 52 | docker run accumulo 53 | # Print Accumulo version 54 | docker run accumulo version 55 | # Print Accumulo classpath 56 | docker run accumulo classpath 57 | ``` 58 | 59 | # Run Accumulo using Docker 60 | 61 | Before you can run Accumulo services in Docker, you will need to install Accumulo, configure `accumulo.properties`, 62 | and initialize your instance with `--upload-accumulo-props`. This will upload configuration to Zookeeper and limit 63 | how much configuration needs to be set on the command line. 64 | 65 | ```bash 66 | $ accumulo init --upload-accumulo-props 67 | ... 68 | Uploading properties in accumulo.properties to Zookeeper. Properties that cannot be set in Zookeeper will be skipped: 69 | Skipped - instance.secret = 70 | Skipped - instance.volumes = hdfs://localhost:8020/accumulo 71 | Skipped - instance.zookeeper.host = localhost:2181 72 | Uploaded - table.durability = flush 73 | Uploaded - tserver.memory.maps.native.enabled = false 74 | Uploaded - tserver.readahead.concurrent.max = 64 75 | Uploaded - tserver.server.threads.minimum = 64 76 | Uploaded - tserver.walog.max.size = 512M 77 | ``` 78 | 79 | Any configuration that is skipped above will need to be passed in as a command line option to Accumulo services running 80 | in Docker containers. These options can be set in an environment variable which is used in later commands. 81 | 82 | ``` 83 | export ACCUMULO_CL_OPTS="-o instance.secret=mysecret -o instance.volumes=hdfs://localhost:8020/accumulo -o instance.zookeeper.host=localhost:2181" 84 | ``` 85 | 86 | The Accumulo docker image expects that the HDFS path set by `instance.volumes` is owned by the `accumulo` user. This 87 | can be accomplished by running the command below (replace the HDFS path with yours): 88 | 89 | ```bash 90 | hdfs dfs -chown -R accumulo hdfs://localhost:8020/accumulo 91 | ``` 92 | 93 | ## Docker engine 94 | 95 | Use the `docker` command to start local docker containers. The commands below will start a local Accumulo cluster 96 | with two tablet servers. 97 | 98 | ``` 99 | docker run -d --network="host" accumulo monitor $ACCUMULO_CL_OPTS 100 | docker run -d --network="host" accumulo tserver $ACCUMULO_CL_OPTS 101 | docker run -d --network="host" accumulo tserver $ACCUMULO_CL_OPTS 102 | docker run -d --network="host" accumulo master $ACCUMULO_CL_OPTS 103 | docker run -d --network="host" accumulo gc $ACCUMULO_CL_OPTS 104 | ``` 105 | 106 | If you would like to set Java heap size inside the Docker container, start the local docker container using the 107 | command below: 108 | 109 | ``` 110 | docker run -e ACCUMULO_JAVA_OPTS='-Xmx1g' -d --network="host" accumulo tserver $ACCUMULO_CL_OPTS 111 | ``` 112 | 113 | ## Marathon 114 | 115 | Using the Marathon UI, you can start Accumulo services using the following 116 | JSON configuration template. The template is configured to start an Accumulo 117 | monitor but it can be modified to start other Accumulo services such as 118 | `master`, `tserver` and `gc`. For tablet servers, set `instances` to the number 119 | of tablet servers that you want to run. 120 | 121 | ```json 122 | { 123 | "id": "accumulo-monitor", 124 | "cmd": "accumulo monitor -o instance.secret=mysecret -o instance.volumes=hdfs://localhost:8020/accumulo -o instance.zookeeper.host=localhost:2181", 125 | "cpus": 1, 126 | "mem": 512, 127 | "disk": 0, 128 | "instances": 1, 129 | "container": { 130 | "docker": { 131 | "image": "apache/accumulo", 132 | "network": "HOST" 133 | }, 134 | "type": "DOCKER" 135 | } 136 | } 137 | ``` 138 | 139 | [Accumulo]: https://accumulo.apache.org/ 140 | [Hadoop]: https://hadoop.apache.org/ 141 | [ZooKeeper]: https://zookeeper.apache.org/ 142 | -------------------------------------------------------------------------------- /download.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | set -euo pipefail 19 | 20 | APACHE_DIST_URLS=( 21 | "https://www.apache.org/dyn/closer.cgi?action=download&filename=" 22 | # if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ 23 | "https://www-us.apache.org/dist/" 24 | "https://www.apache.org/dist/" 25 | "https://archive.apache.org/dist/" 26 | ) 27 | 28 | download() { 29 | local f="$1"; shift 30 | local distFile="$1"; shift 31 | local success= 32 | local distUrl= 33 | for distUrl in "${APACHE_DIST_URLS[@]}"; do 34 | echo "Attempting to fetch $f from $distUrl$distFile" 35 | if wget -nv -O "$f" "$distUrl$distFile"; then 36 | success=1 37 | break 38 | fi 39 | done 40 | [ -n "$success" ] 41 | } 42 | 43 | existing_file=$1 44 | download_file=$2 45 | dist_file=$3 46 | 47 | if [[ "$existing_file" == "_NOT_SET" ]]; then 48 | download "$download_file" "$dist_file" 49 | else 50 | [ -f "/tmp/$existing_file" ] || { echo "Existing file $existing_file does not exist"; exit 1; } 51 | echo "Skipping download of $existing_file" 52 | mv "/tmp/$existing_file" "$download_file" 53 | fi 54 | -------------------------------------------------------------------------------- /properties/accumulo.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # This is the main configuration file for Apache Accumulo. Available configuration properties can be 17 | # found in the Accumulo documentation on the Accumulo project website (https://accumulo.apache.org/) 18 | # Link for Accumulo 2.0: https://accumulo.apache.org/docs/2.0/administration/properties 19 | 20 | ## Sets location in HDFS where Accumulo will store data 21 | instance.volumes=hdfs://localhost:8020/accumulo 22 | 23 | ## Sets location of Zookeepers 24 | instance.zookeeper.host=localhost:2181 25 | 26 | ## Change secret before initialization. All Accumulo servers must have same secret 27 | instance.secret=DEFAULT 28 | 29 | ## Set to false if 'accumulo-util build-native' fails 30 | tserver.memory.maps.native.enabled=true 31 | 32 | ## Trace user 33 | trace.user=root 34 | 35 | ## Trace password 36 | trace.password=secret 37 | 38 | ## Search for available port if default is unavailable 39 | tserver.port.search=true 40 | -------------------------------------------------------------------------------- /properties/log4j-monitor.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | ## Log4j 1.2 file that configures logging for Accumulo Monitor 17 | ## The system properties referenced below are configured by accumulo-env.sh 18 | 19 | ## Define a console appender 20 | log4j.appender.console=org.apache.log4j.ConsoleAppender 21 | log4j.appender.console.Target=System.out 22 | log4j.appender.console.Threshold=ALL 23 | log4j.appender.console.layout.ConversionPattern=%d{ISO8601} [%-8c{2}] %-5p: %m%n 24 | log4j.appender.console.layout=org.apache.log4j.PatternLayout 25 | 26 | ## Define an appender for the Accumulo Monitor to log to its own web GUI 27 | log4j.appender.gui=org.apache.accumulo.server.monitor.LogService 28 | log4j.appender.gui.Threshold=WARN 29 | 30 | ## Append monitor logs to its own web GUI 31 | log4j.logger.org.apache.accumulo=INHERITED, gui 32 | 33 | ## Append most logs to file 34 | log4j.rootLogger=INFO, console 35 | -------------------------------------------------------------------------------- /properties/log4j-service.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | ## Log4j 1.2 file that configures logging for all Accumulo services (Master, TabletServer, GC, and Tracer) except Monitor 17 | ## The system properties referenced below are configured by accumulo-env.sh 18 | 19 | ## Define a console appender 20 | log4j.appender.console=org.apache.log4j.ConsoleAppender 21 | log4j.appender.console.Target=System.out 22 | log4j.appender.console.Threshold=ALL 23 | log4j.appender.console.layout.ConversionPattern=%d{ISO8601} [%-8c{2}] %-5p: %m%n 24 | log4j.appender.console.layout=org.apache.log4j.PatternLayout 25 | 26 | ## Define an appender to send important logs to the the primary Accumulo Monitor 27 | ## The primary monitor is the one currently holding a shared lock in ZooKeeper, 28 | ## and is typically the one that started first. 29 | log4j.appender.monitor=org.apache.accumulo.monitor.util.AccumuloMonitorAppender 30 | log4j.appender.monitor.Threshold=WARN 31 | 32 | ## Change this log level from OFF to one of the following to enable audit logging: 33 | ## INFO 34 | ## enables audit logging (inherit appenders from root logger) 35 | ## INFO, audit 36 | ## enables audit logging using the audit log appender 37 | ## (requires audit log file appender above to be uncommented) 38 | log4j.logger.org.apache.accumulo.audit=OFF 39 | 40 | ## Append logs to the primary Accumulo Monitor 41 | log4j.logger.org.apache.accumulo=INHERITED, monitor 42 | 43 | ## Constrain some particularly spammy loggers 44 | log4j.logger.org.apache.accumulo.core.file.rfile.bcfile=INFO 45 | log4j.logger.org.mortbay.log=WARN 46 | log4j.logger.org.apache.zookeeper=ERROR 47 | 48 | ## Append most logs to console 49 | log4j.rootLogger=INFO, console 50 | --------------------------------------------------------------------------------