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/01/19 00:15:56 UTC
[accumulo] branch master updated (c134e65 -> 28b53e0)
This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git.
from c134e65 ACCUMULO-4771 Fix datatables paging in Monitor
new 65f9913 ACCUMULO-4611 Bump to version 1.9.0-SNAPSHOT
new 9ac92c7 ACCUMULO-4611 Deprecate public API with commons config
new 4d90f21 Merge branch '1.8' into master-drop-commons-config
new 28b53e0 ACCUMULO-4611 Remove commons-config from API
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
core/pom.xml | 13 +-
.../org/apache/accumulo/core/cli/ClientOpts.java | 4 +-
.../accumulo/core/client/ClientConfiguration.java | 190 +++++++++++++--------
.../accumulo/core/client/ZooKeeperInstance.java | 35 ++--
.../accumulo/core/client/impl/ClientContext.java | 9 +-
.../core/client/mapred/AbstractInputFormat.java | 2 +-
.../core/client/mapred/AccumuloOutputFormat.java | 2 +-
.../core/client/mapreduce/AbstractInputFormat.java | 2 +-
.../client/mapreduce/AccumuloOutputFormat.java | 2 +-
.../accumulo/core/rpc/SaslConnectionParams.java | 9 +-
.../core/client/ClientConfigurationTest.java | 16 +-
.../core/client/impl/ClientContextTest.java | 8 +-
.../core/client/impl/TableOperationsImplTest.java | 2 +-
.../core/client/impl/TabletLocatorImplTest.java | 2 +-
.../mapreduce/lib/impl/ConfiguratorBaseTest.java | 2 +-
minicluster/pom.xml | 5 -
.../accumulo/minicluster/MiniAccumuloInstance.java | 17 +-
.../minicluster/impl/MiniAccumuloClusterImpl.java | 10 +-
pom.xml | 2 +-
proxy/pom.xml | 4 -
.../main/java/org/apache/accumulo/proxy/Proxy.java | 2 +-
.../org/apache/accumulo/proxy/ProxyServer.java | 8 +-
server/tserver/pom.xml | 4 -
.../replication/ReplicationProcessorTest.java | 4 +-
.../org/apache/accumulo/shell/ShellOptionsJC.java | 3 +-
.../org/apache/accumulo/shell/ShellConfigTest.java | 6 +-
.../accumulo/shell/ShellSetInstanceTest.java | 4 +-
.../accumulo/harness/AccumuloClusterHarness.java | 3 +-
.../StandaloneAccumuloClusterConfiguration.java | 9 +-
.../apache/accumulo/test/ConditionalWriterIT.java | 5 +-
.../org/apache/accumulo/test/IMMLGBenchmark.java | 2 +-
.../org/apache/accumulo/test/ShellServerIT.java | 12 +-
.../java/org/apache/accumulo/test/UsersIT.java | 3 +-
.../BalanceInPresenceOfOfflineTableIT.java | 3 +-
.../test/functional/ChaoticBalancerIT.java | 3 +-
.../accumulo/test/functional/CompactionIT.java | 3 +-
.../test/functional/ConfigurableMacBase.java | 2 +-
.../accumulo/test/functional/CredentialsIT.java | 3 +-
.../test/functional/DynamicThreadPoolsIT.java | 3 +-
.../accumulo/test/functional/FateStarvationIT.java | 3 +-
.../accumulo/test/functional/MasterFailoverIT.java | 5 +-
.../apache/accumulo/test/functional/MaxOpenIT.java | 3 +-
.../accumulo/test/functional/PermissionsIT.java | 5 +-
.../accumulo/test/functional/ReadWriteIT.java | 11 +-
.../apache/accumulo/test/functional/RenameIT.java | 5 +-
.../apache/accumulo/test/functional/RestartIT.java | 11 +-
.../accumulo/test/functional/ScanIteratorIT.java | 4 +-
.../apache/accumulo/test/functional/SplitIT.java | 7 +-
.../apache/accumulo/test/functional/TableIT.java | 3 +-
.../accumulo/test/functional/WriteAheadLogIT.java | 3 +-
.../accumulo/test/functional/WriteLotsIT.java | 5 +-
.../test/mapred/AccumuloOutputFormatIT.java | 2 +-
.../metadata/MetadataBatchScanTest.java | 2 +-
.../test/performance/thrift/NullTserver.java | 2 +-
54 files changed, 218 insertions(+), 271 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@accumulo.apache.org" <co...@accumulo.apache.org>'].
[accumulo] 02/02: ACCUMULO-4611 Remove commons-config from API
Posted by ct...@apache.org.
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
commit 28b53e007f77cbf6c2ddea424d8eaf327f5569ec
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Thu Jan 18 19:12:35 2018 -0500
ACCUMULO-4611 Remove commons-config from API
* Removes commons-config classes deprecated in 1.9.0 from this 2.0
branch's public API
---
.../accumulo/core/client/ClientConfiguration.java | 845 +--------------------
.../accumulo/core/client/ZooKeeperInstance.java | 24 +-
.../accumulo/core/client/impl/ClientContext.java | 5 +-
.../core/client/mapred/AbstractInputFormat.java | 2 +-
.../core/client/mapred/AccumuloOutputFormat.java | 2 +-
.../core/client/mapreduce/AbstractInputFormat.java | 2 +-
.../client/mapreduce/AccumuloOutputFormat.java | 2 +-
.../core/client/ClientConfigurationTest.java | 17 +-
minicluster/pom.xml | 4 -
.../accumulo/minicluster/MiniAccumuloInstance.java | 18 -
proxy/pom.xml | 4 -
server/tserver/pom.xml | 4 -
12 files changed, 34 insertions(+), 895 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 632b843..6f0274c 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
@@ -21,34 +21,22 @@ import static com.google.common.base.Preconditions.checkArgument;
import java.io.File;
import java.io.StringReader;
import java.io.StringWriter;
-import java.math.BigDecimal;
-import java.math.BigInteger;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
import java.util.UUID;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.conf.PropertyType;
-import org.apache.commons.configuration.AbstractConfiguration;
import org.apache.commons.configuration.CompositeConfiguration;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.MapConfiguration;
import org.apache.commons.configuration.PropertiesConfiguration;
-import org.apache.commons.configuration.event.ConfigurationErrorEvent;
-import org.apache.commons.configuration.event.ConfigurationErrorListener;
-import org.apache.commons.configuration.event.ConfigurationEvent;
-import org.apache.commons.configuration.event.ConfigurationListener;
-import org.apache.commons.configuration.interpol.ConfigurationInterpolator;
-import org.apache.commons.lang.text.StrSubstitutor;
-import org.apache.commons.logging.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -57,13 +45,15 @@ import org.slf4j.LoggerFactory;
*
* @since 1.6.0
*/
-public class ClientConfiguration extends CompositeConfiguration {
+public class ClientConfiguration {
private static final Logger log = LoggerFactory.getLogger(ClientConfiguration.class);
public static final String USER_ACCUMULO_DIR_NAME = ".accumulo";
public static final String USER_CONF_FILENAME = "config";
public static final String GLOBAL_CONF_FILENAME = "client.conf";
+ private final CompositeConfiguration compositeConfig;
+
public enum ClientProperty {
// SSL
RPC_SSL_TRUSTSTORE_PATH(Property.RPC_SSL_TRUSTSTORE_PATH),
@@ -145,72 +135,10 @@ public class ClientConfiguration extends CompositeConfiguration {
}
}
- // helper for the constructor which takes a String file name
- private static PropertiesConfiguration newPropsFile(String file) throws ConfigurationException {
- PropertiesConfiguration props = new PropertiesConfiguration();
- props.setListDelimiter('\0');
- props.load(file);
- return props;
- }
-
- // helper for the constructor which takes a File
- private static PropertiesConfiguration newPropsFile(File file) throws ConfigurationException {
- PropertiesConfiguration props = new PropertiesConfiguration();
- props.setListDelimiter('\0');
- props.load(file);
- return props;
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API; use {@link #fromFile(File)} instead.
- */
- @Deprecated
- public ClientConfiguration(String configFile) throws ConfigurationException {
- this(Collections.singletonList(newPropsFile(configFile)));
- }
-
- /**
- * Load a client configuration from the provided configuration properties file
- *
- * @param configFile
- * the path to the properties file
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API; use {@link #fromFile(File)} instead.
- */
- @Deprecated
- public ClientConfiguration(File configFile) throws ConfigurationException {
- this(Collections.singletonList(newPropsFile(configFile)));
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- public ClientConfiguration(List<? extends Configuration> configs) {
- super(configs);
- // Don't do list interpolation
- this.setListDelimiter('\0');
- for (Configuration c : configs) {
- if (c instanceof AbstractConfiguration) {
- AbstractConfiguration abstractConfiguration = (AbstractConfiguration) c;
- if (!abstractConfiguration.isDelimiterParsingDisabled() && abstractConfiguration.getListDelimiter() != '\0') {
- log.warn("Client configuration constructed with a Configuration that did not have list delimiter disabled or overridden, multi-valued config "
- + "properties may be unavailable");
- abstractConfiguration.setListDelimiter('\0');
- }
- }
- }
- }
-
- /**
- * Iterates through the Configuration objects, populating this object.
- *
- * @see PropertiesConfiguration
- * @see #loadDefault()
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- public ClientConfiguration(Configuration... configs) {
- this(Arrays.asList(configs));
+ private ClientConfiguration(List<? extends Configuration> configs) {
+ compositeConfig = new CompositeConfiguration(configs);
+ // Don't do list interpolation; the items in configs should already have set this
+ compositeConfig.setListDelimiter('\0');
}
/**
@@ -241,7 +169,7 @@ public class ClientConfiguration extends CompositeConfiguration {
* @since 1.9.0
*/
public static ClientConfiguration create() {
- return new ClientConfiguration(Collections.<Configuration> emptyList());
+ return new ClientConfiguration(Collections.emptyList());
}
/**
@@ -253,8 +181,11 @@ public class ClientConfiguration extends CompositeConfiguration {
* @since 1.9.0
*/
public static ClientConfiguration fromFile(File file) {
+ PropertiesConfiguration props = new PropertiesConfiguration();
+ props.setListDelimiter('\0');
try {
- return new ClientConfiguration(file);
+ props.load(file);
+ return new ClientConfiguration(Collections.singletonList(props));
} catch (ConfigurationException e) {
throw new IllegalArgumentException("Bad configuration file: " + file, e);
}
@@ -305,7 +236,7 @@ public class ClientConfiguration extends CompositeConfiguration {
} catch (ConfigurationException e) {
throw new IllegalArgumentException("Error deserializing client configuration: " + serializedConfig, e);
}
- return new ClientConfiguration(propConfig);
+ return new ClientConfiguration(Collections.singletonList(propConfig));
}
/**
@@ -351,7 +282,7 @@ public class ClientConfiguration extends CompositeConfiguration {
public String serialize() {
PropertiesConfiguration propConfig = new PropertiesConfiguration();
- propConfig.copy(this);
+ propConfig.copy(compositeConfig);
StringWriter writer = new StringWriter();
try {
propConfig.save(writer);
@@ -367,8 +298,8 @@ public class ClientConfiguration extends CompositeConfiguration {
*
*/
public String get(ClientProperty prop) {
- if (this.containsKey(prop.getKey()))
- return this.getString(prop.getKey());
+ if (compositeConfig.containsKey(prop.getKey()))
+ return compositeConfig.getString(prop.getKey());
else
return prop.getDefaultValue();
}
@@ -397,10 +328,10 @@ public class ClientConfiguration extends CompositeConfiguration {
if (prefix.endsWith(".")) {
prefix = prefix.substring(0, prefix.length() - 1);
}
- Iterator<?> iter = this.getKeys(prefix);
+ Iterator<?> iter = compositeConfig.getKeys(prefix);
while (iter.hasNext()) {
String p = (String) iter.next();
- propMap.put(p, getString(p));
+ propMap.put(p, compositeConfig.getString(p));
}
return propMap;
}
@@ -435,7 +366,7 @@ public class ClientConfiguration extends CompositeConfiguration {
* @since 1.9.0
*/
public ClientConfiguration with(String prop, String value) {
- super.setProperty(prop, value);
+ compositeConfig.setProperty(prop, value);
return this;
}
@@ -552,7 +483,8 @@ public class ClientConfiguration extends CompositeConfiguration {
* @since 1.9.0
*/
public boolean hasSasl() {
- return getBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getKey(), Boolean.parseBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getDefaultValue()));
+ return compositeConfig.getBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getKey(),
+ Boolean.parseBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getDefaultValue()));
}
/**
@@ -568,746 +500,17 @@ public class ClientConfiguration extends CompositeConfiguration {
return withSasl(saslEnabled).with(ClientProperty.KERBEROS_SERVER_PRIMARY, kerberosServerPrimary);
}
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Configuration getConfiguration(int index) {
- return super.getConfiguration(index);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Configuration getSource(String key) {
- return super.getSource(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void removeConfiguration(Configuration config) {
- super.removeConfiguration(config);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void addConfiguration(Configuration config) {
- super.addConfiguration(config);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Configuration getInMemoryConfiguration() {
- return super.getInMemoryConfiguration();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Log getLogger() {
- return super.getLogger();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Configuration subset(String prefix) {
- return super.subset(prefix);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Configuration interpolatedConfiguration() {
- return super.interpolatedConfiguration();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void setLogger(Log log) {
- super.setLogger(log);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public ConfigurationInterpolator getInterpolator() {
- return super.getInterpolator();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public synchronized StrSubstitutor getSubstitutor() {
- return super.getSubstitutor();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void append(Configuration c) {
- super.append(c);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void copy(Configuration c) {
- super.copy(c);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void addConfigurationListener(ConfigurationListener l) {
- super.addConfigurationListener(l);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public boolean removeConfigurationListener(ConfigurationListener l) {
- return super.removeConfigurationListener(l);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public boolean removeErrorListener(ConfigurationErrorListener l) {
- return super.removeErrorListener(l);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void addErrorListener(ConfigurationErrorListener l) {
- super.addErrorListener(l);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void addErrorLogListener() {
- super.addErrorLogListener();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void addProperty(String key, Object value) {
- super.addProperty(key, value);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- protected void addPropertyDirect(String key, Object token) {
- super.addPropertyDirect(key, token);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void clear() {
- super.clear();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void clearConfigurationListeners() {
- super.clearConfigurationListeners();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void clearErrorListeners() {
- super.clearErrorListeners();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void clearProperty(String key) {
- super.clearProperty(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- protected void clearPropertyDirect(String key) {
- super.clearPropertyDirect(key);
- }
-
- @Override
public boolean containsKey(String key) {
- return super.containsKey(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- protected ConfigurationErrorEvent createErrorEvent(int type, String propName, Object propValue, Throwable ex) {
- return super.createErrorEvent(type, propName, propValue, ex);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- protected ConfigurationEvent createEvent(int type, String propName, Object propValue, boolean before) {
- return super.createEvent(type, propName, propValue, before);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- protected ConfigurationInterpolator createInterpolator() {
- return super.createInterpolator();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- protected void fireError(int type, String propName, Object propValue, Throwable ex) {
- super.fireError(type, propName, propValue, ex);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- protected void fireEvent(int type, String propName, Object propValue, boolean before) {
- super.fireEvent(type, propName, propValue, before);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public BigDecimal getBigDecimal(String key) {
- return super.getBigDecimal(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public BigDecimal getBigDecimal(String key, BigDecimal defaultValue) {
- return super.getBigDecimal(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public BigInteger getBigInteger(String key) {
- return super.getBigInteger(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public BigInteger getBigInteger(String key, BigInteger defaultValue) {
- return super.getBigInteger(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public boolean getBoolean(String key) {
- return super.getBoolean(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public boolean getBoolean(String key, boolean defaultValue) {
- return super.getBoolean(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Boolean getBoolean(String key, Boolean defaultValue) {
- return super.getBoolean(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public byte getByte(String key) {
- return super.getByte(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public byte getByte(String key, byte defaultValue) {
- return super.getByte(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Byte getByte(String key, Byte defaultValue) {
- return super.getByte(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @SuppressWarnings("rawtypes")
- @Override
- public Collection getConfigurationListeners() {
- return super.getConfigurationListeners();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public double getDouble(String key) {
- return super.getDouble(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Double getDouble(String key, Double defaultValue) {
- return super.getDouble(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public double getDouble(String key, double defaultValue) {
- return super.getDouble(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @SuppressWarnings("rawtypes")
- @Override
- public Collection getErrorListeners() {
- return super.getErrorListeners();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public float getFloat(String key) {
- return super.getFloat(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Float getFloat(String key, Float defaultValue) {
- return super.getFloat(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public float getFloat(String key, float defaultValue) {
- return super.getFloat(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public int getInt(String key) {
- return super.getInt(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public int getInt(String key, int defaultValue) {
- return super.getInt(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Integer getInteger(String key, Integer defaultValue) {
- return super.getInteger(key, defaultValue);
+ return compositeConfig.containsKey(key);
}
@SuppressWarnings("unchecked")
- @Override
public Iterator<String> getKeys() {
- return super.getKeys();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @SuppressWarnings("unchecked")
- @Override
- public Iterator<String> getKeys(String key) {
- return super.getKeys(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @SuppressWarnings("rawtypes")
- @Override
- public List getList(String key) {
- return super.getList(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @SuppressWarnings("rawtypes")
- @Override
- public List getList(String key, List defaultValue) {
- return super.getList(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public char getListDelimiter() {
- return super.getListDelimiter();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public long getLong(String key) {
- return super.getLong(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public long getLong(String key, long defaultValue) {
- return super.getLong(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Long getLong(String key, Long defaultValue) {
- return super.getLong(key, defaultValue);
+ return compositeConfig.getKeys();
}
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public int getNumberOfConfigurations() {
- return super.getNumberOfConfigurations();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Properties getProperties(String key) {
- return super.getProperties(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Properties getProperties(String key, Properties defaults) {
- return super.getProperties(key, defaults);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Object getProperty(String key) {
- return super.getProperty(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public short getShort(String key) {
- return super.getShort(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public short getShort(String key, short defaultValue) {
- return super.getShort(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public Short getShort(String key, Short defaultValue) {
- return super.getShort(key, defaultValue);
- }
-
- @Override
public String getString(String key) {
- return super.getString(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public String getString(String key, String defaultValue) {
- return super.getString(key, defaultValue);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public String[] getStringArray(String key) {
- return super.getStringArray(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- protected Object interpolate(Object value) {
- return super.interpolate(value);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- protected String interpolate(String base) {
- return super.interpolate(base);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @SuppressWarnings("rawtypes")
- @Override
- protected String interpolateHelper(String base, List priorVariables) {
- return super.interpolateHelper(base, priorVariables);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public boolean isDelimiterParsingDisabled() {
- return super.isDelimiterParsingDisabled();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public boolean isDetailEvents() {
- return super.isDetailEvents();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public boolean isEmpty() {
- return super.isEmpty();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public boolean isThrowExceptionOnMissing() {
- return super.isThrowExceptionOnMissing();
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- protected Object resolveContainerStore(String key) {
- return super.resolveContainerStore(key);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void setDelimiterParsingDisabled(boolean delimiterParsingDisabled) {
- super.setDelimiterParsingDisabled(delimiterParsingDisabled);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void setDetailEvents(boolean enable) {
- super.setDetailEvents(enable);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void setListDelimiter(char listDelimiter) {
- super.setListDelimiter(listDelimiter);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void setProperty(String key, Object value) {
- super.setProperty(key, value);
- }
-
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- @Override
- public void setThrowExceptionOnMissing(boolean throwExceptionOnMissing) {
- super.setThrowExceptionOnMissing(throwExceptionOnMissing);
+ return compositeConfig.getString(key);
}
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
index 4097651..892e0bd 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
@@ -41,7 +41,6 @@ import org.apache.accumulo.core.util.TextUtil;
import org.apache.accumulo.core.zookeeper.ZooUtil;
import org.apache.accumulo.fate.zookeeper.ZooCache;
import org.apache.accumulo.fate.zookeeper.ZooCacheFactory;
-import org.apache.commons.configuration.Configuration;
import org.apache.hadoop.io.Text;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -128,28 +127,9 @@ public class ZooKeeperInstance implements Instance {
this(ClientConfiguration.loadDefault().withInstance(instanceId).withZkHosts(zooKeepers).withZkTimeout(sessionTimeout));
}
- /**
- * @param config
- * Client configuration for specifying connection options. See {@link ClientConfiguration} which extends Configuration with convenience methods
- * specific to Accumulo.
- * @since 1.6.0
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API; use
- * {@link #ZooKeeperInstance(ClientConfiguration)} instead.
- */
- @Deprecated
- public ZooKeeperInstance(Configuration config) {
- this(config, new ZooCacheFactory());
- }
-
- ZooKeeperInstance(Configuration config, ZooCacheFactory zcf) {
+ ZooKeeperInstance(ClientConfiguration config, ZooCacheFactory zcf) {
checkArgument(config != null, "config is null");
- if (config instanceof ClientConfiguration) {
- this.clientConf = (ClientConfiguration) config;
- } else {
- @SuppressWarnings("deprecation")
- ClientConfiguration cliConf = new ClientConfiguration(config);
- this.clientConf = cliConf;
- }
+ this.clientConf = config;
this.instanceId = clientConf.get(ClientProperty.INSTANCE_ID);
this.instanceName = clientConf.get(ClientProperty.INSTANCE_NAME);
if ((instanceId == null) == (instanceName == null))
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
index 58ee966..831779c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
@@ -38,7 +38,6 @@ import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.rpc.SaslConnectionParams;
import org.apache.accumulo.core.rpc.SslConnectionParams;
import org.apache.accumulo.core.security.thrift.TCredentials;
-import org.apache.commons.configuration.Configuration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -168,7 +167,7 @@ public class ClientContext {
* the original {@link ClientConfiguration}
* @return the client configuration presented in the form of an {@link AccumuloConfiguration}
*/
- public static AccumuloConfiguration convertClientConfig(final Configuration config) {
+ public static AccumuloConfiguration convertClientConfig(final ClientConfiguration config) {
final AccumuloConfiguration defaults = DefaultConfiguration.getInstance();
@@ -213,7 +212,7 @@ public class ClientContext {
public void getProperties(Map<String,String> props, Predicate<String> filter) {
defaults.getProperties(props, filter);
- Iterator<?> keyIter = config.getKeys();
+ Iterator<String> keyIter = config.getKeys();
while (keyIter.hasNext()) {
String key = keyIter.next().toString();
if (filter.test(key))
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
index 632a442..b2f0ed7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
@@ -232,7 +232,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V> {
*/
@Deprecated
public static void setZooKeeperInstance(JobConf job, String instanceName, String zooKeepers) {
- setZooKeeperInstance(job, new ClientConfiguration().withInstance(instanceName).withZkHosts(zooKeepers));
+ setZooKeeperInstance(job, ClientConfiguration.create().withInstance(instanceName).withZkHosts(zooKeepers));
}
/**
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
index 5feadb8..6f07ce7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
@@ -220,7 +220,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation> {
@Deprecated
public static void setZooKeeperInstance(JobConf job, String instanceName, String zooKeepers) {
- setZooKeeperInstance(job, new ClientConfiguration().withInstance(instanceName).withZkHosts(zooKeepers));
+ setZooKeeperInstance(job, ClientConfiguration.create().withInstance(instanceName).withZkHosts(zooKeepers));
}
/**
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
index 3cf2cf4..72a9c92 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
@@ -257,7 +257,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
*/
@Deprecated
public static void setZooKeeperInstance(Job job, String instanceName, String zooKeepers) {
- setZooKeeperInstance(job, new ClientConfiguration().withInstance(instanceName).withZkHosts(zooKeepers));
+ setZooKeeperInstance(job, ClientConfiguration.create().withInstance(instanceName).withZkHosts(zooKeepers));
}
/**
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
index 1e06ca3..e821b5d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
@@ -220,7 +220,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation> {
*/
@Deprecated
public static void setZooKeeperInstance(Job job, String instanceName, String zooKeepers) {
- setZooKeeperInstance(job, new ClientConfiguration().withInstance(instanceName).withZkHosts(zooKeepers));
+ setZooKeeperInstance(job, ClientConfiguration.create().withInstance(instanceName).withZkHosts(zooKeepers));
}
/**
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 cfef356..4d398fc 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
@@ -22,11 +22,8 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
-import java.util.Arrays;
import org.apache.accumulo.core.client.ClientConfiguration.ClientProperty;
-import org.apache.commons.configuration.Configuration;
-import org.apache.commons.configuration.PropertiesConfiguration;
import org.junit.Test;
public class ClientConfigurationTest {
@@ -55,18 +52,8 @@ public class ClientConfigurationTest {
}
private ClientConfiguration createConfig() {
- Configuration first = new PropertiesConfiguration();
- first.addProperty(ClientProperty.INSTANCE_ZK_HOST.getKey(), "firstZkHosts");
- Configuration second = new PropertiesConfiguration();
- second.addProperty(ClientProperty.INSTANCE_ZK_HOST.getKey(), "secondZkHosts");
- second.addProperty(ClientProperty.INSTANCE_NAME.getKey(), "secondInstanceName");
- Configuration third = new PropertiesConfiguration();
- third.addProperty(ClientProperty.INSTANCE_ZK_HOST.getKey(), "thirdZkHosts");
- third.addProperty(ClientProperty.INSTANCE_NAME.getKey(), "thirdInstanceName");
- third.addProperty(ClientProperty.INSTANCE_ZK_TIMEOUT.getKey(), "123s");
- @SuppressWarnings("deprecation")
- ClientConfiguration clientConf = new ClientConfiguration(Arrays.asList(first, second, third));
- return clientConf;
+ return ClientConfiguration.create().with(ClientProperty.INSTANCE_ZK_HOST, "firstZkHosts").with(ClientProperty.INSTANCE_NAME, "secondInstanceName")
+ .with(ClientProperty.INSTANCE_ZK_TIMEOUT, "123s");
}
@Test
diff --git a/minicluster/pom.xml b/minicluster/pom.xml
index 179c810..0947cc7 100644
--- a/minicluster/pom.xml
+++ b/minicluster/pom.xml
@@ -40,10 +40,6 @@
<artifactId>guava</artifactId>
</dependency>
<dependency>
- <groupId>commons-configuration</groupId>
- <artifactId>commons-configuration</artifactId>
- </dependency>
- <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloInstance.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloInstance.java
index 87dc488..a1af708 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloInstance.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloInstance.java
@@ -24,8 +24,6 @@ import org.apache.accumulo.core.client.ClientConfiguration;
import org.apache.accumulo.core.client.Instance;
import org.apache.accumulo.core.client.ZooKeeperInstance;
import org.apache.accumulo.core.conf.Property;
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.hadoop.conf.Configuration;
/**
@@ -42,22 +40,6 @@ public class MiniAccumuloInstance extends ZooKeeperInstance {
.withZkHosts(getZooKeepersFromDir(directory)));
}
- /**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
- */
- @Deprecated
- public static PropertiesConfiguration getConfigProperties(File directory) {
- try {
- PropertiesConfiguration conf = new PropertiesConfiguration();
- conf.setListDelimiter('\0');
- conf.load(new File(new File(directory, "conf"), "client.conf"));
- return conf;
- } catch (ConfigurationException e) {
- // this should never happen since we wrote the config file ourselves
- throw new IllegalArgumentException(e);
- }
- }
-
// Keep this private to avoid bringing it into the public API
private static String getZooKeepersFromDir(File directory) throws FileNotFoundException {
if (!directory.isDirectory())
diff --git a/proxy/pom.xml b/proxy/pom.xml
index 2e441bb..ff291f4 100644
--- a/proxy/pom.xml
+++ b/proxy/pom.xml
@@ -40,10 +40,6 @@
<artifactId>guava</artifactId>
</dependency>
<dependency>
- <groupId>commons-configuration</groupId>
- <artifactId>commons-configuration</artifactId>
- </dependency>
- <dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
diff --git a/server/tserver/pom.xml b/server/tserver/pom.xml
index d024ce4..8f319de 100644
--- a/server/tserver/pom.xml
+++ b/server/tserver/pom.xml
@@ -53,10 +53,6 @@
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
- <groupId>commons-configuration</groupId>
- <artifactId>commons-configuration</artifactId>
- </dependency>
- <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
--
To stop receiving notification emails like this one, please contact
"commits@accumulo.apache.org" <co...@accumulo.apache.org>.
[accumulo] 01/02: Merge branch '1.8' into master-drop-commons-config
Posted by ct...@apache.org.
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
commit 4d90f21ce37d6eded07faa49309f659e3eafa36a
Merge: c134e65 9ac92c7
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Thu Jan 18 17:58:29 2018 -0500
Merge branch '1.8' into master-drop-commons-config
core/pom.xml | 13 +-
.../org/apache/accumulo/core/cli/ClientOpts.java | 4 +-
.../accumulo/core/client/ClientConfiguration.java | 907 ++++++++++++++++++++-
.../accumulo/core/client/ZooKeeperInstance.java | 23 +-
.../accumulo/core/client/impl/ClientContext.java | 4 +-
.../accumulo/core/rpc/SaslConnectionParams.java | 9 +-
.../core/client/ClientConfigurationTest.java | 5 +-
.../core/client/impl/ClientContextTest.java | 8 +-
.../core/client/impl/TableOperationsImplTest.java | 2 +-
.../core/client/impl/TabletLocatorImplTest.java | 2 +-
.../mapreduce/lib/impl/ConfiguratorBaseTest.java | 2 +-
minicluster/pom.xml | 1 -
.../accumulo/minicluster/MiniAccumuloInstance.java | 7 +-
.../minicluster/impl/MiniAccumuloClusterImpl.java | 10 +-
pom.xml | 2 +-
.../main/java/org/apache/accumulo/proxy/Proxy.java | 2 +-
.../org/apache/accumulo/proxy/ProxyServer.java | 8 +-
.../replication/ReplicationProcessorTest.java | 4 +-
.../org/apache/accumulo/shell/ShellOptionsJC.java | 3 +-
.../org/apache/accumulo/shell/ShellConfigTest.java | 6 +-
.../accumulo/shell/ShellSetInstanceTest.java | 4 +-
.../accumulo/harness/AccumuloClusterHarness.java | 3 +-
.../StandaloneAccumuloClusterConfiguration.java | 9 +-
.../apache/accumulo/test/ConditionalWriterIT.java | 5 +-
.../org/apache/accumulo/test/IMMLGBenchmark.java | 2 +-
.../org/apache/accumulo/test/ShellServerIT.java | 12 +-
.../java/org/apache/accumulo/test/UsersIT.java | 3 +-
.../BalanceInPresenceOfOfflineTableIT.java | 3 +-
.../test/functional/ChaoticBalancerIT.java | 3 +-
.../accumulo/test/functional/CompactionIT.java | 3 +-
.../test/functional/ConfigurableMacBase.java | 2 +-
.../accumulo/test/functional/CredentialsIT.java | 3 +-
.../test/functional/DynamicThreadPoolsIT.java | 3 +-
.../accumulo/test/functional/FateStarvationIT.java | 3 +-
.../accumulo/test/functional/MasterFailoverIT.java | 5 +-
.../apache/accumulo/test/functional/MaxOpenIT.java | 3 +-
.../accumulo/test/functional/PermissionsIT.java | 5 +-
.../accumulo/test/functional/ReadWriteIT.java | 11 +-
.../apache/accumulo/test/functional/RenameIT.java | 5 +-
.../apache/accumulo/test/functional/RestartIT.java | 11 +-
.../accumulo/test/functional/ScanIteratorIT.java | 4 +-
.../apache/accumulo/test/functional/SplitIT.java | 7 +-
.../apache/accumulo/test/functional/TableIT.java | 3 +-
.../accumulo/test/functional/WriteAheadLogIT.java | 3 +-
.../accumulo/test/functional/WriteLotsIT.java | 5 +-
.../test/mapred/AccumuloOutputFormatIT.java | 2 +-
.../metadata/MetadataBatchScanTest.java | 2 +-
.../test/performance/thrift/NullTserver.java | 2 +-
48 files changed, 978 insertions(+), 170 deletions(-)
diff --cc minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
index 09dd7e5,f465891..af92622
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
@@@ -95,8 -92,7 +95,6 @@@ import org.apache.accumulo.server.util.
import org.apache.accumulo.server.zookeeper.ZooReaderWriterFactory;
import org.apache.accumulo.start.Main;
import org.apache.accumulo.start.classloader.vfs.MiniDFSUtil;
- import org.apache.commons.configuration.AbstractConfiguration;
- import org.apache.commons.configuration.MapConfiguration;
-import org.apache.commons.io.FileUtils;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.impl.VFSClassLoader;
import org.apache.hadoop.conf.Configuration;
diff --cc pom.xml
index db2a0c7,c24862f..dd82739
--- a/pom.xml
+++ b/pom.xml
@@@ -999,12 -797,12 +999,12 @@@
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>apilyzer-maven-plugin</artifactId>
- <version>1.0.1</version>
+ <version>1.2.0</version>
</plugin>
<plugin>
- <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
- <artifactId>maven-java-formatter-plugin</artifactId>
- <version>0.4</version>
+ <groupId>net.revelc.code.formatter</groupId>
+ <artifactId>formatter-maven-plugin</artifactId>
+ <version>2.7.1</version>
<configuration>
<compilerCompliance>${maven.compiler.source}</compilerCompliance>
<compilerSource>${maven.compiler.source}</compilerSource>
diff --cc test/src/main/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java
index 7532b54,ede79dd..e7b94c1
--- a/test/src/main/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java
@@@ -23,11 -23,8 +23,10 @@@ import java.util.stream.Stream
import org.apache.accumulo.core.cli.BatchWriterOpts;
import org.apache.accumulo.core.cli.ScannerOpts;
import org.apache.accumulo.core.client.ClientConfiguration;
- import org.apache.accumulo.core.client.ClientConfiguration.ClientProperty;
import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.admin.NewTableConfiguration;
import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.util.Pair;
import org.apache.accumulo.harness.AccumuloClusterHarness;
import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
import org.apache.accumulo.server.master.balancer.ChaoticLoadBalancer;
diff --cc test/src/main/java/org/apache/accumulo/test/functional/ReadWriteIT.java
index 82f820b,25cc8e4..5712112
--- a/test/src/main/java/org/apache/accumulo/test/functional/ReadWriteIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ReadWriteIT.java
@@@ -65,12 -62,9 +65,11 @@@ import org.apache.accumulo.core.client.
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.BatchWriterConfig;
import org.apache.accumulo.core.client.ClientConfiguration;
- import org.apache.accumulo.core.client.ClientConfiguration.ClientProperty;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Scanner;
+import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.ZooKeeperInstance;
+import org.apache.accumulo.core.client.admin.NewTableConfiguration;
import org.apache.accumulo.core.client.admin.TableOperations;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
import org.apache.accumulo.core.client.security.tokens.KerberosToken;
diff --cc test/src/main/java/org/apache/accumulo/test/functional/SplitIT.java
index ccb8116,3574328..f31b5c3
--- a/test/src/main/java/org/apache/accumulo/test/functional/SplitIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/SplitIT.java
@@@ -148,26 -146,25 +147,26 @@@ public class SplitIT extends AccumuloCl
while (c.tableOperations().listSplits(table).size() < 10) {
sleepUninterruptibly(15, TimeUnit.SECONDS);
}
- String id = c.tableOperations().tableIdMap().get(table);
- Scanner s = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
- KeyExtent extent = new KeyExtent(id, null, null);
- s.setRange(extent.toMetadataRange());
- MetadataSchema.TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.fetch(s);
- int count = 0;
- int shortened = 0;
- for (Entry<Key,Value> entry : s) {
- extent = new KeyExtent(entry.getKey().getRow(), entry.getValue());
- if (extent.getEndRow() != null && extent.getEndRow().toString().length() < 14)
- shortened++;
- count++;
+ Table.ID id = Table.ID.of(c.tableOperations().tableIdMap().get(table));
+ try (Scanner s = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY)) {
+ KeyExtent extent = new KeyExtent(id, null, null);
+ s.setRange(extent.toMetadataRange());
+ MetadataSchema.TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.fetch(s);
+ int count = 0;
+ int shortened = 0;
+ for (Entry<Key,Value> entry : s) {
+ extent = new KeyExtent(entry.getKey().getRow(), entry.getValue());
+ if (extent.getEndRow() != null && extent.getEndRow().toString().length() < 14)
+ shortened++;
+ count++;
+ }
+
+ assertTrue("Shortened should be greater than zero: " + shortened, shortened > 0);
+ assertTrue("Count should be cgreater than 10: " + count, count > 10);
}
- assertTrue("Shortened should be greater than zero: " + shortened, shortened > 0);
- assertTrue("Count should be cgreater than 10: " + count, count > 10);
-
String[] args;
- if (clientConfig.getBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getKey(), false)) {
+ if (clientConfig.hasSasl()) {
ClusterUser rootUser = getAdminUser();
args = new String[] {"-i", cluster.getInstanceName(), "-u", rootUser.getPrincipal(), "--keytab", rootUser.getKeytab().getAbsolutePath(), "-z",
cluster.getZooKeepers()};
diff --cc test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
index a710f4b,c9da60b..cb9ee98
--- a/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
+++ b/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
@@@ -283,15 -253,14 +283,15 @@@ public class NullTserver
opts.parseArgs(NullTserver.class.getName(), args);
// modify metadata
- ZooKeeperInstance zki = new ZooKeeperInstance(new ClientConfiguration().withInstance(opts.iname).withZkHosts(opts.keepers));
+ ZooKeeperInstance zki = new ZooKeeperInstance(ClientConfiguration.create().withInstance(opts.iname).withZkHosts(opts.keepers));
- AccumuloServerContext context = new AccumuloServerContext(new ServerConfigurationFactory(zki));
+ Instance inst = HdfsZooInstance.getInstance();
+ AccumuloServerContext context = new AccumuloServerContext(inst, new ServerConfigurationFactory(zki));
TransactionWatcher watcher = new TransactionWatcher();
- ThriftClientHandler tch = new ThriftClientHandler(new AccumuloServerContext(new ServerConfigurationFactory(HdfsZooInstance.getInstance())), watcher);
- Processor<Iface> processor = new Processor<Iface>(tch);
- TServerUtils.startTServer(context.getConfiguration(), ThriftServerType.CUSTOM_HS_HA, processor, "NullTServer", "null tserver", 2, 1, 1000,
- 10 * 1024 * 1024, null, null, -1, HostAndPort.fromParts("0.0.0.0", opts.port));
+ ThriftClientHandler tch = new ThriftClientHandler(new AccumuloServerContext(inst, new ServerConfigurationFactory(inst)), watcher);
+ Processor<Iface> processor = new Processor<>(tch);
+ TServerUtils.startTServer(context.getConfiguration(), ThriftServerType.CUSTOM_HS_HA, processor, "NullTServer", "null tserver", 2, 1, 1000, 10 * 1024 * 1024,
+ null, null, -1, HostAndPort.fromParts("0.0.0.0", opts.port));
HostAndPort addr = HostAndPort.fromParts(InetAddress.getLocalHost().getHostName(), opts.port);
--
To stop receiving notification emails like this one, please contact
"commits@accumulo.apache.org" <co...@accumulo.apache.org>.