SOLR-9588: Remove Guava dependency from SolrJ

This commit is contained in:
Noble Paul 2016-10-03 13:06:33 +05:30
parent 31d07eda18
commit 6f7099233e
6 changed files with 15 additions and 15 deletions

View File

@ -234,6 +234,8 @@ Other Changes
* SOLR-5041: Add a test to make sure that a leader always recovers from log on startup. (Cao Manh Dat, shalin)
* SOLR-9588: Remove Guava dependency from SolrJ (Ishan Chattopadhyaya, noble)
================== 6.2.1 ==================
Bug Fixes

View File

@ -44,7 +44,6 @@
<dependency org="com.fasterxml.jackson.core" name="jackson-annotations" rev="${/com.fasterxml.jackson.core/jackson-annotations}" conf="compile"/>
<dependency org="com.fasterxml.jackson.core" name="jackson-core" rev="${/com.fasterxml.jackson.core/jackson-core}" conf="compile"/>
<dependency org="com.fasterxml.jackson.core" name="jackson-databind" rev="${/com.fasterxml.jackson.core/jackson-databind}" conf="compile"/>
<dependency org="com.google.guava" name="guava" rev="${/com.google.guava/guava}" conf="compile"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>

View File

@ -26,7 +26,6 @@ import java.util.Set;
import javax.security.auth.login.AppConfigurationEntry;
import javax.security.auth.login.Configuration;
import com.google.common.annotations.VisibleForTesting;
import org.apache.http.HttpEntity;
import org.apache.http.HttpEntityEnclosingRequest;
import org.apache.http.HttpRequestInterceptor;
@ -61,8 +60,8 @@ public class Krb5HttpClientBuilder {
/**
* The jaasConfig is static, which makes it problematic for testing in the same jvm.
* Call this function to regenerate the static config (this is not thread safe).
* Note: only used for tests
*/
@VisibleForTesting
public static void regenerateJaasConfiguration() {
jaasConfig = new SolrJaasConfiguration();
}

View File

@ -20,7 +20,6 @@ import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
import com.google.common.annotations.VisibleForTesting;
import org.apache.solr.common.StringUtils;
import org.apache.zookeeper.ZooDefs;
import org.apache.zookeeper.data.ACL;
@ -81,7 +80,9 @@ public class VMParamsAllAndReadonlyDigestZkACLProvider extends SecurityAwareZkAC
digestReadonlyUsername, digestReadonlyPassword);
}
@VisibleForTesting
/**
* Note: only used for tests
*/
protected List<ACL> createACLsToAdd(boolean includeReadOnly,
String digestAllUsername, String digestAllPassword,
String digestReadonlyUsername, String digestReadonlyPassword) {

View File

@ -19,15 +19,15 @@ package org.apache.solr.common.cloud.rule;
import java.lang.invoke.MethodHandles;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.slf4j.Logger;
@ -47,11 +47,8 @@ public class ImplicitSnitch extends Snitch {
public static final String DISK = "freedisk";
public static final String ROLE = "role";
public static final String SYSPROP = "sysprop.";
public static final List<String> IP_SNITCHES = ImmutableList.of("ip_1", "ip_2", "ip_3", "ip_4");
public static final Set<String> tags = ImmutableSet.<String>builder().add(NODE, PORT, HOST, CORES, DISK, ROLE).addAll(IP_SNITCHES).build();
public static final List<String> IP_SNITCHES = Collections.unmodifiableList(Arrays.asList("ip_1", "ip_2", "ip_3", "ip_4"));
public static final Set<String> tags = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(NODE, PORT, HOST, CORES, DISK, ROLE, "ip_1", "ip_2", "ip_3", "ip_4")));
@Override
public void getTags(String solrNode, Set<String> requestedTags, SnitchContext ctx) {

View File

@ -16,16 +16,18 @@
*/
package org.apache.solr.common.cloud.rule;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import com.google.common.collect.ImmutableSet;
import org.apache.solr.common.cloud.rule.ImplicitSnitch;
/**
*
*/
public abstract class Snitch {
public static final Set<Class> WELL_KNOWN_SNITCHES = ImmutableSet.of(ImplicitSnitch.class);
public static final Set<Class> WELL_KNOWN_SNITCHES = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(ImplicitSnitch.class)));
public abstract void getTags(String solrNode, Set<String> requestedTags, SnitchContext ctx);