Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5647B200BBA for ; Sat, 5 Nov 2016 11:08:44 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 54F78160AEF; Sat, 5 Nov 2016 10:08:44 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9B5CA160AE0 for ; Sat, 5 Nov 2016 11:08:43 +0100 (CET) Received: (qmail 21599 invoked by uid 500); 5 Nov 2016 10:08:42 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 21584 invoked by uid 99); 5 Nov 2016 10:08:42 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Nov 2016 10:08:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 0C974C0708 for ; Sat, 5 Nov 2016 10:08:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id MonPyao_Vtjd for ; Sat, 5 Nov 2016 10:08:40 +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 413425F369 for ; Sat, 5 Nov 2016 10:08:39 +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 uA5A8YvJ022331; Sat, 5 Nov 2016 10:08:34 GMT Message-Id: <201611051008.uA5A8YvJ022331@ip-10-146-233-104.ec2.internal> Date: Sat, 5 Nov 2016 10:08:34 +0000 From: "Lars Volker (Code Review)" To: Tim Armstrong , impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Dan Hecht Reply-To: lv@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-3202=3A_refactor_scratch_file_management_into_TmpFileMgr=0A?= X-Gerrit-Change-Id: I0c56c195f3f28d520034f8c384494e566635fc62 X-Gerrit-ChangeURL: X-Gerrit-Commit: c58b2f92c702bef40b3387570af8cf4672229691 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.12.2 archived-at: Sat, 05 Nov 2016 10:08:44 -0000 Lars Volker has posted comments on this change. Change subject: IMPALA-3202: refactor scratch file management into TmpFileMgr ...................................................................... Patch Set 1: (10 comments) http://gerrit.cloudera.org:8080/#/c/4898/1/be/src/runtime/buffered-block-mgr-test.cc File be/src/runtime/buffered-block-mgr-test.cc: PS1, Line 308: EXPECT_TRUE ASSERT_TRUE? Otherwise we will hit a NPE in DeleteBlocks(). http://gerrit.cloudera.org:8080/#/c/4898/1/be/src/runtime/buffered-block-mgr.cc File be/src/runtime/buffered-block-mgr.cc: Line 246: ->Init(state->io_mgr(), tmp_file_mgr, profile, parent, mem_limit, scratch_limit); This line break looks odd. If it was done by clang-format I'd keep it, but otherwise maybe break after Init( . http://gerrit.cloudera.org:8080/#/c/4898/1/be/src/runtime/tmp-file-mgr.cc File be/src/runtime/tmp-file-mgr.cc: Line 282: DCHECK_EQ(tmp_files_.size(), 0); nit: DCHECK(tmp_files_.empty()); PS1, Line 290: by ignoring the return status of : // NewFile(). we don't seem to actually ignore it, the comment looks wrong. PS1, Line 296: spilling "No scratch directories..."? We seem to use 'tmp', 'scratch', and 'spilling' interchangeably, maybe reduce to one or two of them? Line 335: scratch_space_bytes_used_counter_->Add(num_bytes); can we handle current_bytes_allocated_ here, too? That's also the only direct write access I could find from File to a field of FileGroup, so maybe we can unfriend them, too. Line 336: return Status::OK(); nit: this could just be "return status". Line 351: err_status.MergeStatus(errs[i]); nit: single line http://gerrit.cloudera.org:8080/#/c/4898/1/be/src/runtime/tmp-file-mgr.h File be/src/runtime/tmp-file-mgr.h: PS1, Line 133: nit: double space PS1, Line 136: query_id does this actually have to be the query_id or could we rename it to something like filegroup_id? -- To view, visit http://gerrit.cloudera.org:8080/4898 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c56c195f3f28d520034f8c384494e566635fc62 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Lars Volker Gerrit-HasComments: Yes