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 49652200C57 for ; Sat, 1 Apr 2017 01:49:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 47C06160B9F; Fri, 31 Mar 2017 23:49:47 +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 8E359160B8C for ; Sat, 1 Apr 2017 01:49:46 +0200 (CEST) Received: (qmail 19578 invoked by uid 500); 31 Mar 2017 23:49:45 -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 19564 invoked by uid 99); 31 Mar 2017 23:49:45 -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; Fri, 31 Mar 2017 23:49:45 +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 27E18CA7FC for ; Fri, 31 Mar 2017 23:49:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 4wr_OOLSlo1d for ; Fri, 31 Mar 2017 23:49:44 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 28E615FC8A for ; Fri, 31 Mar 2017 23:49:44 +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 5A130E0D2B for ; Fri, 31 Mar 2017 23:49:43 +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 242D721DEC for ; Fri, 31 Mar 2017 23:49:42 +0000 (UTC) Date: Fri, 31 Mar 2017 23:49:42 +0000 (UTC) From: "Mingliang Liu (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-10533) Make DistCpOptions class immutable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 31 Mar 2017 23:49:47 -0000 [ https://issues.apache.org/jira/browse/HDFS-10533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mingliang Liu updated HDFS-10533: --------------------------------- Attachment: (was: HDFS-10533.0011.patch) > Make DistCpOptions class immutable > ---------------------------------- > > Key: HDFS-10533 > URL: https://issues.apache.org/jira/browse/HDFS-10533 > Project: Hadoop HDFS > Issue Type: Improvement > Components: distcp > Reporter: Mingliang Liu > Assignee: Mingliang Liu > Attachments: HDFS-10533.000.patch, HDFS-10533.000.patch, HDFS-10533.001.patch, HDFS-10533.002.patch, HDFS-10533.003.patch, HDFS-10533.004.patch, HDFS-10533.005.patch, HDFS-10533.006.patch, HDFS-10533.007.patch, HDFS-10533.008.patch, HDFS-10533.009.patch, HDFS-10533.010.patch > > > Currently the {{DistCpOptions}} class encapsulates all DistCp options, which may be set from command-line (via the {{OptionsParser}}) or may be set manually (eg construct an instance and call setters). As there are multiple option fields and more (e.g. [HDFS-9868], [HDFS-10314]) to add, validating them can be cumbersome. Ideally, the {{DistCpOptions}} object should be immutable. The benefits are: > # {{DistCpOptions}} is simple and easier to use and share, plus it scales well > # validation is automatic, e.g. manually constructed {{DistCpOptions}} gets validated before usage > # validation error message is well-defined which does not depend on the order of setters > This jira is to track the effort of making the {{DistCpOptions}} immutable by using a Builder pattern for creation. -- 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