forked from Netflix/genie
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'modularGradle' into 2.0-client
Conflicts: .gitignore gradle/check.gradle
- Loading branch information
Showing
11 changed files
with
320 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apply plugin: 'java' | ||
|
||
// dummy test - since integration tests are run by build task | ||
task test(overwrite:true) | ||
|
||
dependencies { | ||
compile project(':genie-web') | ||
|
||
testCompile 'com.sun.jersey:jersey-servlet:1.11' | ||
testCompile 'com.netflix.karyon:karyon-extensions-testsuite:1.0.22' | ||
testCompile 'org.jboss.arquillian.junit:arquillian-junit-container:1.1.0.Final' | ||
testCompile 'org.jboss.shrinkwrap:shrinkwrap-impl-base:1.1.2' | ||
testCompile 'org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:2.0.0' | ||
testRuntime 'org.jboss.arquillian.container:arquillian-tomcat-embedded-7:1.0.0.CR5' | ||
testRuntime 'org.apache.tomcat.embed:tomcat-embed-core:7.0.42' | ||
testRuntime 'org.apache.tomcat.embed:tomcat-embed-logging-juli:7.0.42' | ||
testRuntime ('org.apache.tomcat.embed:tomcat-embed-jasper:7.0.42') { | ||
exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
## | ||
# | ||
# Copyright 2013 Netflix, Inc. | ||
# | ||
# Licensed 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. | ||
# | ||
## | ||
|
||
import sys | ||
sys.path.append('../utils') | ||
|
||
import time | ||
import eureka | ||
import jobs | ||
|
||
import os | ||
|
||
# the S3 prefix where the tests are located | ||
GENIE_TEST_PREFIX = os.getenv("GENIE_TEST_PREFIX") | ||
|
||
# get the serviceUrl from the eureka client | ||
serviceUrl = eureka.EurekaClient().getServiceBaseUrl() + '/genie/v0/jobs' | ||
|
||
def testJsonSubmitjob(): | ||
print "Running testJsonSubmitjob " | ||
payload = ''' | ||
{ | ||
"jobInfo": | ||
{ | ||
"jobName": "HADOOP-JOB-TEST", | ||
"userName" : "blahgenieamsharma", | ||
"groupName" : "hadoop", | ||
"userAgent" : "laptop", | ||
"jobType": "hadoop", | ||
"schedule": "ADHOC", | ||
"clusterName": "h24query", | ||
"cmdArgs":"jar hadoop-examples.jar pi 50 10", | ||
"fileDependencies":"''' + GENIE_TEST_PREFIX + '''/hadoop-examples.jar" | ||
} | ||
} | ||
''' | ||
print payload | ||
print "\n" | ||
return jobs.submitJob(serviceUrl, payload) | ||
|
||
# driver method for all tests | ||
if __name__ == "__main__": | ||
print "Running unit tests:\n" | ||
jobID = testJsonSubmitjob() | ||
print "\n" | ||
while True: | ||
print jobs.getJobInfo(serviceUrl, jobID) | ||
print "\n" | ||
status = jobs.getJobStatus(serviceUrl, jobID) | ||
print status | ||
print "\n" | ||
|
||
if (status != 'RUNNING') and (status != 'INIT'): | ||
print "Final status: ", status | ||
print "Job has terminated - exiting" | ||
break | ||
|
||
time.sleep(5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
## | ||
# | ||
# Copyright 2013 Netflix, Inc. | ||
# | ||
# Licensed 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. | ||
# | ||
## | ||
|
||
import sys | ||
sys.path.append('../utils') | ||
|
||
import time | ||
import eureka | ||
import jobs | ||
|
||
import os | ||
|
||
# the S3 prefix where the tests are located | ||
GENIE_TEST_PREFIX = os.getenv("GENIE_TEST_PREFIX") | ||
|
||
# get the serviceUrl from the eureka client | ||
serviceUrl = eureka.EurekaClient().getServiceBaseUrl() + '/genie/v0/jobs' | ||
|
||
def testJsonSubmitjob(): | ||
print "Running testJsonSubmitjob " | ||
payload = ''' | ||
{ | ||
"jobInfo": | ||
{ | ||
"jobName": "HIVE-JOB-TEST", | ||
"description": "This is a test", | ||
"userName" : "amsharma", | ||
"groupName" : "hadoop", | ||
"jobType": "hive", | ||
"configuration": "prod", | ||
"schedule": "ADHOC", | ||
"clusterName": "h24query", | ||
"cmdArgs": "-f hive.q", | ||
"fileDependencies":"''' + GENIE_TEST_PREFIX + '''/hive.q" | ||
} | ||
} | ||
''' | ||
print payload | ||
print "\n" | ||
return jobs.submitJob(serviceUrl, payload) | ||
|
||
# driver method for all tests | ||
if __name__ == "__main__": | ||
print "Running unit tests:\n" | ||
jobID = testJsonSubmitjob() | ||
print "\n" | ||
while True: | ||
print jobs.getJobInfo(serviceUrl, jobID) | ||
print "\n" | ||
status = jobs.getJobStatus(serviceUrl, jobID) | ||
print status | ||
print "\n" | ||
|
||
if (status != 'RUNNING') and (status != 'INIT'): | ||
print "Final status: ", status | ||
print "Job has terminated - exiting" | ||
break | ||
|
||
time.sleep(5) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
## | ||
# | ||
# Copyright 2013 Netflix, Inc. | ||
# | ||
# Licensed 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. | ||
# | ||
## | ||
|
||
import sys | ||
sys.path.append('../utils') | ||
|
||
import time | ||
import eureka | ||
import jobs | ||
|
||
import os | ||
|
||
# the S3 prefix where the tests are located | ||
GENIE_TEST_PREFIX = os.getenv("GENIE_TEST_PREFIX") | ||
|
||
# get the serviceUrl from the eureka client | ||
serviceUrl = eureka.EurekaClient().getServiceBaseUrl() + '/genie/v0/jobs' | ||
|
||
def testJsonSubmitjob(): | ||
print "Running testJsonSubmitjob " | ||
payload = ''' | ||
{ | ||
"jobInfo": | ||
{ | ||
"jobName": "PIG-JOB-TEST", | ||
"userName" : "amsharma", | ||
"groupName" : "hadoop", | ||
"userAgent" : "laptop", | ||
"jobType": "pig", | ||
"configuration": "prod", | ||
"schedule": "adHoc", | ||
"clusterName": "h24query", | ||
"cmdArgs":" -f pig2.q", | ||
"fileDependencies":"''' + GENIE_TEST_PREFIX + '''/pig2.q" | ||
} | ||
} | ||
''' | ||
print payload | ||
print "\n" | ||
return jobs.submitJob(serviceUrl, payload) | ||
|
||
# driver method for all tests | ||
if __name__ == "__main__": | ||
print "Running unit tests:\n" | ||
jobID = testJsonSubmitjob() | ||
print "\n" | ||
|
||
while True: | ||
print jobs.getJobInfo(serviceUrl, jobID) | ||
print "\n" | ||
status = jobs.getJobStatus(serviceUrl, jobID) | ||
print status | ||
print "\n" | ||
|
||
if (status != 'RUNNING') and (status != 'INIT'): | ||
print "Final status: ", status | ||
print "Job has terminated - exiting" | ||
break | ||
|
||
time.sleep(5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// Dependency for plugin was set in buildscript.gradle | ||
|
||
subprojects { | ||
apply plugin: 'license' //nl.javadude.gradle.plugins.license.LicensePlugin | ||
license { | ||
header rootProject.file('codequality/HEADER') | ||
ext.year = Calendar.getInstance().get(Calendar.YEAR) | ||
skipExistingHeaders true | ||
} | ||
apply plugin: 'license' //nl.javadude.gradle.plugins.license.LicensePlugin | ||
license { | ||
header new File(project.parent.projectDir, '/codequality/HEADER') | ||
ext.year = Calendar.getInstance().get(Calendar.YEAR) | ||
skipExistingHeaders true | ||
} | ||
} |
Oops, something went wrong.