Return-Path: X-Original-To: apmail-impala-dev-archive@minotaur.apache.org Delivered-To: apmail-impala-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BE83A19D0B for ; Fri, 4 Mar 2016 23:19:08 +0000 (UTC) Received: (qmail 6687 invoked by uid 500); 4 Mar 2016 23:19:08 -0000 Delivered-To: apmail-impala-dev-archive@impala.apache.org Received: (qmail 6637 invoked by uid 500); 4 Mar 2016 23:19:08 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 6626 invoked by uid 99); 4 Mar 2016 23:19:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2016 23:19:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id DF54B1A0740 for ; Fri, 4 Mar 2016 23:19:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 40j3ZYZmkkXu for ; Fri, 4 Mar 2016 23:19:07 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 4F6925F56F for ; Fri, 4 Mar 2016 23:19:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u24NJ4LA020383; Fri, 4 Mar 2016 23:19:04 GMT Message-Id: <201603042319.u24NJ4LA020383@ip-10-146-233-104.ec2.internal> Date: Fri, 4 Mar 2016 23:19:04 +0000 From: "Henry Robinson (Code Review)" To: Bharath Vissapragada , impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Tim Armstrong , Huaisi Xu Reply-To: henry@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?[Impala-CR](cdh5-trunk)_IMPALA-3114:_Add_a_pause_monitor_for_impala_processes.=0A?= X-Gerrit-Change-Id: I04eca63c0c44fa8f1b78833080acdc2176372263 X-Gerrit-ChangeURL: X-Gerrit-Commit: 2f1aa19f08dbf7901a654f8804413e4f996c8fff In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.10-rc0 Henry Robinson has posted comments on this change. Change subject: IMPALA-3114: Add a pause monitor for impala processes. ...................................................................... Patch Set 2: (8 comments) http://gerrit.cloudera.org:8080/#/c/2405/2/be/src/common/init.cc File be/src/common/init.cc: Line 17: #include please don't use boost::thread directly http://gerrit.cloudera.org:8080/#/c/2405/2/be/src/util/pause-monitor.cc File be/src/util/pause-monitor.cc: Line 25: monitor_thread_.reset(new boost::thread(&PauseMonitor::WorkLoop, this)); Please use our Thread API instead of boost::thread. Line 30: monitor_thread_->join(); Let's not join (or do any work) in the destructor. Why not just fail fast? Line 34: MonotonicStopWatch sw; just use MonotonicMillis() to measure time, and avoid the problem of having to convert to NS. Line 35: uint64_t extra_sleep_time; move this inside the loop http://gerrit.cloudera.org:8080/#/c/2405/2/be/src/util/pause-monitor.h File be/src/util/pause-monitor.h: Line 28: class PauseMonitor { I don't think you need a class for this. InitCommonRuntime() can start a thread running WorkLoop() directly. Line 39: milli milliseconds Line 46: /// Runs as long as stop is set to false. : bool stop; I don't think you need this coordination. Why wouldn't the pause monitor just run forever? -- To view, visit http://gerrit.cloudera.org:8080/2405 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04eca63c0c44fa8f1b78833080acdc2176372263 Gerrit-PatchSet: 2 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Bharath Vissapragada Gerrit-Reviewer: Bharath Vissapragada Gerrit-Reviewer: Henry Robinson Gerrit-Reviewer: Huaisi Xu Gerrit-Reviewer: Tim Armstrong Gerrit-HasComments: Yes