Skip to content
Permalink
Browse files
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.
  • Loading branch information
ctubbsii committed Jun 26, 2019
1 parent 4336dfb commit 9bb6b9d3be22270e0b4acefc161d867fde0e5788
Showing 1 changed file with 10 additions and 0 deletions.
@@ -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 )

0 comments on commit 9bb6b9d

Please sign in to comment.