You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2016/10/03 07:36:54 UTC

[1/2] lucene-solr:master: SOLR-9588: Remove Guava dependency from SolrJ

Repository: lucene-solr
Updated Branches:
  refs/heads/master 2f88bc80c -> 08667208b


SOLR-9588: Remove Guava dependency from SolrJ


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/6f709923
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/6f709923
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/6f709923

Branch: refs/heads/master
Commit: 6f7099233ecef8e79eb5914cb17649309f84a6c9
Parents: 31d07ed
Author: Noble Paul <no...@apache.org>
Authored: Mon Oct 3 13:06:33 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Mon Oct 3 13:06:33 2016 +0530

----------------------------------------------------------------------
 solr/CHANGES.txt                                         |  2 ++
 solr/solrj/ivy.xml                                       |  1 -
 .../solr/client/solrj/impl/Krb5HttpClientBuilder.java    |  3 +--
 .../cloud/VMParamsAllAndReadonlyDigestZkACLProvider.java |  5 +++--
 .../apache/solr/common/cloud/rule/ImplicitSnitch.java    | 11 ++++-------
 .../java/org/apache/solr/common/cloud/rule/Snitch.java   |  8 +++++---
 6 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6f709923/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 5d16063..6340ca3 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -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

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6f709923/solr/solrj/ivy.xml
----------------------------------------------------------------------
diff --git a/solr/solrj/ivy.xml b/solr/solrj/ivy.xml
index f2296c5..553e81f 100644
--- a/solr/solrj/ivy.xml
+++ b/solr/solrj/ivy.xml
@@ -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>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6f709923/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Krb5HttpClientBuilder.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Krb5HttpClientBuilder.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Krb5HttpClientBuilder.java
index 84fe5f9..39cc2dc 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Krb5HttpClientBuilder.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Krb5HttpClientBuilder.java
@@ -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();
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6f709923/solr/solrj/src/java/org/apache/solr/common/cloud/VMParamsAllAndReadonlyDigestZkACLProvider.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/VMParamsAllAndReadonlyDigestZkACLProvider.java b/solr/solrj/src/java/org/apache/solr/common/cloud/VMParamsAllAndReadonlyDigestZkACLProvider.java
index 8866245..8a41d06 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/VMParamsAllAndReadonlyDigestZkACLProvider.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/VMParamsAllAndReadonlyDigestZkACLProvider.java
@@ -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) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6f709923/solr/solrj/src/java/org/apache/solr/common/cloud/rule/ImplicitSnitch.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/rule/ImplicitSnitch.java b/solr/solrj/src/java/org/apache/solr/common/cloud/rule/ImplicitSnitch.java
index b177394..1ae618d 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/rule/ImplicitSnitch.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/rule/ImplicitSnitch.java
@@ -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) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6f709923/solr/solrj/src/java/org/apache/solr/common/cloud/rule/Snitch.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/rule/Snitch.java b/solr/solrj/src/java/org/apache/solr/common/cloud/rule/Snitch.java
index 1d78efc..e0417a7 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/rule/Snitch.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/rule/Snitch.java
@@ -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);
 


[2/2] lucene-solr:master: Merge remote-tracking branch 'origin/master'

Posted by no...@apache.org.
Merge remote-tracking branch 'origin/master'


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/08667208
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/08667208
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/08667208

Branch: refs/heads/master
Commit: 08667208baea51eb542eadc9fd00422fae9a3390
Parents: 6f70992 2f88bc8
Author: Noble Paul <no...@apache.org>
Authored: Mon Oct 3 13:06:47 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Mon Oct 3 13:06:47 2016 +0530

----------------------------------------------------------------------
 .../lucene54/Lucene54DocValuesProducer.java     | 262 +++++++++++--------
 .../index/LegacyNumericDocValuesWrapper.java    |   6 +-
 .../lucene54/TestLucene54DocValuesFormat.java   |  55 ++--
 .../lucene/search/TestBooleanRewrites.java      |  19 +-
 .../schema/TestManagedSchemaThreadSafety.java   |   2 +
 5 files changed, 215 insertions(+), 129 deletions(-)
----------------------------------------------------------------------