コード例 #1
0
#     See the License for the specific language governing permissions and
#     limitations under the License.
#
##

import sys
sys.path.append('../utils')

import json
import urllib2
import eureka
import unittest
import restclient

# get the serviceUrl from the eureka client
serviceUrl = eureka.EurekaClient().getServiceBaseUrl() + '/genie/v0/config/hive'

# use a global id for all tests
id='unittest_hiveconfig_id'
name='unittest_hiveconfig_name'
type='TEST'

class HiveConfigTestCase(unittest.TestCase):
            
    def setUp(self):
        # create a new one, if needed
        payload = '''
        <request>
          <hiveConfig>
            <id>''' + id + '''</id>
            <name>''' + name + '''</name>
コード例 #2
0
#     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.
#
##

import sys
sys.path.append('../utils')

import uuid
import time
import eureka
import jobs

# get the serviceUrl from the eureka client
serviceUrl = eureka.EurekaClient().getServiceBaseUrl() + '/genie/v0/jobs'

jobID = str(uuid.uuid4())


def testXmlSubmitjob():
    print "Running testXmlSubmitjob"
    payload = '''
    <request>
      <jobInfo>
        <jobID>''' + jobID + '''</jobID>
        <jobName>HADOOP-FS-CLIENT-TEST</jobName>
        <userName>genietest</userName>
        <groupName>hadoop</groupName>
        <userAgent>laptop</userAgent>
        <jobType>hadoop</jobType>