You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2015/07/22 21:48:05 UTC

[jira] [Commented] (MAPREDUCE-6391) util/Timer.cc completely misunderstands _POSIX_CPUTIME

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

Hadoop QA commented on MAPREDUCE-6391:
--------------------------------------

\\
\\
| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | patch |   0m  0s | The patch file was not named according to hadoop's naming conventions. Please see https://wiki.apache.org/hadoop/HowToContribute for instructions. |
| {color:blue}0{color} | pre-patch |   5m 31s | Pre-patch trunk compilation is healthy. |
| {color:green}+1{color} | @author |   0m  0s | The patch does not contain any @author tags. |
| {color:red}-1{color} | tests included |   0m  0s | The patch doesn't appear to include any new or modified tests.  Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. |
| {color:green}+1{color} | javac |   7m 44s | There were no new javac warning messages. |
| {color:green}+1{color} | release audit |   0m 20s | The applied patch does not increase the total number of release audit warnings. |
| {color:green}+1{color} | whitespace |   0m  0s | The patch has no lines that end in whitespace. |
| {color:green}+1{color} | install |   1m 21s | mvn install still works. |
| {color:green}+1{color} | eclipse:eclipse |   0m 31s | The patch built with eclipse:eclipse. |
| {color:green}+1{color} | mapreduce tests |  10m 37s | Tests passed in hadoop-mapreduce-client-nativetask. |
| | |  26m  8s | |
\\
\\
|| Subsystem || Report/Notes ||
| Patch URL | http://issues.apache.org/jira/secure/attachment/12746616/MAPREDUCE-6391 |
| Optional Tests | javac unit |
| git revision | trunk / 06e5dd2 |
| hadoop-mapreduce-client-nativetask test log | https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5900/artifact/patchprocess/testrun_hadoop-mapreduce-client-nativetask.txt |
| Test Results | https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5900/testReport/ |
| Java | 1.7.0_55 |
| uname | Linux asf905.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux |
| Console output | https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5900/console |


This message was automatically generated.

> util/Timer.cc completely misunderstands _POSIX_CPUTIME
> ------------------------------------------------------
>
>                 Key: MAPREDUCE-6391
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6391
>             Project: Hadoop Map/Reduce
>          Issue Type: Sub-task
>          Components: build
>    Affects Versions: 2.7.0
>            Reporter: Alan Burlison
>            Assignee: Alan Burlison
>         Attachments: MAPREDUCE-6391
>
>
> util/Timer.cc contains the following code:
> clock_gettime(_POSIX_CPUTIME, &ts);
> I'm not exactly sure what sort of time value this code is attempting to obtain (the process's on-CPU time perhaps?) but it is completely wrong, even on Linux. _POSIX_CPUTIME is a feature test macro and is *not* a valid parameter to clock_gettime. From the clock_gettime manpage:
> bq. The symbols _POSIX_MONOTONIC_CLOCK, _POSIX_CPUTIME, _POSIX_THREAD_CPUTIME indicate that CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID are available
> On  my Linux distro the value of _POSIX_CPUTIME is defined as 0. That corresponds to
> bq.  #define __CLOCK_REALTIME0       0       /* obsolete; same as CLOCK_REALTIME */
> And CLOCK_REALTIME is
> bq. #define CLOCK_REALTIME          3       /* wall clock */
> Which I suspect is not what is required here.
> Getting cross-platform CPU time is fiddly, the following blog post has a good summary: http://nadeausoftware.com/articles/2012/03/c_c_tip_how_measure_cpu_time_benchmarking (code examples are CC licensed so should be no taint issues)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)