From commits-return-21892-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Thu Jun 7 01:46:47 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 9EB0F180671 for ; Thu, 7 Jun 2018 01:46:46 +0200 (CEST) Received: (qmail 56618 invoked by uid 500); 6 Jun 2018 23:46:45 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 56609 invoked by uid 99); 6 Jun 2018 23:46:45 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2018 23:46:45 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 20F2282AB9; Wed, 6 Jun 2018 23:46:45 +0000 (UTC) Date: Wed, 06 Jun 2018 23:46:45 +0000 To: "commits@accumulo.apache.org" Subject: [accumulo] branch master updated: #408 - Fix deprecation warnings (#522) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <152832880505.18117.1421043560525335844@gitbox.apache.org> From: ctubbsii@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: accumulo X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 8c95e2fd31b387f8566f9c2c315210af2bd70d6e X-Git-Newrev: 882704395adfd14098c8e000bc27d4d2e9a85c46 X-Git-Rev: 882704395adfd14098c8e000bc27d4d2e9a85c46 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/master by this push: new 8827043 #408 - Fix deprecation warnings (#522) 8827043 is described below commit 882704395adfd14098c8e000bc27d4d2e9a85c46 Author: Mike Walch AuthorDate: Wed Jun 6 19:46:42 2018 -0400 #408 - Fix deprecation warnings (#522) --- .../accumulo/core/client/ClientConfiguration.java | 1 + .../core/client/ClientConfigurationTest.java | 23 ++++++++++++---------- .../org/apache/accumulo/shell/ShellOptionsJC.java | 3 --- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java index 516cb89..4ee1984 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java +++ b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java @@ -47,6 +47,7 @@ import org.slf4j.LoggerFactory; * @since 1.6.0 * @deprecated since 2.0.0, replaced {@link Connector#builder()} */ +@Deprecated public class ClientConfiguration { private static final Logger log = LoggerFactory.getLogger(ClientConfiguration.class); diff --git a/core/src/test/java/org/apache/accumulo/core/client/ClientConfigurationTest.java b/core/src/test/java/org/apache/accumulo/core/client/ClientConfigurationTest.java index 82c1760..8212a2f 100644 --- a/core/src/test/java/org/apache/accumulo/core/client/ClientConfigurationTest.java +++ b/core/src/test/java/org/apache/accumulo/core/client/ClientConfigurationTest.java @@ -23,12 +23,16 @@ import static org.junit.Assert.assertTrue; import java.io.File; import java.io.IOException; -import org.apache.accumulo.core.client.ClientConfiguration.ClientProperty; import org.junit.Test; -@Deprecated +@SuppressWarnings("deprecation") public class ClientConfigurationTest { + private static org.apache.accumulo.core.client.ClientConfiguration.ClientProperty INSTANCE_NAME = org.apache.accumulo.core.client.ClientConfiguration.ClientProperty.INSTANCE_NAME; + private static org.apache.accumulo.core.client.ClientConfiguration.ClientProperty INSTANCE_ZK_HOST = org.apache.accumulo.core.client.ClientConfiguration.ClientProperty.INSTANCE_ZK_HOST; + private static org.apache.accumulo.core.client.ClientConfiguration.ClientProperty INSTANCE_ZK_TIMEOUT = org.apache.accumulo.core.client.ClientConfiguration.ClientProperty.INSTANCE_ZK_TIMEOUT; + private static org.apache.accumulo.core.client.ClientConfiguration.ClientProperty RPC_SSL_TRUSTSTORE_TYPE = ClientConfiguration.ClientProperty.RPC_SSL_TRUSTSTORE_TYPE; + @Test public void testOverrides() { ClientConfiguration clientConfig = createConfig(); @@ -47,17 +51,16 @@ public class ClientConfigurationTest { } private void assertExpectedConfig(ClientConfiguration clientConfig) { - assertEquals("firstZkHosts", clientConfig.get(ClientProperty.INSTANCE_ZK_HOST)); - assertEquals("secondInstanceName", clientConfig.get(ClientProperty.INSTANCE_NAME)); - assertEquals("123s", clientConfig.get(ClientProperty.INSTANCE_ZK_TIMEOUT)); - assertEquals(ClientProperty.RPC_SSL_TRUSTSTORE_TYPE.getDefaultValue(), - clientConfig.get(ClientProperty.RPC_SSL_TRUSTSTORE_TYPE)); + assertEquals("firstZkHosts", clientConfig.get(INSTANCE_ZK_HOST)); + assertEquals("secondInstanceName", clientConfig.get(INSTANCE_NAME)); + assertEquals("123s", clientConfig.get(INSTANCE_ZK_TIMEOUT)); + assertEquals(RPC_SSL_TRUSTSTORE_TYPE.getDefaultValue(), + clientConfig.get(RPC_SSL_TRUSTSTORE_TYPE)); } private ClientConfiguration createConfig() { - return ClientConfiguration.create().with(ClientProperty.INSTANCE_ZK_HOST, "firstZkHosts") - .with(ClientProperty.INSTANCE_NAME, "secondInstanceName") - .with(ClientProperty.INSTANCE_ZK_TIMEOUT, "123s"); + return ClientConfiguration.create().with(INSTANCE_ZK_HOST, "firstZkHosts") + .with(INSTANCE_NAME, "secondInstanceName").with(INSTANCE_ZK_TIMEOUT, "123s"); } @Test diff --git a/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java b/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java index 6ac99a1..86032f0 100644 --- a/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java +++ b/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java @@ -31,8 +31,6 @@ import java.util.TreeMap; import org.apache.accumulo.core.conf.ClientProperty; import org.apache.hadoop.security.UserGroupInformation; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import com.beust.jcommander.DynamicParameter; import com.beust.jcommander.IStringConverter; @@ -41,7 +39,6 @@ import com.beust.jcommander.ParameterException; import com.beust.jcommander.converters.FileConverter; public class ShellOptionsJC { - private static final Logger log = LoggerFactory.getLogger(ShellOptionsJC.class); @Parameter(names = {"-u", "--user"}, description = "username") private String username = null; -- To stop receiving notification emails like this one, please contact ctubbsii@apache.org.