Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B32D218113 for ; Wed, 10 Jun 2015 03:35:01 +0000 (UTC) Received: (qmail 57769 invoked by uid 500); 10 Jun 2015 03:35:01 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 57728 invoked by uid 500); 10 Jun 2015 03:35:01 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 57715 invoked by uid 99); 10 Jun 2015 03:35:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jun 2015 03:35:01 +0000 Date: Wed, 10 Jun 2015 03:35:01 +0000 (UTC) From: "sunyerui (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-13873) LoadTestTool addAuthInfoToConf throws UnsupportedOperationException 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/HBASE-13873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14579977#comment-14579977 ] sunyerui commented on HBASE-13873: ---------------------------------- Thanks for your reply, Ted. Forgive me didn't found the same issue in branch-1, would you please give me the issue link? What should I do next? Close this issue or just waiting for patch reviewing? > LoadTestTool addAuthInfoToConf throws UnsupportedOperationException > ------------------------------------------------------------------- > > Key: HBASE-13873 > URL: https://issues.apache.org/jira/browse/HBASE-13873 > Project: HBase > Issue Type: Bug > Components: integration tests > Affects Versions: 0.98.13 > Reporter: sunyerui > Fix For: 0.98.14 > > Attachments: HBASE-13873-0.98.patch > > > When run IntegrationTestIngestWithACL on distributed clusters with kerberos security enabled, the method addAuthInfoToConf() in LoadTestTool will be invoked and throws UnsupportedOperationException, stack as follows: > {code} > 2015-06-09 22:15:33,605 ERROR [main] util.AbstractHBaseTool: Error running command-line tool > java.lang.UnsupportedOperationException > at java.util.AbstractList.add(AbstractList.java:148) > at java.util.AbstractList.add(AbstractList.java:108) > at org.apache.hadoop.hbase.util.LoadTestTool.addAuthInfoToConf(LoadTestTool.java:811) > at org.apache.hadoop.hbase.util.LoadTestTool.loadTable(LoadTestTool.java:516) > at org.apache.hadoop.hbase.util.LoadTestTool.doWork(LoadTestTool.java:479) > at org.apache.hadoop.hbase.util.AbstractHBaseTool.run(AbstractHBaseTool.java:112) > at org.apache.hadoop.hbase.IntegrationTestIngest.runIngestTest(IntegrationTestIngest.java:151) > at org.apache.hadoop.hbase.IntegrationTestIngest.internalRunIngestTest(IntegrationTestIngest.java:114) > at org.apache.hadoop.hbase.IntegrationTestIngest.runTestFromCommandLine(IntegrationTestIngest.java:97) > at org.apache.hadoop.hbase.IntegrationTestBase.doWork(IntegrationTestBase.java:115) > at org.apache.hadoop.hbase.util.AbstractHBaseTool.run(AbstractHBaseTool.java:112) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) > at org.apache.hadoop.hbase.IntegrationTestIngestWithACL.main(IntegrationTestIngestWithACL.java:136) > {code} > The corresponding code is below and the reason is obvious. Arrays.asList return a java.util.Arrays$ArrayList but not java.util.ArrayList. Both of them are inherited from java.util.AbstractList, but the former didn't override the method add(), so the parent method java.util.AbstractList.add() will be invoked and the exception threw. > {code} > private void addAuthInfoToConf(Properties authConfig, Configuration conf, String owner, > String userList) throws IOException { > List users = Arrays.asList(userList.split(",")); > users.add(owner); > ... > } > {code} > Does anyone occurred on this? I think it's an obvious bug but no one report it, so please tell me if I misunderstanding it. If it's actually a bug here, then it can be fixed very easy as below: > {code} > List users = new ArrayList(Arrays.asList(userList.split(","))); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)