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 33DA6200AE4 for ; Fri, 24 Jun 2016 23:48:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3263D160A2E; Fri, 24 Jun 2016 21:48:19 +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 7BEBC160A6B for ; Fri, 24 Jun 2016 23:48:18 +0200 (CEST) Received: (qmail 37280 invoked by uid 500); 24 Jun 2016 21:48:16 -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 37243 invoked by uid 99); 24 Jun 2016 21:48:16 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2016 21:48:16 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8C1402C14F8 for ; Fri, 24 Jun 2016 21:48:16 +0000 (UTC) Date: Fri, 24 Jun 2016 21:48:16 +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, 24 Jun 2016 21:48:19 -0000 [ https://issues.apache.org/jira/browse/HDFS-10533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mingliang Liu updated HDFS-10533: --------------------------------- Status: Patch Available (was: Open) > 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 > > > 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.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org