You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2018/06/06 23:46:45 UTC
[accumulo] branch master updated: #408 - Fix deprecation warnings
(#522)
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 <mw...@apache.org>
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.