accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <>
Subject [GitHub] accumulo pull request #230: Accumulo-4599 Simplify how accumulo script adds ...
Date Tue, 07 Mar 2017 22:44:24 GMT
Github user keith-turner commented on a diff in the pull request:
    --- Diff: assemble/bin/accumulo ---
    @@ -59,43 +59,22 @@ function main() {
       export ACCUMULO_CONF_DIR="$conf"
       # Verify setting in
       : "${JAVA_OPTS:?"variable is not set in"}"
       : "${ACCUMULO_LOG_DIR:?"variable is not set in"}"
       mkdir -p "${ACCUMULO_LOG_DIR}" 2>/dev/null
    -  verify_env_dir "ACCUMULO_LOG_DIR" "${ACCUMULO_LOG_DIR}"
       verify_env_dir "HADOOP_PREFIX" "${HADOOP_PREFIX}"
       verify_env_dir "HADOOP_CONF_DIR" "${HADOOP_CONF_DIR}"
       verify_env_dir "ZOOKEEPER_HOME" "${ZOOKEEPER_HOME}"
       : "${MALLOC_ARENA_MAX:?"variable is not set in"}"
    -  # ACCUMULO_XTRAJARS is where all of the commandline -add items go into for reading
by accumulo.
    -  # It also holds the JAR run with the jar command and, if possible, any items in the
JAR manifest's Class-Path.
    +  CLASSPATH="${lib}/accumulo-start.jar:${conf}:${lib}/slf4j-api.jar:${lib}/slf4j-log4j12.jar:${lib}/log4j.jar:${CLASSPATH}"
       if [[ "$cmd" = "-add" ]]; then
    -    export ACCUMULO_XTRAJARS="$2"
    +    CLASSPATH="${2}:${CLASSPATH}"
         shift 2
    -  else
    -    export ACCUMULO_XTRAJARS=""
       if [[ "$cmd" = "jar" && -f "$2" ]]; then
    -    if [[ $2 =~ ^/ ]]; then
    -      jardir="$(dirname "$2")"
    -      jarfile="$2"
    -    else
    -      jardir="$(pwd)"
    -      jarfile="${jardir}/${2}"
    -    fi
    -    if jar tf "$jarfile" | grep -q META-INF/MANIFEST.MF ; then
    -      cp="$(unzip -p "$jarfile" META-INF/MANIFEST.MF | grep ^Class-Path: | sed 's/^Class-Path:
    --- End diff --
    I took a quick look at ACCUMULO-1494 and I think one intention of that change was to allow
running a main class specified in a jar.
    > @mikewalch has previously suggested that we should easily expose a classpath which
a user can use to launch their own processes.
    I like that approach.  If we make it easy to construct a classpath, then a user can use
`java -jar` to run a main class from a manifest file?  So it seems like the same functionality
can be achieved in a more standard way?  I think this would all work, but not completely sure.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message