Github user mikewalch commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/230#discussion_r104793591
  
    --- Diff: assemble/bin/accumulo ---
    @@ -59,43 +59,22 @@ function main() {
       export ACCUMULO_CONF_DIR="$conf"
     
       # Verify setting in accumulo-env.sh
    -
       : "${JAVA_OPTS:?"variable is not set in accumulo-env.sh"}"
       : "${ACCUMULO_LOG_DIR:?"variable is not set in accumulo-env.sh"}"
       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-env.sh"}"
     
    -  # 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
    --- End diff --
    
    It's nice to be able to add a jar quickly to the classpath without 
modifying accumulo-env.sh like below:
    
    ```bash
    accumulo -add /path/to/my.jar com.my.class
    ```
    
    But I guess users could just do the following instead (after your PR is 
merged)
    
    ```bash
    CLASSPATH=/path/to/my.jar; accumulo com.my.class
    ```
    
    In the end, I am ok removing the `-add` and `jar` command if I can rename 
the current `accumulo classpath` command to be `classpath-info` and create a 
`accumulo classpath` that just prints the classpath created from 
accumulo-env.sh so the following works:
    
    ```bash
    java -cp /path/to/my.jar:$(accumulo classpath) com.my.class
    ```


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to