Skip to content

Commit

Permalink
Hadoop related configs.
Browse files Browse the repository at this point in the history
  • Loading branch information
amitsharmaak committed May 29, 2014
1 parent 60ae487 commit de411c0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 8 deletions.
7 changes: 4 additions & 3 deletions genie-web/src/test/python/utils/registerCluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def addClusterConfigCprod1():

tags = json.dumps(['sla','cprod1','bdp_prod_20140101'])
config = json.dumps(['s3://netflix-dataoven-prod/genie/cluster/bigdataplatform_prod_20140415/hdfs-site.xml','s3://netflix-dataoven-prod/genie/cluster/bigdataplatform_prod_20140415/core-site.xml','s3://netflix-dataoven-prod/genie/cluster/bigdataplatform_prod_20140415/mapred-site.xml'])
cmds = json.dumps(['prodhive11_mr1','pig11_mr1'])
cmds = json.dumps(['prodhive11_mr1','pig11_mr1','hadoop103'])

payload = '''
{
Expand Down Expand Up @@ -90,6 +90,7 @@ def addClusterConfigH2query():
tags = json.dumps(['adhoc','h2query','bdp_hquery_20140505_185527'])
config = json.dumps(['s3://netflix-bdp-emr-clusters/users/bdp/hquery/20140505/185527/genie/core-site.xml','s3://netflix-bdp-emr-clusters/users/bdp/hquery/20140505/185527/genie/hdfs-site.xml','s3://netflix-bdp-emr-clusters/users/bdp/hquery/20140505/185527/genie/yarn-site.xml'])
cmds = json.dumps(['pig11_mr2','pig13_mr2','prodhive11_mr2'])
#cmds = json.dumps(['prodhive11_mr2'])
payload = '''
{
"clusterConfig":
Expand All @@ -115,5 +116,5 @@ def addClusterConfigH2query():
print "Registering Clusters:\n"
print "\n"
addClusterConfigCprod1()
addClusterConfigCquery1()
addClusterConfigH2query()
#addClusterConfigCquery1()
#addClusterConfigH2query()
36 changes: 31 additions & 5 deletions genie-web/src/test/python/utils/registerCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,29 @@ def addCommandConfigProdhive11Mr1():
print "\n"
print restclient.post(serviceUrl=serviceUrl, payload=payload, contentType='application/json')

def addCommandConfigHadoop103():
print "Adding Command hadoop103"
ID = "hadoop103"
apps = json.dumps(['mr1'])
payload = '''
{
"commandConfig":
{
"id":"''' + ID +'''",
"name": "hadoop",
"status" : "active",
"executable": "/apps/hadoop/1.0.3/bin/hadoop",
"user" : "amsharma",
"version" : "1.0.3",
"appIds": ''' + apps + '''
}
}
'''

print payload
print "\n"
print restclient.post(serviceUrl=serviceUrl, payload=payload, contentType='application/json')

def addCommandConfigProdhive11Mr2():
print "Adding Command prodhive11_mr2"
ID = "prodhive11_mr2"
Expand Down Expand Up @@ -94,7 +117,8 @@ def addCommandConfigPig11Mr1():
"executable": "/apps/pig/0.11/bin/pig",
"envPropFile": "s3://netflix-dataoven-test/genie2/command/pig11_mr1/envFile.sh",
"user" : "amsharma",
"version" : "0.11"
"version" : "0.11",
"appIds": ''' + apps + '''
}
}
'''
Expand All @@ -116,7 +140,8 @@ def addCommandConfigPig11Mr2():
"executable": "/apps/pig/0.11-h2/bin/pig",
"envPropFile": "s3://netflix-dataoven-test/genie2/command/pig11_mr2/envFile.sh",
"user" : "amsharma",
"version" : "0.11-h2"
"version" : "0.11-h2",
"appIds": ''' + apps + '''
}
}
'''
Expand Down Expand Up @@ -153,6 +178,7 @@ def addCommandConfigPig13Mr2():

#addCommandConfigProdhive11Mr1()
#addCommandConfigProdhive11Mr2()
addCommandConfigPig11Mr1()
addCommandConfigPig11Mr2()
addCommandConfigPig13Mr2()
#addCommandConfigPig11Mr1()
#addCommandConfigPig11Mr2()
#addCommandConfigPig13Mr2()
addCommandConfigHadoop103()

0 comments on commit de411c0

Please sign in to comment.