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 36C90200C3A for ; Fri, 3 Mar 2017 00:52:53 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 354AC160B6F; Thu, 2 Mar 2017 23:52: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 7DC3C160B7A for ; Fri, 3 Mar 2017 00:52:52 +0100 (CET) Received: (qmail 93149 invoked by uid 500); 2 Mar 2017 23:52:51 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 93138 invoked by uid 99); 2 Mar 2017 23:52:51 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Mar 2017 23:52:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 163F8C687C for ; Thu, 2 Mar 2017 23:52:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.652 X-Spam-Level: X-Spam-Status: No, score=0.652 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id fMLivBAu8ujU for ; Thu, 2 Mar 2017 23:52:50 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 5D2445FBB0 for ; Thu, 2 Mar 2017 23:52:49 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C6157E05F7 for ; Thu, 2 Mar 2017 23:52:45 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6023A2415E for ; Thu, 2 Mar 2017 23:52:45 +0000 (UTC) Date: Thu, 2 Mar 2017 23:52:45 +0000 (UTC) From: "James Clampffer (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-11106) libhdfs++: Some refactoring to better organize files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 02 Mar 2017 23:52:53 -0000 [ https://issues.apache.org/jira/browse/HDFS-11106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Clampffer updated HDFS-11106: ----------------------------------- Attachment: HDFS-11106.HDFS-8707.001.patch New patch (001) ready to review. Just mechanical changes to structure the RPC code. Mostly pulling things out of rpc_engine.h and rpc_connection.cc. > libhdfs++: Some refactoring to better organize files > ---------------------------------------------------- > > Key: HDFS-11106 > URL: https://issues.apache.org/jira/browse/HDFS-11106 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: hdfs-client > Reporter: James Clampffer > Assignee: James Clampffer > Attachments: HDFS-11106.HDFS-8707.000.patch, HDFS-11106.HDFS-8707.001.patch > > > I propose splitting some of the files that have grown wild over time into files that align with more specific functionality. It's probably best to do this in a few pieces so it doesn't invalidate anyone's patches in progress. Here's what I have in mind, looking for feedback if 1) it's not worth doing for some reason 2) it will break your patch and you'd like this to wait. I'd also like to consolidate related functions, mostly protobuf helpers, that are spread around the library into dedicated files. > Targets (can split each into a separate patch): > * (done in patch 000, committed) separate the implementation of operations from async shim code in files like filesystem.cc (make a filesystem_shims.cc). The shims are just boilerplate code that only need to change if the signature of their async counterparts change. > * (done in patch 000, committed) merge base64.cc into util.cc; base64.cc only contains a single utility function. > * (done in patch 000, committed) rename hdfs_public_api.h/cc to hdfs_ioservice.h/cc. Originally all of the implementation declarations of the public API classes like FileSystemImpl were going to live in here. Currently only the hdfs::IoServiceImpl lives in there and the other Impl classes have their own dedicated files. > * split hdfs.cc into hdfs.cc and hdfs_ext.cc. Already have a separate hdfs_ext.h for C bindings for libhdfs++ specific extensions so implementations of those that live in hdfs.cc would be moved out. Just makes things a little cleaner. > * split apart various RPC code based on classes. Things like Request and RpcConnection get defined in rpc_engine.h and then implemented in a handful of files which get confusing to navigate e.g. why would one expect Request's implementation to be in rpc_connection.cc. > * Move all of the protobuf<->C++ struct conversion helpers and protobuf wire serialization/deserialization functions into a single file. Gives us less protobuf header includes and less accidental duplication of these sorts of functions. > Like any refactoring some of it comes down to personal preferences. My hope is that by breaking these into smaller patches/commits relatively fast forward progress can be made on stuff everyone agrees while things that people are concerned about can be worked out in a way that satisfies everyone. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org