From commits-return-12592-archive-asf-public=cust-asf.ponee.io@hudi.apache.org Thu Mar 5 02:42:02 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 8C62318063F for ; Thu, 5 Mar 2020 03:42:02 +0100 (CET) Received: (qmail 62618 invoked by uid 500); 5 Mar 2020 02:42:01 -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 62601 invoked by uid 99); 5 Mar 2020 02:42:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2020 02:42:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 97D32E02AA for ; Thu, 5 Mar 2020 02:42:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 127F578033A for ; Thu, 5 Mar 2020 02:42:00 +0000 (UTC) Date: Thu, 5 Mar 2020 02:42:00 +0000 (UTC) From: "Hong Shen (Jira)" To: commits@hudi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HUDI-657) It's lots of ClientUtils.createMetaClient when write to hudi MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Hong Shen created HUDI-657: ------------------------------ Summary: It's lots of ClientUtils.createMetaClient when write = to hudi Key: HUDI-657 URL: https://issues.apache.org/jira/browse/HUDI-657 Project: Apache Hudi (incubating) Issue Type: Bug Reporter: Hong Shen When I write data to hudi, I find it's lots of loading table properties log= , and each take=C2=A0 about 75ms, like below.=C2=A0 {code} 20/03/05 09:20:32.379 INFO FSUtils: Hadoop Configuration: fs.defaultFS: [fi= le:///], Config:[Configuration: core-default.xml, core-site.xml, mapred-def= ault.xml, mapred-site.xml, yarn-default.xml, yarn-site.xml], FileSystem: [o= rg.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystem@563f38c4] 20/03/05 09:20:32.431 INFO HoodieTableConfig: Loading table properties from= oss://shenhong-test/mr_100_100_100/.hoodie/hoodie.properties 20/03/05 09:20:32.453 INFO HoodieTableMetaClient: Finished Loading Table of= type MERGE_ON_READ(version=3D1) from oss://shenhong-test/mr_100_100_100 {code} It's seems we have to create=C2=A0HoodieTableMetaClient when we use it.=C2= =A0 but it's not need to do that, eg, when we call getHoodieTable, it tran= sfer metaClient, but the constructed function in HoodieTable still createMe= taClient . {code} public static HoodieTable getHoodieTable= (HoodieTableMetaClient metaClient, HoodieWriteConfig config, JavaSparkContext jsc) { switch (metaClient.getTableType()) { case COPY_ON_WRITE: return new HoodieCopyOnWriteTable<>(config, jsc); case MERGE_ON_READ: return new HoodieMergeOnReadTable<>(config, jsc); default: throw new HoodieException("Unsupported table type :" + metaClient.getTable= Type()); } } {code} {code} protected HoodieTable(HoodieWriteConfig config, JavaSparkContext jsc) { this.config =3D config; this.hadoopConfiguration =3D new SerializableConfiguration(jsc.hadoopCo= nfiguration()); this.viewManager =3D FileSystemViewManager.createViewManager(new Serial= izableConfiguration(jsc.hadoopConfiguration()), config.getViewStorageConfig()); this.metaClient =3D ClientUtils.createMetaClient(jsc, config, true); this.index =3D HoodieIndex.createIndex(config, jsc); } {code} =C2=A0I can optimize it if it need. -- This message was sent by Atlassian Jira (v8.3.4#803005)