Index: hcatalog/src/test/e2e/templeton/tests/jobsubmission_streaming.conf =================================================================== --- hcatalog/src/test/e2e/templeton/tests/jobsubmission_streaming.conf (revision 1531149) +++ 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', Index: hcatalog/src/test/e2e/templeton/tests/jobsubmission.conf =================================================================== --- hcatalog/src/test/e2e/templeton/tests/jobsubmission.conf (revision 1531149) +++ hcatalog/src/test/e2e/templeton/tests/jobsubmission.conf (working copy) @@ -95,6 +95,7 @@ { # with log enabled 'num' => 3, + 'ignore23' => 'Log collector does not work with Hadoop 2', 'method' => 'POST', 'url' => ':TEMPLETON_URL:/templeton/v1/mapreduce/jar', 'post_options' => ['user.name=:UNAME:','arg=:INPDIR_HDFS:/nums.txt', 'arg= :OUTDIR:/wc.txt', @@ -251,6 +252,7 @@ { #a simple load store script with log enabled 'num' => 9, + 'ignore23' => 'Log collector does not work with Hadoop 2', 'method' => 'POST', 'url' => ':TEMPLETON_URL:/templeton/v1/pig', 'post_options' => ['user.name=:UNAME:', 'arg=-p', 'arg=INPDIR=:INPDIR_HDFS:','arg=-p', 'arg=OUTDIR=:OUTDIR:', 'file=:INPDIR_HDFS:/loadstore.pig', @@ -464,6 +466,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/conf/default.conf =================================================================== --- hcatalog/src/test/e2e/templeton/conf/default.conf (revision 1531149) +++ 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/README.txt =================================================================== --- hcatalog/src/test/e2e/templeton/README.txt (revision 1531149) +++ hcatalog/src/test/e2e/templeton/README.txt (working copy) @@ -111,7 +111,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/drivers/TestDriverCurl.pm =================================================================== --- hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm (revision 1531149) +++ hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm (working copy) @@ -249,6 +249,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 @@ -607,6 +613,13 @@ my ($self, $testResult, $benchmarkResult, $log, $testCmd) = @_; my $subName = (caller(0))[3]; + # Check that we should run this test. If the current execution type + # doesn't match the execonly flag, then skip this one. + 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); @@ -952,6 +965,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/build.xml =================================================================== --- hcatalog/src/test/e2e/templeton/build.xml (revision 1531149) +++ hcatalog/src/test/e2e/templeton/build.xml (working copy) @@ -108,6 +108,7 @@ +