From commits-return-10187-archive-asf-public=cust-asf.ponee.io@hudi.apache.org Mon Jan 20 03:18:59 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id E09B1180674 for ; Mon, 20 Jan 2020 04:18:58 +0100 (CET) Received: (qmail 51620 invoked by uid 500); 20 Jan 2020 03:18:58 -0000 Mailing-List: contact commits-help@hudi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hudi.apache.org Delivered-To: mailing list commits@hudi.apache.org Received: (qmail 51601 invoked by uid 99); 20 Jan 2020 03:18:58 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jan 2020 03:18:58 +0000 From: GitBox To: commits@hudi.apache.org Subject: [GitHub] [incubator-hudi] vinothchandar commented on a change in pull request #1255: [HUDI-559] : Make sure by default table layout version honors the configuration in hoodie.properties Message-ID: <157949033798.28503.2415289077462648974.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Mon, 20 Jan 2020 03:18:57 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit vinothchandar commented on a change in pull request #1255: [HUDI-559] : Make sure by default table layout version honors the configuration in hoodie.properties URL: https://github.com/apache/incubator-hudi/pull/1255#discussion_r368356422 ########## File path: hudi-client/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java ########## @@ -145,7 +145,8 @@ public Boolean shouldAssumeDatePartitioning() { } public Integer getTimelineLayoutVersion() { - return Integer.parseInt(props.getProperty(TIMELINE_LAYOUT_VERSION)); + return props.containsKey(TIMELINE_LAYOUT_VERSION) + ? Integer.parseInt(props.getProperty(TIMELINE_LAYOUT_VERSION)) : null; Review comment: and can't we do this using the regular defaults way? why the special handling for containsKey etc? `props.getProperty(k, default)`? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services