Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 232AE101D9 for ; Wed, 25 Feb 2015 01:28:40 +0000 (UTC) Received: (qmail 11432 invoked by uid 500); 25 Feb 2015 01:28:05 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 11387 invoked by uid 500); 25 Feb 2015 01:28:05 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 11376 invoked by uid 99); 25 Feb 2015 01:28:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2015 01:28:05 +0000 Date: Wed, 25 Feb 2015 01:28:05 +0000 (UTC) From: "Andrew Wang (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-11620) Add Support for Load Balancing across a group of KMS servers for HA MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-11620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14335806#comment-14335806 ] Andrew Wang commented on HADOOP-11620: -------------------------------------- Hi Arun, thanks for working on this. Broad strokes look good, just mostly nitty stuff: KMSClientProvider: * Unused import * Typo: presesnt * Could we split the new parsing into functions? * What is the purpose of the new constructor that takes a Path, and marking the current one as @VisibleForTesting? TestKeyProviderFactory: * Unused new imports TestKMS: * Unused import, although unrelated to this patch * Is the createProvider refactor related to this patch? Doesn't seem necessary. LoadBalancingKMSClientProvider: * getCurrentIdx is unused * Let's use {{Time.monotonicNow}} rather than {{System.currentTimeMillis}}, better precision. * {{seed}} is not quite the right term in the test constructor, maybe just {{currentIdx}}? * in doOp, let's use slf4j substitution instead of string concatenation for the logs. * In doOp, I'd recommend always printing the LOG warn on an exception (the else case), then additionally log "Failed to contact any of the KMS in the load balancer group, aborting." if we're at the end. It'd also be good to include the IOE's message in the first log. * doOp would also be more clear as a for loop, rather than nesting all these doOp calls. Seems like recursion will lead to funky stacktraces too. * getStartIdx, maybe rename to {{nextIdx}} as it's not strictly a getter? Since this pre-increments, it makes using the test constructor a little more difficult, would be easier if it did post-increment. * Just using {{volatile}} isn't enough to safely increment {{currentIdx}}. I guess it's not a big deal, but it'd be safer to use an AtomicInt here. * Some lihes longer than 80 chars. TestLoadBalancingKMSClientProvider: * Needs an auto-formatter pass, the multi-line chained mocking should be double indented * Let's use some more descriptive messages than "Should fail" :) > Add Support for Load Balancing across a group of KMS servers for HA > ------------------------------------------------------------------- > > Key: HADOOP-11620 > URL: https://issues.apache.org/jira/browse/HADOOP-11620 > Project: Hadoop Common > Issue Type: Improvement > Components: kms > Affects Versions: 2.6.0 > Reporter: Arun Suresh > Assignee: Arun Suresh > Attachments: HADOOP-11620.1.patch, HADOOP-11620.2.patch, HADOOP-11620.3.patch, HADOOP-11620.4.patch > > > This patch needs to add support for : > * specification of multiple hostnames in the kms key provider uri > * KMS client to load balance requests across the hosts specified in the kms keyprovider uri. -- This message was sent by Atlassian JIRA (v6.3.4#6332)