[ 
https://issues.apache.org/jira/browse/MAPREDUCE-2081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918788#action_12918788
 ] 

Ranjit Mathew commented on MAPREDUCE-2081:
------------------------------------------

* If these methods are going to be called again and again, it might make sense 
to cache the mapping upon first invocation instead of re-creating it on each 
invocation. (Of course, this means that we don't expect or recognise new traces 
to be added to the folder between such invocations.)

* In the current code the last file for a given duration (e.g. "10m") 
overwrites the previous such value, if any, and that's why the 
{{listMRTraces()}} methods can't re-use the {{Map}} used for the 
{{getMRTraces()}} methods. We can instead use a {{Map}} that maps a duration 
(e.g. "1d") to a list of trace-files found for that duration. The 
{{getMRTraces()}} method can return the first such file and the 
{{listMRTraces()}} method can return all such files.

* I think that the methods can be named a bit better to reflect their usage. I 
suggest {{getAllJobTraces()}} and {{getJobTraceForDuration()}} or something 
like that.

> [GridMix3] Implement functionality for get the list of job traces which has 
> different intervals.
> ------------------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-2081
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2081
>             Project: Hadoop Map/Reduce
>          Issue Type: Test
>          Components: contrib/gridmix
>            Reporter: Vinay Kumar Thota
>            Assignee: Vinay Kumar Thota
>         Attachments: 2081-ydist.patch, 2081-ydist.patch
>
>
> Girdmix system tests should require different job traces with different time 
> intervals for generate and submit the gridmix jobs. So, implement a 
> functionaliy for getting the job traces and arrange them in hash table with 
> time interval as key.Also getting the list of traces from resource location 
> irrespective of time. The following methods needs to implement.
> Method signature:
> public static Map <String, String> getMRTraces(Configuration conf)  throws 
> IOException; - it get the traces with time intervals from resources default 
> location.
> public static Map <String, String> getMRTraces(Configuration conf,Path path)  
> throws IOException; - it get the traces with time intervals from user 
> specified resource location.
> public static List<String> listMRTraces(Configuration conf) throws 
> IOException  -it list all the traces from resource default location 
> irrespective of time interval.
> public static List<String> listMRTraces(Configuration conf, Path tracesPath) 
> throws IOException - it list all the traces from user specified user location 
> irrespective of  time interval.
> public static List<String> listMRTracesByTime(Configuration conf, String 
> timeInterval) throws IOException - it list all traces of a given time 
> interval from default resource location.
> public static List<String> listMRTracesByTime(Configuration conf, String 
> timeInterval,Path path) throws IOException - it list all traces of a given 
> time interval from a given resources location.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to