You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fluo.apache.org by mw...@apache.org on 2019/12/17 14:16:19 UTC
[fluo-uno] branch master updated: Fixes #237 - Create
'accumulo-proxy' plugin (#238)
This is an automated email from the ASF dual-hosted git repository.
mwalch pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/fluo-uno.git
The following commit(s) were added to refs/heads/master by this push:
new e928f60 Fixes #237 - Create 'accumulo-proxy' plugin (#238)
e928f60 is described below
commit e928f60eb9da43abe3f9cbf77e973ed590e8da18
Author: Mike Walch <mw...@apache.org>
AuthorDate: Tue Dec 17 09:16:09 2019 -0500
Fixes #237 - Create 'accumulo-proxy' plugin (#238)
* The plugin makes it easy to run the Accumulo Proxy
---
README.md | 2 ++
bin/impl/kill.sh | 5 ++++-
conf/uno.conf | 5 +++++
plugins/accumulo-proxy.sh | 43 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 54 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index d424de1..e3797a0 100644
--- a/README.md
+++ b/README.md
@@ -167,6 +167,7 @@ These plugins can optionally execute after the `run` command for Accumulo and Fl
* `spark` - Install Apache Spark and start Spark's History server
* [Spark HistoryServer](http://localhost:18080/)
+* `accumulo-proxy` - Starts an [Accumulo Proxy] which enables Accumulo clients in other languages.
## Wipe command
@@ -200,3 +201,4 @@ configuring, initializing, and starting your application.
[logo]: contrib/uno-logo.png
[Muchos]: https://github.com/apache/fluo-muchos
[ssh-docs]: https://hadoop.apache.org/docs/r2.7.2/hadoop-project-dist/hadoop-common/SingleCluster.html#Setup_passphraseless_ssh
+[Accumulo Proxy]: https://github.com/apache/accumulo-proxy
diff --git a/bin/impl/kill.sh b/bin/impl/kill.sh
index cbb9d32..a0ebdd3 100755
--- a/bin/impl/kill.sh
+++ b/bin/impl/kill.sh
@@ -28,6 +28,9 @@ fi
if [[ -d "$INFLUXDB_HOME" ]]; then
pkill -f influxdb
fi
-if [[ -d "$GRAFNA_HOME" ]]; then
+if [[ -d "$GRAFANA_HOME" ]]; then
pkill -f grafana-server
fi
+if [[ -d "$PROXY_HOME" ]]; then
+ pkill -f accumulo\\.proxy\\.Proxy
+fi
diff --git a/conf/uno.conf b/conf/uno.conf
index ecf8a6b..4083ec0 100644
--- a/conf/uno.conf
+++ b/conf/uno.conf
@@ -159,6 +159,11 @@ export GRAFANA_VERSION=2.5.0
export GRAFANA_HOME=$INSTALL/grafana-"$GRAFANA_VERSION"
export GRAFANA_TARBALL=grafana-"$GRAFANA_VERSION".tar.gz
export GRAFANA_HASH=d3eaa2c45ae9f8e7424a7b0b74fa8c8360bd25a1f49545d8fb5a874ebf0530fe
+# Configuration for running 'accumulo-proxy' plugin
+export PROXY_REPO=/path/to/accumulo-proxy
+export PROXY_VERSION=2.0.0-SNAPSHOT
+export PROXY_TARBALL=accumulo-proxy-"$PROXY_VERSION"-bin.tar.gz
+export PROXY_HOME=$INSTALL/accumulo-proxy-"$PROXY_VERSION"
# Performance Profiles
# --------------------
diff --git a/plugins/accumulo-proxy.sh b/plugins/accumulo-proxy.sh
new file mode 100755
index 0000000..1b15c1a
--- /dev/null
+++ b/plugins/accumulo-proxy.sh
@@ -0,0 +1,43 @@
+#! /usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+source "$UNO_HOME"/bin/impl/util.sh
+
+TARBALL_PATH=$PROXY_REPO/target/$PROXY_TARBALL
+
+if [[ ! -f "$TARBALL_PATH" ]]; then
+ cd $PROXY_REPO/
+ mvn clean package -Ptarball
+fi
+
+print_to_console "Installing Accumulo Proxy at $PROXY_HOME"
+
+tar xzf "$TARBALL_PATH" -C "$INSTALL"
+
+$SED "s#instance[.]name=myinstance#instance.name=$ACCUMULO_INSTANCE#" "${PROXY_HOME}/conf/proxy.properties"
+$SED "s#instance[.]zookeepers=localhost:2181#instance.zookeepers=$UNO_HOST:2181#" "${PROXY_HOME}/conf/proxy.properties"
+$SED "s#auth[.]principal=#auth.principal=$ACCUMULO_USER#" "${PROXY_HOME}/conf/proxy.properties"
+$SED "s#auth[.]token=#auth.token=$ACCUMULO_PASSWORD#" "${PROXY_HOME}/conf/proxy.properties"
+
+mkdir -p "${INSTALL}/logs/accumulo-proxy"
+
+pkill -f accumulo\\.proxy\\.Proxy
+
+"$PROXY_HOME"/bin/accumulo-proxy -p "$PROXY_HOME"/conf/proxy.properties &> "${INSTALL}/logs/accumulo-proxy/accumulo-proxy.log" &
+
+print_to_console "Accumulo Proxy $PROXY_VERSION is running"
+print_to_console " * view logs at $INSTALL/logs/accumulo-proxy/"