MAPREDUCE-6383. Pi job (QuasiMonteCarlo) should not try to read the
results file if its job fails. Contributed by Harsh J.
This commit is contained in:
parent
790a861766
commit
09b8241e6e
@ -337,6 +337,9 @@ Release 2.8.0 - UNRELEASED
|
|||||||
MAPREDUCE-6174. Combine common stream code into parent class for
|
MAPREDUCE-6174. Combine common stream code into parent class for
|
||||||
InMemoryMapOutput and OnDiskMapOutput. (Eric Payne via gera)
|
InMemoryMapOutput and OnDiskMapOutput. (Eric Payne via gera)
|
||||||
|
|
||||||
|
MAPREDUCE-6383. Pi job (QuasiMonteCarlo) should not try to read the
|
||||||
|
results file if its job fails. (Harsh J via devaraj)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
@ -304,6 +304,10 @@ public static BigDecimal estimatePi(int numMaps, long numPoints,
|
|||||||
System.out.println("Starting Job");
|
System.out.println("Starting Job");
|
||||||
final long startTime = System.currentTimeMillis();
|
final long startTime = System.currentTimeMillis();
|
||||||
job.waitForCompletion(true);
|
job.waitForCompletion(true);
|
||||||
|
if (!job.isSuccessful()) {
|
||||||
|
System.out.println("Job " + job.getJobID() + " failed!");
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
final double duration = (System.currentTimeMillis() - startTime)/1000.0;
|
final double duration = (System.currentTimeMillis() - startTime)/1000.0;
|
||||||
System.out.println("Job Finished in " + duration + " seconds");
|
System.out.println("Job Finished in " + duration + " seconds");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user