#!/usr/bin/env bash

#Set log4j properties file
export JAVA_OPTS="${JAVA_OPTS} -Dlog4j.configuration=file:${BASEDIR}/conf/log4j.properties"

# export OPENCGA_HOME=${BASEDIR}

# see http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script
# Check if the command hbase exists
if `command -v hbase >/dev/null 2>&1` ; then
    export CLASSPATH_PREFIX=${CLASSPATH_PREFIX}:`hbase classpath | tr ":" "\n" | grep "conf" | tr "\n" ":"`
    export HADOOP_CLASSPATH=${BASEDIR}/libs/protobuf-java-*:${CLASSPATH_PREFIX}
    export HADOOP_USER_CLASSPATH_FIRST=true
fi
#!/usr/bin/env bash

# Variable BASEDIR is defined by the main script

#Set log4j properties file
export JAVA_OPTS="${JAVA_OPTS} -Dlog4j.configuration=file:${BASEDIR}/conf/log4j.properties"

# export OPENCGA_HOME=${BASEDIR}

# see http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script
# Check if the command hbase exists
if `command -v hbase >/dev/null 2>&1` ; then
    export CLASSPATH_PREFIX=${CLASSPATH_PREFIX}:`hbase classpath | tr ":" "\n" | grep "conf" | tr "\n" ":"`
    export HADOOP_CLASSPATH=${BASEDIR}/libs/protobuf-java-*:${BASEDIR}/libs/avro-*:${CLASSPATH_PREFIX}
    export HADOOP_USER_CLASSPATH_FIRST=true
fi
Add avro.jar to the HADOOP_CLASSPATH.
storage: Add avro.jar to the HADOOP_CLASSPATH.

Hadoop clusters use to use avro 1.7.4 instead of 1.7.7
With the old version, generated code in biodata-models cant be used due to:
    java.lang.NoSuchMethodError: org.apache.avro.Schema$Parser.parse(Ljava/lang/String;[Ljava/lang/String;)Lorg/apache/avro/Schema;
