Skip to content
Permalink
Browse files
Fixed failures caused by impersonation. (#512)
Also, a baseline fix is included.
  • Loading branch information
agozhiy authored and Agirish committed Nov 2, 2018
1 parent a1e87ff commit b759fc00b74f7a11b03c434fe45e003998d7503a
Showing 2 changed files with 15 additions and 2 deletions.
@@ -1,6 +1,13 @@
#!/usr/bin/env bash
source conf/drillTestConfig.properties

if [ -n $USERNAME ]
then
user=$USERNAME
else
user=`ps -aef | grep Drillbit | grep org.apache.drill | cut -d' ' -f1 | head -1`
fi

hadoop_folder=${DRILL_TESTDATA}/hive_storage/maprdb/json
test_data=test_data.json
maprdb_table=json_MapR_DB_table
@@ -11,7 +18,13 @@ if [ $? -eq 0 ]
then
hadoop fs -rm -r $hadoop_folder/$maprdb_table
fi
mapr importJSON -idField "id" -src $hadoop_folder/$test_data -dst $hadoop_folder/$maprdb_table

if [ "$user" == "root" ]
then
mapr importJSON -idField "id" -src $hadoop_folder/$test_data -dst $hadoop_folder/$maprdb_table
else
sudo -u $user mapr importJSON -idField "id" -src $hadoop_folder/$test_data -dst $hadoop_folder/$maprdb_table
fi

# Creating the Hive table:

@@ -1,4 +1,4 @@
Scan.*JsonTableGroupScan
tableName=.*/hive_storage/maprdb/json/json_MapR_DB_table
condition=\(column_1 = \"value_1_6\"\)
columns=\[`_id`, `column_1`, `column_3`, `column_4`\]
columns=\[`_id`, `column_3`, `column_4`\]

0 comments on commit b759fc0

Please sign in to comment.