[accumulo] 01/01: Merge branch '1.10' into main

2020-10-14 Thread ctubbsii
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit 75b19431a1b5e3573a9a54d3874d745f100d3297
Merge: 3dae7d3 ecfa294
Author: Christopher Tubbs 
AuthorDate: Wed Oct 14 15:08:13 2020 -0400

Merge branch '1.10' into main

 assemble/bin/accumulo-util | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --cc assemble/bin/accumulo-util
index b0533c1,000..0280999
mode 100755,00..100755
--- a/assemble/bin/accumulo-util
+++ b/assemble/bin/accumulo-util
@@@ -1,220 -1,0 +1,220 @@@
 +#! /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.
 +#
 +
 +function print_usage {
 +  cat < ( ...)
 +
 +Commands:
 +  build-nativeBuilds Accumulo native libraries
 +  dump-zooDumps data in ZooKeeper
 +  gen-monitor-certGenerates Accumulo monitor certficate
 +  load-jars-hdfs  Loads Accumulo jars in lib/ to HDFS for VFS classloader
 +  
 +EOF
 +  exit 1
 +}
 +
 +function build_native() {
 +  final_native_target="$basedir/lib/native"
 +  if [[ -f "$final_native_target/libaccumulo.so" ]] || [[ -f 
"$final_native_target/libaccumulo.dylib" ]]; then
 +echo "Accumulo native library already exists in $final_native_target"
 +exit 0
 +  fi
 +
 +  native_tarballs=("$basedir"/lib/accumulo-native-*.tar.gz)
 +  if (( ${#native_tarballs[@]} > 1 )); then
 +echo "Found multiple native tar.gz files: ${native_tarballs[*]}"
 +exit 1
 +  fi
 +
 +  if [[ ! -f ${native_tarballs[0]} ]]; then
 +echo "Could not find native code artifact: ${native_tarballs[0]}" 1>&2
 +exit 1
 +  fi
 +
 +  # Make the destination for the native library
 +  mkdir -p "${final_native_target}" || exit 1
 +
 +  # Make a directory for us to unpack the native source into
-   TMP_DIR=$(mktemp -d /tmp/accumulo-native.) || exit 1
++  TMP_DIR=$(mktemp -d /tmp/accumulo-native.XX) || exit 1
 +
 +  # Unpack the tarball to our temp directory
 +  if ! tar xf "${native_tarballs[0]}" -C "${TMP_DIR}"
 +  then
 +  echo "Failed to unpack native tarball to ${TMP_DIR}"
 +  exit 1
 +  fi
 +
 +  # Move to the first (only) directory in our unpacked tarball
 +  native_dir=$(find "${TMP_DIR}" -maxdepth 1 -mindepth 1 -type d)
 +
 +  cd "${native_dir}" || exit 1
 +
 +  # Make the native library
 +  export USERFLAGS="$*"
 +  make || { echo 'Make failed!'; exit 1; }
 +
 +  # "install" the artifact
 +  cp libaccumulo.* "${final_native_target}" || exit 1
 +
 +  # Clean up our temp directory
 +  rm -rf "${TMP_DIR}"
 +
 +  echo "Successfully installed native library"
 +}
 +
 +function gen_monitor_cert() {
 +  if [[ -z "$JAVA_HOME" || ! -d "$JAVA_HOME" ]]; then
 +echo "JAVA_HOME=${JAVA_HOME} must be set and exist"
 +exit 1
 +  fi
 +
 +  ALIAS="default"
 +  KEYPASS=$(LC_CTYPE=C tr -dc '#-~' < /dev/urandom | tr -d '<>&' | head -c 20)
 +  STOREPASS=$(LC_CTYPE=C tr -dc '#-~' < /dev/urandom | tr -d '<>&' | head -c 
20)
 +  KEYSTOREPATH="${conf}/keystore.jks"
 +  TRUSTSTOREPATH="${conf}/cacerts.jks"
 +  CERTPATH="${conf}/server.cer"
 +
 +  if [[ -e "$KEYSTOREPATH" ]]; then
 + rm -i "$KEYSTOREPATH"
 + if [[ -e "$KEYSTOREPATH" ]]; then
 +echo "KeyStore already exists, exiting"
 +exit 1
 + fi
 +  fi
 +  if [[ -e "$TRUSTSTOREPATH" ]]; then
 + rm -i "$TRUSTSTOREPATH"
 + if [[ -e "$TRUSTSTOREPATH" ]]; then
 +echo "TrustStore already exists, exiting"
 +exit 2
 + fi
 +  fi
 +  if [[ -e "$CERTPATH" ]]; then
 + rm -i "$CERTPATH"
 + if [[ -e "$CERTPATH" ]]; then
 +echo "Certificate already exists, exiting"
 +exit 3
 +fi
 +  fi
 +
 +  "${JAVA_HOME}/bin/keytool" -genkey -alias "$ALIAS" -keyalg RSA -keypass 
"$KEYPASS" -storepass "$KEYPASS" -keystore "$KEYSTOREPATH"
 +  "${JAVA_HOME}/bin/keytool" -export -alias "$ALIAS" -storepass "$KEYPASS" 
-file "$CERTPATH" -keystore "$KEYSTOREPATH"
 +  "${JAVA_HOME}/bin/keytool" -import -v -trustcacerts -alias "$ALIAS" -file 
"$CERTPATH" -keystore "$TRUSTSTOREPATH" -storepass "$STOREPASS" <<< "yes"
 +
 +  echo
 +  echo "keystore and truststore generated.  now add the following to 
accumulo.properties:"
 +  echo
 +  echo "moni

[accumulo] branch main updated (3dae7d3 -> 75b1943)

2020-10-14 Thread ctubbsii
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git.


from 3dae7d3  #1631 - Tablet in memory compaction ID is updated before 
metadata write (#1670)
 add 9fedc5b  Update README.combiner
 add ecfa294  Use mktemp arg that works on on alpine-based distros (#1734)
 new 75b1943  Merge branch '1.10' into main

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 assemble/bin/accumulo-util | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[accumulo] branch 1.10 updated: Use mktemp arg that works on on alpine-based distros (#1734)

2020-10-14 Thread ctubbsii
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch 1.10
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/1.10 by this push:
 new ecfa294  Use mktemp arg that works on on alpine-based distros (#1734)
ecfa294 is described below

commit ecfa294ffa15b6eeb9d6b9aaf173f69eb4e0b547
Author: larsw 
AuthorDate: Wed Oct 14 20:42:54 2020 +0200

Use mktemp arg that works on on alpine-based distros (#1734)

* Fix build_native_library.sh so that it runs on alpine-based (e.g. 
Alpine)-based distros
* Fixes #1731
---
 assemble/bin/build_native_library.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/assemble/bin/build_native_library.sh 
b/assemble/bin/build_native_library.sh
index c2531ee..c82aeed 100755
--- a/assemble/bin/build_native_library.sh
+++ b/assemble/bin/build_native_library.sh
@@ -40,7 +40,7 @@ fi
 mkdir -p "${final_native_target}" || exit 1
 
 # Make a directory for us to unpack the native source into
-TMP_DIR=$(mktemp -d /tmp/accumulo-native.) || exit 1
+TMP_DIR=$(mktemp -d /tmp/accumulo-native.XX) || exit 1
 
 # Unpack the tarball to our temp directory
 tar xf "${native_tarball}" -C "${TMP_DIR}"



[accumulo] branch 1.10 updated: Update README.combiner

2020-10-14 Thread jmark99
This is an automated email from the ASF dual-hosted git repository.

jmark99 pushed a commit to branch 1.10
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/1.10 by this push:
 new 9fedc5b  Update README.combiner
9fedc5b is described below

commit 9fedc5b01a0fda4ef2671d3f4cab2b2399337609
Author: Mark Owens 
AuthorDate: Wed Oct 14 13:44:28 2020 -0400

Update README.combiner

Update readme to display missing output line from call to setiter.
---
 docs/src/main/resources/examples/README.combiner | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/docs/src/main/resources/examples/README.combiner 
b/docs/src/main/resources/examples/README.combiner
index f388e5b..26c701f 100644
--- a/docs/src/main/resources/examples/README.combiner
+++ b/docs/src/main/resources/examples/README.combiner
@@ -39,12 +39,14 @@ tar distribution.
 username@instance runners> setiter -t runners -p 10 -scan -minc -majc -n 
decStats -class org.apache.accumulo.examples.simple.combiner.StatsCombiner
 Combiner that keeps track of min, max, sum, and count
 --> set StatsCombiner parameter all, set to true to apply Combiner 
to every column, otherwise leave blank. if true, columns option will be 
ignored.:
---> set StatsCombiner parameter columns, [:]{,[:]} escape non aplhanum chars using %.: stat
+--> set StatsCombiner parameter columns, [:]{,[:]} escape non-alphanum chars using %.: stat
+--> set StatsCombiner parameter reduceOnFullCompactionOnly, If 
true, only reduce on full major compactions.  Defaults to false. :
 --> set StatsCombiner parameter radix, radix/base of the numbers: 
10
 username@instance runners> setiter -t runners -p 11 -scan -minc -majc -n 
hexStats -class org.apache.accumulo.examples.simple.combiner.StatsCombiner
 Combiner that keeps track of min, max, sum, and count
 --> set StatsCombiner parameter all, set to true to apply Combiner 
to every column, otherwise leave blank. if true, columns option will be 
ignored.:
---> set StatsCombiner parameter columns, [:]{,[:]} escape non aplhanum chars using %.: hstat
+--> set StatsCombiner parameter columns, [:]{,[:]} escape non-alphanum chars using %.: hstat
+--> set StatsCombiner parameter reduceOnFullCompactionOnly, If 
true, only reduce on full major compactions.  Defaults to false. : 
 --> set StatsCombiner parameter radix, radix/base of the numbers: 
16
 username@instance runners> insert 123456 name first Joe
 username@instance runners> insert 123456 stat marathon 240