Java Code Examples for org.apache.hadoop.mapreduce.v2.app.job.Job#getDiagnostics()
The following examples show how to use
org.apache.hadoop.mapreduce.v2.app.job.Job#getDiagnostics() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VerifyJobsUtils.java From hadoop with Apache License 2.0 | 5 votes |
public static void verifyHsJobGenericSecure(Job job, Boolean uberized, String diagnostics, long avgMapTime, long avgReduceTime, long avgShuffleTime, long avgMergeTime, int failedReduceAttempts, int killedReduceAttempts, int successfulReduceAttempts, int failedMapAttempts, int killedMapAttempts, int successfulMapAttempts) { String diagString = ""; List<String> diagList = job.getDiagnostics(); if (diagList != null && !diagList.isEmpty()) { StringBuffer b = new StringBuffer(); for (String diag : diagList) { b.append(diag); } diagString = b.toString(); } WebServicesTestUtils.checkStringMatch("diagnostics", diagString, diagnostics); assertEquals("isUber incorrect", job.isUber(), uberized); // unfortunately the following fields are all calculated in JobInfo // so not easily accessible without doing all the calculations again. // For now just make sure they are present. assertTrue("failedReduceAttempts not >= 0", failedReduceAttempts >= 0); assertTrue("killedReduceAttempts not >= 0", killedReduceAttempts >= 0); assertTrue("successfulReduceAttempts not >= 0", successfulReduceAttempts >= 0); assertTrue("failedMapAttempts not >= 0", failedMapAttempts >= 0); assertTrue("killedMapAttempts not >= 0", killedMapAttempts >= 0); assertTrue("successfulMapAttempts not >= 0", successfulMapAttempts >= 0); assertTrue("avgMapTime not >= 0", avgMapTime >= 0); assertTrue("avgReduceTime not >= 0", avgReduceTime >= 0); assertTrue("avgShuffleTime not >= 0", avgShuffleTime >= 0); assertTrue("avgMergeTime not >= 0", avgMergeTime >= 0); }
Example 2
Source File: VerifyJobsUtils.java From big-c with Apache License 2.0 | 5 votes |
public static void verifyHsJobGenericSecure(Job job, Boolean uberized, String diagnostics, long avgMapTime, long avgReduceTime, long avgShuffleTime, long avgMergeTime, int failedReduceAttempts, int killedReduceAttempts, int successfulReduceAttempts, int failedMapAttempts, int killedMapAttempts, int successfulMapAttempts) { String diagString = ""; List<String> diagList = job.getDiagnostics(); if (diagList != null && !diagList.isEmpty()) { StringBuffer b = new StringBuffer(); for (String diag : diagList) { b.append(diag); } diagString = b.toString(); } WebServicesTestUtils.checkStringMatch("diagnostics", diagString, diagnostics); assertEquals("isUber incorrect", job.isUber(), uberized); // unfortunately the following fields are all calculated in JobInfo // so not easily accessible without doing all the calculations again. // For now just make sure they are present. assertTrue("failedReduceAttempts not >= 0", failedReduceAttempts >= 0); assertTrue("killedReduceAttempts not >= 0", killedReduceAttempts >= 0); assertTrue("successfulReduceAttempts not >= 0", successfulReduceAttempts >= 0); assertTrue("failedMapAttempts not >= 0", failedMapAttempts >= 0); assertTrue("killedMapAttempts not >= 0", killedMapAttempts >= 0); assertTrue("successfulMapAttempts not >= 0", successfulMapAttempts >= 0); assertTrue("avgMapTime not >= 0", avgMapTime >= 0); assertTrue("avgReduceTime not >= 0", avgReduceTime >= 0); assertTrue("avgShuffleTime not >= 0", avgShuffleTime >= 0); assertTrue("avgMergeTime not >= 0", avgMergeTime >= 0); }
Example 3
Source File: TestAMWebServicesJobs.java From hadoop with Apache License 2.0 | 4 votes |
public void verifyAMJobGenericSecure(Job job, int mapsPending, int mapsRunning, int reducesPending, int reducesRunning, Boolean uberized, String diagnostics, int newReduceAttempts, int runningReduceAttempts, int failedReduceAttempts, int killedReduceAttempts, int successfulReduceAttempts, int newMapAttempts, int runningMapAttempts, int failedMapAttempts, int killedMapAttempts, int successfulMapAttempts) { String diagString = ""; List<String> diagList = job.getDiagnostics(); if (diagList != null && !diagList.isEmpty()) { StringBuffer b = new StringBuffer(); for (String diag : diagList) { b.append(diag); } diagString = b.toString(); } WebServicesTestUtils.checkStringMatch("diagnostics", diagString, diagnostics); assertEquals("isUber incorrect", job.isUber(), uberized); // unfortunately the following fields are all calculated in JobInfo // so not easily accessible without doing all the calculations again. // For now just make sure they are present. assertTrue("mapsPending not >= 0", mapsPending >= 0); assertTrue("mapsRunning not >= 0", mapsRunning >= 0); assertTrue("reducesPending not >= 0", reducesPending >= 0); assertTrue("reducesRunning not >= 0", reducesRunning >= 0); assertTrue("newReduceAttempts not >= 0", newReduceAttempts >= 0); assertTrue("runningReduceAttempts not >= 0", runningReduceAttempts >= 0); assertTrue("failedReduceAttempts not >= 0", failedReduceAttempts >= 0); assertTrue("killedReduceAttempts not >= 0", killedReduceAttempts >= 0); assertTrue("successfulReduceAttempts not >= 0", successfulReduceAttempts >= 0); assertTrue("newMapAttempts not >= 0", newMapAttempts >= 0); assertTrue("runningMapAttempts not >= 0", runningMapAttempts >= 0); assertTrue("failedMapAttempts not >= 0", failedMapAttempts >= 0); assertTrue("killedMapAttempts not >= 0", killedMapAttempts >= 0); assertTrue("successfulMapAttempts not >= 0", successfulMapAttempts >= 0); }
Example 4
Source File: TestAMWebServicesJobs.java From big-c with Apache License 2.0 | 4 votes |
public void verifyAMJobGenericSecure(Job job, int mapsPending, int mapsRunning, int reducesPending, int reducesRunning, Boolean uberized, String diagnostics, int newReduceAttempts, int runningReduceAttempts, int failedReduceAttempts, int killedReduceAttempts, int successfulReduceAttempts, int newMapAttempts, int runningMapAttempts, int failedMapAttempts, int killedMapAttempts, int successfulMapAttempts) { String diagString = ""; List<String> diagList = job.getDiagnostics(); if (diagList != null && !diagList.isEmpty()) { StringBuffer b = new StringBuffer(); for (String diag : diagList) { b.append(diag); } diagString = b.toString(); } WebServicesTestUtils.checkStringMatch("diagnostics", diagString, diagnostics); assertEquals("isUber incorrect", job.isUber(), uberized); // unfortunately the following fields are all calculated in JobInfo // so not easily accessible without doing all the calculations again. // For now just make sure they are present. assertTrue("mapsPending not >= 0", mapsPending >= 0); assertTrue("mapsRunning not >= 0", mapsRunning >= 0); assertTrue("reducesPending not >= 0", reducesPending >= 0); assertTrue("reducesRunning not >= 0", reducesRunning >= 0); assertTrue("newReduceAttempts not >= 0", newReduceAttempts >= 0); assertTrue("runningReduceAttempts not >= 0", runningReduceAttempts >= 0); assertTrue("failedReduceAttempts not >= 0", failedReduceAttempts >= 0); assertTrue("killedReduceAttempts not >= 0", killedReduceAttempts >= 0); assertTrue("successfulReduceAttempts not >= 0", successfulReduceAttempts >= 0); assertTrue("newMapAttempts not >= 0", newMapAttempts >= 0); assertTrue("runningMapAttempts not >= 0", runningMapAttempts >= 0); assertTrue("failedMapAttempts not >= 0", failedMapAttempts >= 0); assertTrue("killedMapAttempts not >= 0", killedMapAttempts >= 0); assertTrue("successfulMapAttempts not >= 0", successfulMapAttempts >= 0); }