You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2019/06/26 20:47:26 UTC
[accumulo-testing] branch master updated: Fix #83 Add hadoop conf
to CLASSPATH for defaultFS (#87)
This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo-testing.git
The following commit(s) were added to refs/heads/master by this push:
new 9bb6b9d Fix #83 Add hadoop conf to CLASSPATH for defaultFS (#87)
9bb6b9d is described below
commit 9bb6b9d3be22270e0b4acefc161d867fde0e5788
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Wed Jun 26 16:47:22 2019 -0400
Fix #83 Add hadoop conf to CLASSPATH for defaultFS (#87)
Ensure test client code has core-site.xml on its class path so that when
client code calls "new Configuration()" (for example, to qualify HDFS
paths without a scheme), it will use the fs.defaultFS to qualify them.
This fixes issues in bulk import test code that does not properly
qualify Paths as hdfs:// paths, and instead assumes file:// incorrectly.
---
conf/env.sh.example | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/conf/env.sh.example b/conf/env.sh.example
index bd372c3..dde67f8 100644
--- a/conf/env.sh.example
+++ b/conf/env.sh.example
@@ -1,3 +1,4 @@
+#! /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.
@@ -23,6 +24,15 @@ export ACCUMULO_HOME="${ACCUMULO_HOME:-/path/to/accumulo}"
## Path to Accumulo client properties
export ACCUMULO_CLIENT_PROPS="$ACCUMULO_HOME/conf/accumulo-client.properties"
+# Add HADOOP conf directory to CLASSPATH, if set (for defaultFS in core-site.xml, etc.)
+if [[ -n $HADOOP_CONF_DIR ]]; then
+ if [[ -z $CLASSPATH ]]; then
+ export CLASSPATH="$HADOOP_CONF_DIR"
+ else
+ export CLASSPATH="$CLASSPATH:$HADOOP_CONF_DIR"
+ fi
+fi
+
# Configuration
# =============
conf_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )