MAPREDUCE-7343. Increase the job name max length in mapred job -list. (#2995). Contributed by Ayush Saxena.
This commit is contained in:
parent
2e58fb671b
commit
5404ab4bca
|
@ -771,10 +771,10 @@ public class CLI extends Configured implements Tool {
|
|||
}
|
||||
|
||||
@Private
|
||||
public static String headerPattern = "%23s\t%20s\t%10s\t%14s\t%12s\t%12s" +
|
||||
public static String headerPattern = "%23s\t%40s\t%10s\t%14s\t%12s\t%12s" +
|
||||
"\t%10s\t%15s\t%15s\t%8s\t%8s\t%10s\t%10s\n";
|
||||
@Private
|
||||
public static String dataPattern = "%23s\t%20s\t%10s\t%14d\t%12s\t%12s" +
|
||||
public static String dataPattern = "%23s\t%40s\t%10s\t%14d\t%12s\t%12s" +
|
||||
"\t%10s\t%15s\t%15s\t%8s\t%8s\t%10s\t%10s\n";
|
||||
private static String memPattern = "%dM";
|
||||
private static String UNAVAILABLE = "N/A";
|
||||
|
@ -792,8 +792,8 @@ public class CLI extends Configured implements Tool {
|
|||
long rsvdMem = job.getReservedMem();
|
||||
long neededMem = job.getNeededMem();
|
||||
int jobNameLength = job.getJobName().length();
|
||||
writer.printf(dataPattern, job.getJobID().toString(),
|
||||
job.getJobName().substring(0, jobNameLength > 20 ? 20 : jobNameLength),
|
||||
writer.printf(dataPattern, job.getJobID().toString(), job.getJobName()
|
||||
.substring(0, jobNameLength > 40 ? 40 : jobNameLength),
|
||||
job.getState(), job.getStartTime(), job.getUsername(),
|
||||
job.getQueue(), job.getPriority().name(),
|
||||
numUsedSlots < 0 ? UNAVAILABLE : numUsedSlots,
|
||||
|
|
Loading…
Reference in New Issue