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 83035200D0B for ; Wed, 13 Sep 2017 00:15:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8156C1609C8; Tue, 12 Sep 2017 22:15:53 +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 C52861609B4 for ; Wed, 13 Sep 2017 00:15:52 +0200 (CEST) Received: (qmail 42313 invoked by uid 500); 12 Sep 2017 22:15:51 -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 42301 invoked by uid 99); 12 Sep 2017 22:15:50 -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; Tue, 12 Sep 2017 22:15:50 +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 8334A1A1519 for ; Tue, 12 Sep 2017 22:15:50 +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-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id cC89RfjT8pqn for ; Tue, 12 Sep 2017 22:15:49 +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-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 5C8955FD48 for ; Tue, 12 Sep 2017 22:15:49 +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 v8CMFm1I028412; Tue, 12 Sep 2017 22:15:48 GMT Message-Id: <201709122215.v8CMFm1I028412@ip-10-146-233-104.ec2.internal> Date: Tue, 12 Sep 2017 22:15:48 +0000 From: "Dimitris Tsirogiannis (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Alex Behm , Bharath Vissapragada , Vuk Ercegovac Reply-To: dtsirogiannis@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5538=3A_Use_explicit_catalog_versions_for_deleted_objects=0A?= X-Gerrit-Change-Id: I93cb7a033dc8f0d3e0339394b36affe14523274c X-Gerrit-ChangeURL: X-Gerrit-Commit: 378cd14623647abb111313c7594c92b39a898b26 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.7 archived-at: Tue, 12 Sep 2017 22:15:53 -0000 Dimitris Tsirogiannis has posted comments on this change. Change subject: IMPALA-5538: Use explicit catalog versions for deleted objects ...................................................................... Patch Set 2: (16 comments) http://gerrit.cloudera.org:8080/#/c/7731/2/be/src/catalog/catalog-server.cc File be/src/catalog/catalog-server.cc: PS2, Line 233: 0, if they have then skip this step and use that data > nit: perhaps easier to read? "...version 0. If so, then skip ..." Done Line 305: BuildTopicUpdatesHelper(catalog_objects.updated_objects, false); > I like the previous version more where this is inlined into L292. A quick c Done Line 317: if (catalog_object.catalog_version <= last_sent_catalog_version_) continue; > Move this above L312? Done PS2, Line 336: if (topic_deletions) { : VLOG(1) << "Publishing deletion: " << entry_key << "@" : << catalog_object.catalog_version; : } else { : VLOG(1) << "Publishing update: " << entry_key << "@" : << catalog_object.catalog_version; : } > perhaps remove some redundancy this way: Done http://gerrit.cloudera.org:8080/#/c/7731/2/be/src/service/impala-server.cc File be/src/service/impala-server.cc: Line 1340: LOG(INFO) << "Received large catalog update(>100mb): " > Received a large catalog item? Done PS2, Line 1366: if (item.deleted) { : VLOG(3) << "Deleted item: " << item.key << " version: " : << catalog_object.catalog_version; : } else { : VLOG(3) << "Added item: " << item.key << " version: " : << catalog_object.catalog_version; : } > same suggestion as in catalog_server to reduce redundancy. Done http://gerrit.cloudera.org:8080/#/c/7731/2/common/thrift/StatestoreService.thrift File common/thrift/StatestoreService.thrift: Line 86: 3: required bool deleted = false; > Isn't it better to not have a default value to make sure this is always set Done http://gerrit.cloudera.org:8080/#/c/7731/2/fe/src/main/java/org/apache/impala/catalog/CatalogDeltaLog.java File fe/src/main/java/org/apache/impala/catalog/CatalogDeltaLog.java: Line 56: * determine which catalog objects were deleted since the last catalog update topic. > catalog topic update Done Line 57: * Once the catalog update topic is constructed, the old deleted catalog objects are > catalog topic update Done Line 74: // Retrieve all the removed catalog objects with version > 'fromVersion'. > /** style comment Done http://gerrit.cloudera.org:8080/#/c/7731/2/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java File fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java: PS2, Line 152: . > the word "delta" implies that we're dealing with inserts, deletes, and poss Done Line 347: // Identify the catalog objects that were updated (added/dropped) in the catalog with > /** style comment Done Line 351: Set addedCatalogObjectKeys = Sets.newHashSet(); > updatedCatalogObjects? Done Line 363: TCatalogObject catalogTbl = new TCatalogObject(TCatalogObjectType.TABLE, > Why not just iterate over db.getTables()? Done Line 441: addedCatalogObjectKeys.add(CatalogDeltaLog.toCatalogObjectKey(privilege)); > Instead of having a duplicate add() in all places, how about creating the a Done Line 448: for (TCatalogObject removedObject: deltaLog_.retrieveObjects(fromVersion)) { > Nice! Much clearer. Done -- To view, visit http://gerrit.cloudera.org:8080/7731 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I93cb7a033dc8f0d3e0339394b36affe14523274c Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Dimitris Tsirogiannis Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Bharath Vissapragada Gerrit-Reviewer: Dimitris Tsirogiannis Gerrit-Reviewer: Vuk Ercegovac Gerrit-HasComments: Yes