############################################################################           
#  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.                 
#  The ASF licenses this file to You under the Apache License, Version 2.0             
#  (the "License"); you may not use this file except in compliance with                
#  the License.  You may obtain a copy of the License at                               
#                                                                                      
#      http://www.apache.org/licenses/LICENSE-2.0                                      
#                                                                                      
#  Unless required by applicable law or agreed to in writing, software                 
#  distributed under the License is distributed on an "AS IS" BASIS,                   
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.            
#  See the License for the specific language governing permissions and                 
#  limitations under the License.                                                      
                                                                                       
my $me = `whoami`;
$me =~ s/[^a-zA-Z0-9]*//g;

# The contents of this file can be rewritten to fit your installation.
# Also, you can define the following environment variables and set things up as in the test setup
# PH_ROOT     Root directory where test harness is installed
# PH_LOCAL    Root directory for input and output for local mode tests
# PH_OUT      Root directory where output data will be stored (on local disk, not HDFS)
# PH_CLUSTER  Root directory for cluster being used
# PH_PIG      Root directory for Pig version being used

$cfg = {
    #HDFS
      'inpathbase'     => "$ENV{PH_ROOT}/data"
    , 'outpathbase'    => "$ENV{PH_ROOT}/testout"

   #LOCAL
    , 'localinpathbase'   => "$ENV{PH_LOCAL}/in" 
    , 'localoutpathbase'  => "$ENV{PH_LOCAL}/out/log" 
    , 'localxmlpathbase'  => "$ENV{PH_LOCAL}/out/xml" 
    , 'localpathbase'     => "$ENV{PH_LOCAL}/out/pigtest/$me" 
    , 'benchmarkcachepath'=> "$ENV{PH_BENCHMARK_CACHE_PATH}"

    #TEST
    , 'benchmarkPath'    => "$ENV{PH_OUT}/benchmarks"
    , 'scriptPath'       => "$ENV{PH_ROOT}/libexec"
    , 'tmpPath'          => 'tmp/pigtest'

    #PIG
    , 'testconfigpath'   => "$ENV{PH_CLUSTER}/conf/"
    , 'funcjarPath'      => "$ENV{PH_ROOT}/lib/java"
    , 'paramPath'        => "$ENV{PH_ROOT}/paramfiles"
    , 'piggybankjarPath' => "$ENV{PH_PIGGYBANK_JAR}"
    , 'pigpath'          => "$ENV{PH_PIG}"
	, 'oldpigpath'       => "$ENV{PH_OLDPIG}"
    , 'exectype'         => 'local'

	#HADOOP
	, 'mapredjars'       => "$ENV{PH_ROOT}/lib"
	, 'hadoopHome'       => "$ENV{PH_ROOT}/lib"

	#HIVE
    , 'hivelibdir'       => "$ENV{PH_HIVE_LIB_DIR}"
    , 'hiveversion'      =>  "$ENV{PH_HIVE_VERSION}"
    , 'hiveshimsversion' => "$ENV{PH_HIVE_SHIMS_VERSION}"

    , 'userhomePath' => "$ENV{HOME}"
    ,'local.bin'     => '/usr/bin'
    # NB: we provide the default there as a fallback in case if there is no corresponding ENV key:
    ,'hadoop.mapred.local.dir'     => defined $ENV{'HADOOP_MAPRED_LOCAL_DIR'} ? $ENV{'HADOOP_MAPRED_LOCAL_DIR'} : "/tmp/hadoop/mapred/local"
 
    ,'logDir'                => "$ENV{PH_OUT}/log" 
	,'propertiesFile'     => "./conf/testpropertiesfile.conf"
	,'pigharness.console.level' => 'ERROR'

};
