Index: hcatalog/src/test/e2e/templeton/README.txt =================================================================== --- hcatalog/src/test/e2e/templeton/README.txt (revision 1532069) +++ hcatalog/src/test/e2e/templeton/README.txt (working copy) @@ -112,7 +112,9 @@ If you want to run specific test in a group group you can specify the test, for example: -Dtests.to.run='-t TestHive_1' For example, tests/ddl.conf has several groups such as 'name' => 'REST_DDL_TABLE_BASIC'; use REST_DDL_TABLE_BASIC as the name +If you are running with Hadoop 2, please use the flag: -Dhadoopversion=23 + Running the hcat authorization tests ------------------------------------ Hcat authorization tests run commands as different users to test if authorization is done right. Index: hcatalog/src/test/e2e/templeton/build.xml =================================================================== --- hcatalog/src/test/e2e/templeton/build.xml (revision 1532069) +++ hcatalog/src/test/e2e/templeton/build.xml (working copy) @@ -109,6 +109,7 @@ + Index: hcatalog/src/test/e2e/templeton/conf/default.conf =================================================================== --- hcatalog/src/test/e2e/templeton/conf/default.conf (revision 1532069) +++ hcatalog/src/test/e2e/templeton/conf/default.conf (working copy) @@ -38,5 +38,5 @@ ,'logDir' => "$ENV{TH_OUT}/log" # ,'propertiesFile' => "./conf/testpropertiesfile.conf" ,'harness.console.level' => 'ERROR' - + ,'hadoopversion' => "$ENV{HADOOP_VERSION}" }; Index: hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm =================================================================== --- hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm (revision 1532069) +++ hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm (working copy) @@ -260,6 +260,12 @@ my ($self, $testCmd, $log) = @_; my $subName = (caller(0))[3]; + # Check that we should run this test. If the current hadoop version + # is hadoop 2 and the test is marked as "ignore23", skip the test + if ($self->wrongExecutionMode($testCmd, $log)) { + my %result; + return \%result; + } # Handle the various methods of running used in # the original TestDrivers @@ -618,6 +624,13 @@ my ($self, $testResult, $benchmarkResult, $log, $testCmd) = @_; my $subName = (caller(0))[3]; + # Check that we should run this test. If the current hadoop version + # is hadoop 2 and the test is marked as "ignore23", skip the test + if ($self->wrongExecutionMode($testCmd, $log)) { + # Special magic value + return $self->{'wrong_execution_mode'}; + } + my $result = 1; # until proven wrong... if (defined $testCmd->{'status_code'}) { my $res = $self->checkResStatusCode($testResult, $testCmd->{'status_code'}, $log); @@ -963,6 +976,27 @@ return $result; } +############################################################################## +# Check whether we should be running this test or not. +# +sub wrongExecutionMode($$) +{ + my ($self, $testCmd, $log) = @_; + + my $wrong = 0; + + if (defined $testCmd->{'ignore23'} && $testCmd->{'hadoopversion'}=='23') { + $wrong = 1; + } + + if ($wrong) { + print $log "Skipping test $testCmd->{'group'}" . "_" . + $testCmd->{'num'} . " since it is not suppsed to be run in hadoop 23\n"; + } + + return $wrong; +} + ############################################################################### sub setLocationPermGroup{ my ($self, $job_info, $testCmd, $log) = @_; Index: hcatalog/src/test/e2e/templeton/tests/jobsubmission.conf =================================================================== --- hcatalog/src/test/e2e/templeton/tests/jobsubmission.conf (revision 1532069) +++ hcatalog/src/test/e2e/templeton/tests/jobsubmission.conf (working copy) @@ -294,6 +294,7 @@ { #test show tables 'num' => 3, + 'ignore23' => 'Log collector does not work with Hadoop 2', 'method' => 'POST', 'url' => ':TEMPLETON_URL:/templeton/v1/hive', 'post_options' => ['user.name=:UNAME:','execute=drop table if exists mynums;', ], @@ -420,6 +421,7 @@ { #test add jar 'num' => 9, + 'ignore23' => 'Log collector does not work with Hadoop 2', 'method' => 'POST', 'url' => ':TEMPLETON_URL:/templeton/v1/hive', 'post_options' => ['user.name=:UNAME:','execute=add jar piggybank.jar', 'files=:INPDIR_HDFS:/piggybank.jar',], @@ -448,6 +450,7 @@ { #enable logs 'num' => 11, + 'ignore23' => 'Log collector does not work with Hadoop 2', 'method' => 'POST', 'url' => ':TEMPLETON_URL:/templeton/v1/hive', 'post_options' => ['user.name=:UNAME:','execute=select a,b from mynums', 'statusdir=:OUTDIR:/status', 'enablelog=true'], Index: hcatalog/src/test/e2e/templeton/tests/jobsubmission_streaming.conf =================================================================== --- hcatalog/src/test/e2e/templeton/tests/jobsubmission_streaming.conf (revision 1532069) +++ hcatalog/src/test/e2e/templeton/tests/jobsubmission_streaming.conf (working copy) @@ -70,6 +70,7 @@ { #enable log 'num' => 3, + 'ignore23' => 'Log collector does not work with Hadoop 2', 'method' => 'POST', 'url' => ':TEMPLETON_URL:/templeton/v1/mapreduce/streaming', 'post_options' => ['user.name=:UNAME:', @@ -88,6 +89,7 @@ { #enable log, failed job case 'num' => 4, + 'ignore23' => 'Log collector does not work with Hadoop 2', 'method' => 'POST', 'url' => ':TEMPLETON_URL:/templeton/v1/mapreduce/streaming', 'post_options' => ['user.name=:UNAME:','input=:INPDIR_HDFS:/nums.txt',