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 7D15B200C3D for ; Tue, 28 Feb 2017 06:30:52 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7BC7E160B7A; Tue, 28 Feb 2017 05:30:52 +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 CAE53160B60 for ; Tue, 28 Feb 2017 06:30:51 +0100 (CET) Received: (qmail 81901 invoked by uid 500); 28 Feb 2017 05:30:50 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 81890 invoked by uid 99); 28 Feb 2017 05:30:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2017 05:30:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id AF15D1A5F10 for ; Tue, 28 Feb 2017 05:30:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.547 X-Spam-Level: X-Spam-Status: No, score=-1.547 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-2.999, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id x89g3X4c3-5x for ; Tue, 28 Feb 2017 05:30:48 +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 66CEA5F58E for ; Tue, 28 Feb 2017 05:30:48 +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 358EAE073F for ; Tue, 28 Feb 2017 05:30:46 +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 AEA6B2413E for ; Tue, 28 Feb 2017 05:30:45 +0000 (UTC) Date: Tue, 28 Feb 2017 05:30:45 +0000 (UTC) From: "Mingliang Liu (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-14090) Allow users to specify region for DynamoDB table instead of endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 28 Feb 2017 05:30:52 -0000 [ https://issues.apache.org/jira/browse/HADOOP-14090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15887305#comment-15887305 ] Mingliang Liu commented on HADOOP-14090: ---------------------------------------- Sorry for late chime in. I'm thinking about this again (read all the threads and got your points) because I'm refactoring the {{DynamoDBClientFactory}} by replacing {{new AmazonDynamoDBClient}} (deprecated use pattern according to AWS doc) with {{AmazonDynamoDBClientBuilder}}. The {{AmazonDynamoDBClientBuilder}} can be configured either region, or endpoint configuration (mutually exclusive); while the endpoint configuration have both region and endpoint provided. From this I think it's recommended to prefer region to endpoint configuration. Meanwhile if we use endpoint configuration, we will have to provide the associated region as well which we don't. We don't have this problem in our existing code because when we have endpoint configured, the region will be inferred from it in {{new AmazonDynamoDBClient}}. For this we have a few options. I think it's better to make region a config, not the endpoint. The endpoint will only be used for DynamoDBLocal in unit test. We can have new DynamoDBClientFactory implementation to use endpoint; the endpoint config key is not needed any more (having both is indeed fragile and confusing). For the user, the DDB region will be (in order): 1) DDB region in config, or 2) S3 bucket location. If neither of them is provided, that indicates an error in {{DefaultDynamoDBClientFactory}}. I can imagine a few of benefits: # Region is simpler than endpoint for users # {{AmazonDynamoDBClientBuilder}} is simpler (or users will have to provide both region and endpoint) # [HADOOP-14023] will hopefully be simpler # [HADOOP-14027] will hopefully be simpler I also uploaded a patch in [HADOOP-14130] so if that makes sense, this JIRA will be partially resolved as "fixed". > Allow users to specify region for DynamoDB table instead of endpoint > -------------------------------------------------------------------- > > Key: HADOOP-14090 > URL: https://issues.apache.org/jira/browse/HADOOP-14090 > Project: Hadoop Common > Issue Type: Sub-task > Components: fs/s3 > Reporter: Sean Mackrory > Assignee: Sean Mackrory > Attachments: HADOOP-14090-HADOOP-13345.001.patch > > > Assuming the AWS SDK allows this, I think this would be a better way to configure it for any usage on AWS itself (with endpoint still being an option for AWS-compatible non-AWS use cases). Unless users actually care about a specific endpoint, this is easier. Perhaps less important, HADOOP-14023 shows that inferring the region from the endpoint (which granted, isn't that necessary) doesn't work very well at all. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org