# 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. ############################################################################### # curl command tests for templeton # # #use Yahoo::Miners::Test::PigSetup; #PigSetup::setup(); #my $me = `whoami`; #chomp $me; $cfg = { 'driver' => 'Curl', 'groups' => [ ##============================================================================================================= { 'name' => 'ModifyWebhcatConfig', 'tests' => [ { #test to verify templeton.mapper.memory.mb update 'num' => 1, 'setup' => [ { 'method' => 'POST', 'url' => ':TEMPLETON_URL:/templeton/v1/ddl', 'status_code' => 200, 'post_options' => ['user.name=:UNAME:','exec=drop table if exists ratings;CREATE EXTERNAL TABLE ratings(userid INT, movieid INT, ratings FLOAT, unixtime STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY \':\' location \':INPDIR_HDFS:/ratings/\';drop table if exists testtable;create table testtable (userid INT, movieid INT, ratings FLOAT, unixtime STRING) location \':INPDIR_HDFS:/testtable/\';'], 'json_field_substr_match' => {'stderr' => 'OK'} } ], 'method' => 'POST', 'url' => ':TEMPLETON_URL:/templeton/v1/hive', 'post_options' => ['user.name=:UNAME:','execute=INSERT OVERWRITE TABLE testtable SELECT * from ratings','statusdir=:OUTDIR:/status'], 'json_field_substr_match' => { 'id' => '\d+'}, #results 'status_code' => 200, 'check_job_created' => 1, 'check_job_complete' => 'FAILURE', } ] } ] }, ;