Skip to content

Commit b65ae22

Browse files
author
Keqiu Hu
committed
Update tests
1 parent babdace commit b65ae22

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

hadoop-plugin-test/expectedJobs/jobs1/jobs1_job25.job

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ dependencies=jobs1_job24
44
conf.key1=value1
55
conf.key2=value2
66
conf.spark.driver.cores=1
7-
driver-memory=2048m
7+
driver-memory=2g
88
execution-jar=path/to/python/script.py
99
executor-cores=2
10-
executor-memory=8192m
10+
executor-memory=8g
1111
num-executors=6
1212
queue=marathon

hadoop-plugin-test/src/main/gradle/positive/jobs1.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,12 +383,12 @@ hadoop {
383383

384384
tensorFlowJob('job24', 'tony') {
385385
executes 'path/to/python/script.py'
386-
amMemory 2g
386+
amMemory '2g'
387387
amCores 1
388388
amGpus 1
389-
psMemory 2g
389+
psMemory '2g'
390390
psCores 1
391-
workerMemory 8g
391+
workerMemory '8g'
392392
workerCores 1
393393
workerGpus 2
394394
numPs 2
@@ -403,13 +403,13 @@ hadoop {
403403

404404
tensorFlowJob('job25', 'spark') {
405405
executes 'path/to/python/script.py'
406-
amMemory 2g
406+
amMemory '2g'
407407
amCores 1
408408
// Put ps memory before worker memory and ps cores after worker cores
409409
// to verify only worker params take effect
410-
psMemory 2g
410+
psMemory '2g'
411411
workerCores 2
412-
workerMemory 8g
412+
workerMemory '8g'
413413
psCores 1
414414
numPs 2
415415
numWorkers 4

hadoop-plugin/src/main/groovy/com/linkedin/gradle/hadoopdsl/job/TensorFlowSparkJob.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ package com.linkedin.gradle.hadoopdsl.job
2222
* tensorFlowJob('jobName', 'spark') {
2323
* executes path/to/python/script.py
2424
* appParams params
25-
* amMemory 2g
25+
* amMemory '2g'
2626
* amCores 1
27-
* psMemory 2g
27+
* psMemory '2g'
2828
* psCores 1
29-
* workerMemory 8g
29+
* workerMemory '8g'
3030
* workerCores 1
3131
* numPs 2
3232
* numWorkers 4

hadoop-plugin/src/main/groovy/com/linkedin/gradle/hadoopdsl/job/TensorFlowTonyJob.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class TensorFlowTonyJob extends HadoopJavaProcessJob implements TensorFlowJob {
204204
parsedMem = parsedMem[0..-2];
205205
}
206206
if (parsedMem[-1] == "g") {
207-
parsedMem = parsedMem[0..-2] + "000";
207+
parsedMem = (parsedMem[0..-2].toInteger() * 1024).toString();
208208
}
209209
return parsedMem;
210210
}

0 commit comments

Comments
 (0)