Index: src/test/e2e/hcatalog/tests/hcat.conf =================================================================== --- src/test/e2e/hcatalog/tests/hcat.conf (revision 1163748) +++ src/test/e2e/hcatalog/tests/hcat.conf (working copy) @@ -346,7 +346,7 @@ { 'num' => 1, 'hive' => "show tables;", - 'expected_out_regex' => "OK", + 'expected_err_regex' => "OK", }, { 'num' => 5, @@ -728,10 +728,10 @@ b = foreach a generate org.apache.hcatalog.utils.HCatTypeCheck('boolean+int', *); store b into ':OUTPATH:'; ", - 'rc' => 0, - 'expected_err_regex' => "Success", + 'rc' => 6, + 'expected_err_regex' => "ERROR", # 'expected_out_regex' => "1", - # 'not_expected_out_regex' => "[^1\\t]", + 'not_expected_out_regex' => "Success", }, @@ -1427,7 +1427,7 @@ { 'num' => 3, # complex stored by pig - 'depends_on' => 'hcat_pig2pig_setup_tables_2', # not really, but #4 does + # 'depends_on' => 'hcat_pig2pig_setup_tables_2', # not really, but #4 does 'hive' => " CREATE TABLE tmp_pig2pig_stored_complex_:RUNID: ( mymap map, @@ -2249,7 +2249,6 @@ 'pig' => " register :FUNCPATH:/testudf.jar; a = load 'default.tmp_pig2pig_stored_complex_:RUNID:' using org.apache.hcatalog.pig.HCatLoader(); --- b = foreach a generate org.apache.hcatalog.utils.HCatTypeCheck('{mymap: map[],mytuple: (num: int,str: chararray,dbl: double),bagofmap: {(innerfield: map[])},rownum: int', *); b = foreach a generate org.apache.hcatalog.utils.HCatTypeCheck('mymap: map[],mytuple: (num: int,str: chararray,dbl: double),bagofmap: {(innerfield: map[])},rownum: int', *); store b into ':OUTPATH:'; ", Index: src/test/e2e/hcatalog/conf/default.conf =================================================================== --- src/test/e2e/hcatalog/conf/default.conf (revision 1163748) +++ src/test/e2e/hcatalog/conf/default.conf (working copy) @@ -63,7 +63,8 @@ #HIVE , 'hive_bin_location' => "$ENV{HIVE_ROOT}/build/dist/bin" - + + , 'metastore.principal' => "$ENV{METASTORE_PRINCIPAL}" #HCATALOG ,'thriftserver' => "$ENV{HCAT_URL}" ,'hcatalog.jar' => "$ENV{HCAT_JAR},file://$ENV{HIVE_ROOT}/lib/thrift-fb303-0.5.0.jar,file://$ENV{HIVE_ROOT}/lib/thrift-0.5.0.jar,file://$ENV{HIVE_ROOT}/build/metastore/hive-metastore-0.8.0-SNAPSHOT.jar,file://$ENV{HIVE_ROOT}/build/common/hive-common-0.8.0-SNAPSHOT.jar,file://$ENV{HIVE_ROOT}/build/shims/hive-shims-0.8.0-SNAPSHOT.jar,file://$ENV{HIVE_ROOT}/build/serde/hive-serde-0.8.0-SNAPSHOT.jar,file://$ENV{HIVE_ROOT}/build/ql/hive-exec-0.8.0-SNAPSHOT.jar" Index: src/test/e2e/hcatalog/drivers/TestDriverHCat.pm =================================================================== --- src/test/e2e/hcatalog/drivers/TestDriverHCat.pm (revision 1163748) +++ src/test/e2e/hcatalog/drivers/TestDriverHCat.pm (working copy) @@ -442,8 +442,14 @@ my @cmd = Util::getHiveCmd($testCmd); #Add metastore info - push(@cmd, " --hiveconf hive.metastore.local=false --hiveconf hive.metastore.uris=thrift://".$testCmd->{'thriftserver'}); + push(@cmd, "--hiveconf hive.metastore.local=false --hiveconf hive.metastore.uris=thrift://".$testCmd->{'thriftserver'}); + + if(defined($testCmd->{'metastore.principal'})){ + push(@cmd, "--hiveconf hive.metastore.sasl.enabled=true --hiveconf hive.metastore.kerberos.principal=$testCmd->{'metastore.principal'}"); + + } + # Add hive command file push(@cmd, '-f', $hivefile); @@ -624,7 +630,11 @@ my $hadoop_classpath = $self->replaceParameters( $testCmd->{'hadoop_classpath'}, $outfile, $testCmd, $log ); $ENV{'HADOOP_CLASSPATH'} = $ENV{'HCAT_EXTRA_JARS'}; } - + my $hadoop_opts = "-Dhive.metastore.uris=thrift://".$testCmd->{'thriftserver'}." -Dhcat.metastore.uri=thrift://".$testCmd->{'thriftserver'}; + if (defined($testCmd->{'metastore.principal'})){ + $hadoop_opts = join '',$hadoop_opts," -Dhive.metastore.sasl.enabled=true -Dhcat.metastore.principal=",$testCmd->{'metastore.principal'}," -Dhive.metastore.kerberos.principal=",$testCmd->{'metastore.principal'}; + } + $ENV{'HADOOP_OPTS'} = $hadoop_opts; # Run the command print $log "$0:$subName Going to run command: $command\n"; print $log "$0:$subName STD OUT IS IN FILE: $stdoutfile\n"; @@ -840,7 +850,13 @@ my $locallog = $testCmd->{'localpath'} . $testCmd->{'group'} . "_" . $testCmd->{'num'} . ".log"; push(@cmd, "-logfile"); push(@cmd, $locallog); - + + my $pig_opts = "-Dhive.metastore.uris=thrift://".$testCmd->{'thriftserver'}." -Dhcat.metastore.uri=thrift://".$testCmd->{'thriftserver'}; + if (defined($testCmd->{'metastore.principal'})){ + $pig_opts = join '',$pig_opts," -Dhive.metastore.sasl.enabled=true -Dhcat.metastore.principal=",$testCmd->{'metastore.principal'}," -Dhive.metastore.kerberos.principal=",$testCmd->{'metastore.principal'}; + } + $ENV{'PIG_OPTS'} = $pig_opts; + # Add pig parameters if they're provided if (defined($testCmd->{'pig_params'})) { # Processing :PARAMPATH: in parameters Index: src/test/e2e/hcatalog/drivers/Util.pm =================================================================== --- src/test/e2e/hcatalog/drivers/Util.pm (revision 1163748) +++ src/test/e2e/hcatalog/drivers/Util.pm (working copy) @@ -231,7 +231,7 @@ if(defined($properties->{'additionaljars'})) { push( @baseCmd,'-Dpig.additional.jars='.$properties->{'additionaljars'}); } - + $ENV{'PIG_CLASSPATH'}=$properties->{'additionaljars'}; if ( $properties->{'use-pig.pl'} eq 'raw' ) { # add _no_ arguments automatically # !!! Index: src/test/e2e/hcatalog/build.xml =================================================================== --- src/test/e2e/hcatalog/build.xml (revision 1163748) +++ src/test/e2e/hcatalog/build.xml (working copy) @@ -27,6 +27,7 @@ + @@ -103,11 +104,7 @@ - + @@ -151,7 +148,7 @@ - + @@ -165,8 +162,8 @@ + -