You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2020/06/14 19:43:41 UTC

[lucene-solr] branch master updated: SOLR-14556: Fix or suppress warnings in solrj/cloud/autoscaling

This is an automated email from the ASF dual-hosted git repository.

erick pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new 8426dc7  SOLR-14556: Fix or suppress warnings in solrj/cloud/autoscaling
8426dc7 is described below

commit 8426dc7a6a3b6b059b38bf0d3fd22a3ef61a45b6
Author: Erick Erickson <Er...@gmail.com>
AuthorDate: Sun Jun 14 15:43:30 2020 -0400

    SOLR-14556: Fix or suppress warnings in solrj/cloud/autoscaling
---
 solr/CHANGES.txt                                   |  2 ++
 .../cloud/autoscaling/AddReplicaSuggester.java     |  3 +++
 .../solrj/cloud/autoscaling/AutoScalingConfig.java | 29 ++++++++++++++++++++++
 .../client/solrj/cloud/autoscaling/Clause.java     | 19 ++++++++++----
 .../cloud/autoscaling/DelegatingCloudManager.java  |  2 +-
 .../cloud/autoscaling/DeleteNodeSuggester.java     |  2 ++
 .../cloud/autoscaling/DeleteReplicaSuggester.java  |  4 +++
 .../cloud/autoscaling/MoveReplicaSuggester.java    |  2 ++
 .../solrj/cloud/autoscaling/NoneSuggester.java     |  2 ++
 .../client/solrj/cloud/autoscaling/Operand.java    |  1 +
 .../client/solrj/cloud/autoscaling/Policy.java     | 12 +++++++++
 .../solrj/cloud/autoscaling/PolicyHelper.java      |  5 ++++
 .../client/solrj/cloud/autoscaling/Preference.java |  9 +++++++
 .../solrj/cloud/autoscaling/ReplicaCount.java      |  6 +++++
 .../solrj/cloud/autoscaling/ReplicaInfo.java       | 10 ++++++--
 .../solrj/cloud/autoscaling/ReplicaVariable.java   |  1 +
 .../solr/client/solrj/cloud/autoscaling/Row.java   | 15 ++++++++---
 .../cloud/autoscaling/SplitShardSuggester.java     |  3 +++
 .../client/solrj/cloud/autoscaling/Suggester.java  | 16 ++++++++++--
 .../client/solrj/cloud/autoscaling/Suggestion.java |  4 +++
 .../cloud/autoscaling/UnsupportedSuggester.java    |  2 ++
 .../client/solrj/cloud/autoscaling/Variable.java   |  3 +++
 .../solrj/cloud/autoscaling/VariableBase.java      |  2 ++
 .../solrj/cloud/autoscaling/VersionedData.java     |  7 ++++++
 .../cloud/autoscaling/WithCollectionVariable.java  |  4 +++
 25 files changed, 152 insertions(+), 13 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 4353990..9bd45de 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -342,6 +342,8 @@ Other Changes
 
 * SOLR-14567: Fix or suppress remaining warnings in solrj (Erick Erickson)
 
+* SOLR-14556: Fix or suppress warnings in solrj/cloud/autoscaling (Erick Erickson)
+
 ==================  8.5.2 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AddReplicaSuggester.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AddReplicaSuggester.java
index 87b831a..58ddb5c 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AddReplicaSuggester.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AddReplicaSuggester.java
@@ -31,13 +31,16 @@ import static org.apache.solr.common.params.CollectionParams.CollectionAction.AD
 
 class AddReplicaSuggester extends Suggester {
 
+  @SuppressWarnings({"rawtypes"})
   SolrRequest init() {
     SolrRequest operation = tryEachNode(true);
     if (operation == null) operation = tryEachNode(false);
     return operation;
   }
 
+  @SuppressWarnings({"rawtypes"})
   SolrRequest tryEachNode(boolean strict) {
+    @SuppressWarnings({"unchecked"})
     Set<Pair<String, String>> shards = (Set<Pair<String, String>>) hints.getOrDefault(Hint.COLL_SHARD, Collections.emptySet());
     if (shards.isEmpty()) {
       throw new RuntimeException("add-replica requires 'collection' and 'shard'");
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java
index 366b891..300b24a 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java
@@ -42,6 +42,7 @@ import static java.util.stream.Collectors.toList;
  * Bean representation of <code>autoscaling.json</code>, which parses data
  * lazily.
  */
+@SuppressWarnings({"overrides"})
 public class AutoScalingConfig implements MapWriter {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
@@ -58,6 +59,7 @@ public class AutoScalingConfig implements MapWriter {
   /**
    * Bean representation of trigger listener config.
    */
+  @SuppressWarnings({"overrides"})
   public static class TriggerListenerConfig implements MapWriter {
     public final String name;
     public final String trigger;
@@ -138,6 +140,11 @@ public class AutoScalingConfig implements MapWriter {
       return properties.equals(that.properties);
     }
 
+//    @Override
+//    public int hashCode() {
+//      throw new UnsupportedOperationException("TODO unimplemented");
+//    }
+//
     @Override
     public String toString() {
       return Utils.toJSONString(this);
@@ -147,6 +154,7 @@ public class AutoScalingConfig implements MapWriter {
   /**
    * Bean representation of trigger config.
    */
+  @SuppressWarnings({"overrides"})
   public static class TriggerConfig implements MapWriter {
     /** Trigger name. */
     public final String name;
@@ -183,6 +191,7 @@ public class AutoScalingConfig implements MapWriter {
       }
       enabled = Boolean.parseBoolean(String.valueOf(this.properties.getOrDefault("enabled", "true")));
 
+      @SuppressWarnings({"unchecked"})
       List<Map<String, Object>> newActions = (List<Map<String, Object>>)this.properties.get("actions");
       if (newActions != null) {
         this.actions = newActions.stream().map(ActionConfig::new).collect(collectingAndThen(toList(), Collections::unmodifiableList));
@@ -225,6 +234,10 @@ public class AutoScalingConfig implements MapWriter {
       if (event != that.event) return false;
       return properties.equals(that.properties);
     }
+//    @Override
+//    public int hashCode() {
+//      throw new UnsupportedOperationException("TODO unimplemented");
+//    }
 
     @Override
     public void writeMap(EntryWriter ew) throws IOException {
@@ -249,6 +262,7 @@ public class AutoScalingConfig implements MapWriter {
   /**
    * Bean representation of trigger action configuration.
    */
+  @SuppressWarnings({"overrides"})
   public static class ActionConfig implements MapWriter {
     /** Action name. */
     public final String name;
@@ -291,6 +305,11 @@ public class AutoScalingConfig implements MapWriter {
       return properties.equals(that.properties);
     }
 
+//    @Override
+//    public int hashCode() {
+//      throw new UnsupportedOperationException("TODO unimplemented");
+//    }
+
     @Override
     public String toString() {
       return Utils.toJSONString(this);
@@ -301,6 +320,7 @@ public class AutoScalingConfig implements MapWriter {
    * Construct from bytes that represent a UTF-8 JSON string.
    * @param utf8 config data
    */
+  @SuppressWarnings({"unchecked"})
   public AutoScalingConfig(byte[] utf8) {
     this(utf8 != null && utf8.length > 0 ? (Map<String, Object>)Utils.fromJSON(utf8) : Collections.emptyMap());
   }
@@ -362,6 +382,7 @@ public class AutoScalingConfig implements MapWriter {
   /**
    * Get trigger configurations.
    */
+  @SuppressWarnings({"unchecked"})
   public Map<String, TriggerConfig> getTriggerConfigs() {
     if (triggers == null) {
       if (jsonMap != null) {
@@ -405,6 +426,7 @@ public class AutoScalingConfig implements MapWriter {
   /**
    * Get listener configurations.
    */
+  @SuppressWarnings({"unchecked"})
   public Map<String, TriggerListenerConfig> getTriggerListenerConfigs() {
     if (listeners == null) {
       if (jsonMap != null) {
@@ -428,6 +450,7 @@ public class AutoScalingConfig implements MapWriter {
   public Map<String, Object> getProperties()  {
     if (properties == null) {
       if (jsonMap != null)  {
+        @SuppressWarnings({"unchecked"})
         Map<String, Object> map = (Map<String, Object>) jsonMap.get("properties");
         if (map == null) {
           this.properties = Collections.emptyMap();
@@ -564,11 +587,17 @@ public class AutoScalingConfig implements MapWriter {
     if (!getTriggerListenerConfigs().equals(that.getTriggerListenerConfigs())) return false;
     return getProperties().equals(that.getProperties());
   }
+//  @Override
+//  public int hashCode() {
+//    throw new UnsupportedOperationException("TODO unimplemented");
+//  }
+
 
   private static List<Object> getList(String key, Map<String, Object> properties) {
     return getList(key, properties, null);
   }
 
+  @SuppressWarnings({"unchecked", "rawtypes"})
   private static List<Object> getList(String key, Map<String, Object> properties, List<Object> defaultList) {
     if (defaultList == null) {
       defaultList = Collections.emptyList();
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java
index 68d30b5..b5c956a 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java
@@ -101,6 +101,7 @@ public class Clause implements MapWriter, Comparable<Clause> {
     this.nodeSetPresent = nodeSetPresent;
   }
 
+  @SuppressWarnings({"unchecked"})
   private Clause(Map<String, Object> m) {
     derivedFrom = (Clause) m.remove(Clause.class.getName());
     this.original = Utils.getDeepCopy(m, 10);
@@ -154,6 +155,7 @@ public class Clause implements MapWriter, Comparable<Clause> {
       String key = validateObjectInNodeset(m, (Map) o);
       parseCondition(key, o, m);
     } else if (o instanceof List) {
+      @SuppressWarnings({"rawtypes"})
       List l = (List) o;
       if(l.size()<2) throwExp(m, "nodeset [] must have atleast 2 items");
       if( checkMapArray(l, m)) return true;
@@ -168,7 +170,8 @@ public class Clause implements MapWriter, Comparable<Clause> {
     return true;
   }
 
-  private String validateObjectInNodeset(Map<String, Object> m, Map map) {
+  private String validateObjectInNodeset(@SuppressWarnings({"rawtypes"})Map<String, Object> m,
+                                         @SuppressWarnings({"rawtypes"})Map map) {
     if (map.size() != 1) {
       throwExp(m, "nodeset must only have one and only one key");
     }
@@ -180,7 +183,8 @@ public class Clause implements MapWriter, Comparable<Clause> {
     return key;
   }
 
-  private boolean checkMapArray(List l, Map<String, Object> m) {
+  private boolean checkMapArray(@SuppressWarnings({"rawtypes"})List l, Map<String, Object> m) {
+    @SuppressWarnings({"rawtypes"})
     List<Map> maps = null;
     for (Object o : l) {
       if (o instanceof Map) {
@@ -192,7 +196,7 @@ public class Clause implements MapWriter, Comparable<Clause> {
     if (maps != null) {
       if (maps.size() != l.size()) throwExp(m, "all elements of nodeset must be Objects");
       List<Condition> tags = new ArrayList<>(maps.size());
-      for (Map map : maps) {
+      for (@SuppressWarnings({"rawtypes"})Map map : maps) {
         String s = validateObjectInNodeset(m, map);
         if(key == null) key = s;
         if(!Objects.equals(key, s)){
@@ -222,6 +226,7 @@ public class Clause implements MapWriter, Comparable<Clause> {
     }
   }
 
+  @SuppressWarnings({"unchecked"})
   public static Clause create(String json) {
     return create((Map<String, Object>) Utils.fromJSONString(json));
   }
@@ -276,7 +281,8 @@ public class Clause implements MapWriter, Comparable<Clause> {
     return globalTag == null;
   }
 
-  void parseCondition(String s, Object o, Map m) {
+  @SuppressWarnings({"unchecked"})
+  void parseCondition(String s, Object o, @SuppressWarnings({"rawtypes"})Map m) {
     if (IGNORE_TAGS.contains(s)) return;
     if (tag != null) {
       throwExp(m, "Only one tag other than collection, shard, replica is possible");
@@ -401,10 +407,11 @@ public class Clause implements MapWriter, Comparable<Clause> {
     }
   }
 
-  public static void throwExp(Map clause, String msg, Object... args) {
+  public static void throwExp(@SuppressWarnings({"rawtypes"})Map clause, String msg, Object... args) {
     throw new IllegalArgumentException("syntax error in clause :" + toJSONString(clause) + " , msg:  " + formatString(msg, args));
   }
 
+  @SuppressWarnings({"unchecked", "rawtypes"})
   private static List readListVal(Map m, List val, Type varType, String conditionName) {
     List list = val;
     list = (List) list.stream()
@@ -466,6 +473,7 @@ public class Clause implements MapWriter, Comparable<Clause> {
     eval.collName = (String) collection.getValue();
     Violation.Ctx ctx = new Violation.Ctx(this, session.matrix, eval);
 
+    @SuppressWarnings({"rawtypes"})
     Set tags = getUniqueTags(session, eval);
     if (tags.isEmpty()) return Collections.emptyList();
 
@@ -505,6 +513,7 @@ public class Clause implements MapWriter, Comparable<Clause> {
     return ctx.allViolations;
   }
 
+  @SuppressWarnings({"unchecked", "rawtypes"})
   private Set getUniqueTags(Policy.Session session, ComputedValueEvaluator eval) {
     Set tags =  new HashSet();
 
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DelegatingCloudManager.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DelegatingCloudManager.java
index 8f3b08b..aa0e62e 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DelegatingCloudManager.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DelegatingCloudManager.java
@@ -77,7 +77,7 @@ public class DelegatingCloudManager implements SolrCloudManager {
   }
 
   @Override
-  public SolrResponse request(SolrRequest req) throws IOException {
+  public SolrResponse request(@SuppressWarnings({"rawtypes"})SolrRequest req) throws IOException {
     return delegate.request(req);
   }
 
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DeleteNodeSuggester.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DeleteNodeSuggester.java
index cfff49e..62bfbde 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DeleteNodeSuggester.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DeleteNodeSuggester.java
@@ -33,7 +33,9 @@ class DeleteNodeSuggester extends Suggester {
   }
 
   @Override
+  @SuppressWarnings({"rawtypes"})
   SolrRequest init() {
+    @SuppressWarnings({"unchecked"})
     Set<String> srcNodes = (Set<String>) hints.get(Hint.SRC_NODE);
     if (srcNodes.isEmpty()) {
       throw new RuntimeException("delete-node requires 'src_node' hint");
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DeleteReplicaSuggester.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DeleteReplicaSuggester.java
index 9a942ad..20f3827 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DeleteReplicaSuggester.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DeleteReplicaSuggester.java
@@ -36,7 +36,9 @@ class DeleteReplicaSuggester extends Suggester {
   }
 
   @Override
+  @SuppressWarnings({"rawtypes"})
   SolrRequest init() {
+    @SuppressWarnings({"unchecked"})
     Set<Pair<String, String>> shards = (Set<Pair<String, String>>) hints.getOrDefault(Hint.COLL_SHARD, Collections.emptySet());
     if (shards.isEmpty()) {
       throw new RuntimeException("delete-replica requires 'collection' and 'shard'");
@@ -45,6 +47,7 @@ class DeleteReplicaSuggester extends Suggester {
       throw new RuntimeException("delete-replica requires exactly one pair of 'collection' and 'shard'");
     }
     Pair<String, String> collShard = shards.iterator().next();
+    @SuppressWarnings({"unchecked"})
     Set<Number> counts = (Set<Number>) hints.getOrDefault(Hint.NUMBER, Collections.emptySet());
     Integer count = null;
     if (!counts.isEmpty()) {
@@ -54,6 +57,7 @@ class DeleteReplicaSuggester extends Suggester {
       Number n = counts.iterator().next();
       count = n.intValue();
     }
+    @SuppressWarnings({"unchecked"})
     Set<String> replicas = (Set<String>) hints.getOrDefault(Hint.REPLICA, Collections.emptySet());
     String replica = null;
     if (!replicas.isEmpty()) {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/MoveReplicaSuggester.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/MoveReplicaSuggester.java
index d529922d..49be0e3 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/MoveReplicaSuggester.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/MoveReplicaSuggester.java
@@ -34,12 +34,14 @@ public class MoveReplicaSuggester extends Suggester {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   @Override
+  @SuppressWarnings({"rawtypes"})
   SolrRequest init() {
     SolrRequest operation = tryEachNode(true);
     if (operation == null) operation = tryEachNode(false);
     return operation;
   }
 
+  @SuppressWarnings({"rawtypes"})
   SolrRequest tryEachNode(boolean strict) {
     //iterate through elements and identify the least loaded
     List<Violation> leastSeriousViolation = null;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/NoneSuggester.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/NoneSuggester.java
index 2f6c369..51bfc70 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/NoneSuggester.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/NoneSuggester.java
@@ -28,11 +28,13 @@ public class NoneSuggester extends Suggester {
   }
 
   @Override
+  @SuppressWarnings({"rawtypes"})
   SolrRequest init() {
     return null;
   }
 
   @Override
+  @SuppressWarnings({"rawtypes"})
   public SolrRequest getSuggestion() {
     return null;
   }
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Operand.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Operand.java
index 58b72bb..dac28c6 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Operand.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Operand.java
@@ -80,6 +80,7 @@ public enum Operand {
   IN("", 0) {
     @Override
     public TestStatus match(Object ruleVal, Object testVal) {
+      @SuppressWarnings({"rawtypes"})
       List l = (List) ruleVal;
       return (l.contains(testVal)) ?  PASS: FAIL;
     }
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Policy.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Policy.java
index 164f827..1c494f0 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Policy.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Policy.java
@@ -70,6 +70,7 @@ import static org.apache.solr.client.solrj.cloud.autoscaling.Variable.Type.WITH_
  * Create a fresh new session for each use
  *
  */
+@SuppressWarnings({"overrides"})
 public class Policy implements MapWriter {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
@@ -80,6 +81,7 @@ public class Policy implements MapWriter {
   public static final String CLUSTER_POLICY = "cluster-policy";
   public static final String CLUSTER_PREFERENCES = "cluster-preferences";
   public static final Set<String> GLOBAL_ONLY_TAGS = Set.of("cores", CollectionAdminParams.WITH_COLLECTION);
+  @SuppressWarnings({"unchecked"})
   public static final List<Preference> DEFAULT_PREFERENCES = Collections.unmodifiableList(
       Arrays.asList(
           // NOTE - if you change this, make sure to update the solrcloud-autoscaling-overview.adoc which
@@ -286,6 +288,11 @@ public class Policy implements MapWriter {
     return getClusterPreferences().equals(policy.getClusterPreferences());
   }
 
+//  @Override
+//  public int hashCode() {
+//    throw new UnsupportedOperationException("TODO unimplemented");
+//  }
+
   public static Map<String, List<Clause>> clausesFromMap(Map<String, List<Map<String, Object>>> map, List<String> newParams) {
     Map<String, List<Clause>> newPolicies = new HashMap<>();
     map.forEach((s, l1) ->
@@ -328,6 +335,7 @@ public class Policy implements MapWriter {
           });
         } catch (Exception e) {
           try {
+            @SuppressWarnings({"rawtypes"})
             Map m = Collections.singletonMap("diagnostics", (MapWriter) ew -> {
               PolicyHelper.writeNodes(ew, matrixCopy);
               ew.put("config", matrix.get(0).session.getPolicy());
@@ -586,8 +594,10 @@ public class Policy implements MapWriter {
         //if any collection has 'withCollection' irrespective of the node, the NodeStateProvider returns a map value
         Map<String, Object> vals = nodeStateProvider.getNodeValues(nodes.get(0), Collections.singleton("withCollection"));
         if (!vals.isEmpty() && vals.get("withCollection") != null) {
+          @SuppressWarnings({"unchecked"})
           Map<String, String> withCollMap = (Map<String, String>) vals.get("withCollection");
           if (!withCollMap.isEmpty()) {
+            @SuppressWarnings({"unchecked"})
             Clause withCollClause = new Clause((Map<String,Object>)Utils.fromJSONString("{withCollection:'*' , node: '#ANY'}") ,
                 new Condition(NODE.tagName, "#ANY", Operand.EQUAL, null, null),
                 new Condition(WITH_COLLECTION.tagName,"*" , Operand.EQUAL, null, null), true, null, false
@@ -672,8 +682,10 @@ public class Policy implements MapWriter {
         //if any collection has 'withCollection' irrespective of the node, the NodeStateProvider returns a map value
         Map<String, Object> vals = nodeStateProvider.getNodeValues(nodes.get(0), Collections.singleton("withCollection"));
         if (!vals.isEmpty() && vals.get("withCollection") != null) {
+          @SuppressWarnings({"unchecked"})
           Map<String, String> withCollMap = (Map<String, String>) vals.get("withCollection");
           if (!withCollMap.isEmpty()) {
+            @SuppressWarnings({"unchecked"})
             Clause withCollClause = new Clause((Map<String,Object>)Utils.fromJSONString("{withCollection:'*' , node: '#ANY'}") ,
                 new Condition(NODE.tagName, "#ANY", Operand.EQUAL, null, null),
                 new Condition(WITH_COLLECTION.tagName,"*" , Operand.EQUAL, null, null), true, null, false
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/PolicyHelper.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/PolicyHelper.java
index 2e176b5..52ad540 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/PolicyHelper.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/PolicyHelper.java
@@ -75,6 +75,7 @@ public class PolicyHelper {
 
   private static final String POLICY_MAPPING_KEY = "PolicyHelper.policyMapping";
 
+  @SuppressWarnings({"unchecked"})
   private static ThreadLocal<Map<String, String>> getPolicyMapping(SolrCloudManager cloudManager) {
     return (ThreadLocal<Map<String, String>>) cloudManager.getObjectCache()
         .computeIfAbsent(POLICY_MAPPING_KEY, k -> new ThreadLocal<>());
@@ -180,6 +181,7 @@ public class PolicyHelper {
             if (diskSpaceReqd.get(shardName) != null) {
               suggester.hint(Hint.MINFREEDISK, diskSpaceReqd.get(shardName));
             }
+            @SuppressWarnings({"rawtypes"})
             SolrRequest op = suggester.getSuggestion();
             if (op == null) {
               String errorId = "AutoScaling.error.diagnostics." + System.nanoTime();
@@ -265,6 +267,7 @@ public class PolicyHelper {
     ctx.max = max;
     ctx.session = policy.createSession(cloudManager);
     String[] t = params == null ? null : params.getParams("type");
+    @SuppressWarnings({"unchecked"})
     List<String> types = t == null? Collections.EMPTY_LIST: Arrays.asList(t);
 
     if(types.isEmpty() || types.contains(violation.name())) {
@@ -320,11 +323,13 @@ public class PolicyHelper {
     ));
   }
 
+  @SuppressWarnings({"unchecked"})
   private static void addMissingReplicas(ReplicaCount count, DocCollection coll, String shard, Replica.Type type, Suggestion.Ctx ctx) {
     int delta = count.delta(coll.getExpectedReplicaCount(type, 0), type);
     for (; ; ) {
       if (!ctx.needMore()) return;
       if (delta >= 0) break;
+      @SuppressWarnings({"rawtypes"})
       SolrRequest suggestion = ctx.addSuggestion(
           ctx.session.getSuggester(ADDREPLICA)
               .hint(Hint.REPLICATYPE, type)
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Preference.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Preference.java
index e5e9599..a464168 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Preference.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Preference.java
@@ -29,6 +29,7 @@ import org.apache.solr.common.util.Utils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@SuppressWarnings({"overrides"})
 public class Preference implements MapWriter {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
@@ -37,6 +38,7 @@ public class Preference implements MapWriter {
   final Policy.Sort sort;
   Preference next;
   final int idx;
+  @SuppressWarnings({"rawtypes"})
   private final Map original;
 
   public Preference(Map<String, Object> m) {
@@ -110,6 +112,7 @@ public class Preference implements MapWriter {
   @Override
   public void writeMap(EntryWriter ew) throws IOException {
     for (Object o : original.entrySet()) {
+      @SuppressWarnings({"rawtypes"})
       Map.Entry e = (Map.Entry) o;
       ew.put(String.valueOf(e.getKey()), e.getValue());
     }
@@ -130,6 +133,11 @@ public class Preference implements MapWriter {
     return original.equals(that.original);
   }
 
+//  @Override
+//  public int hashCode() {
+//    throw new UnsupportedOperationException("TODO unimplemented");
+//  }
+
   public Policy.SortParam getName() {
     return name;
   }
@@ -142,6 +150,7 @@ public class Preference implements MapWriter {
   /**
    * @return an unmodifiable copy of the original map from which this object was constructed
    */
+  @SuppressWarnings({"unchecked", "rawtypes"})
   public Map getOriginal() {
     return Collections.unmodifiableMap(original);
   }
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaCount.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaCount.java
index 8f39b64..1d40211 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaCount.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaCount.java
@@ -24,6 +24,7 @@ import org.apache.solr.common.MapWriter;
 import org.apache.solr.common.cloud.Replica;
 import org.apache.solr.common.util.Utils;
 
+@SuppressWarnings({"overrides"})
 class ReplicaCount  implements MapWriter {
   long nrt, tlog, pull;
 
@@ -106,6 +107,11 @@ class ReplicaCount  implements MapWriter {
     return false;
   }
 
+//  @Override
+//  public int hashCode() {
+//    throw new UnsupportedOperationException("TODO unimplemented");
+//  }
+
   @Override
   public String toString() {
     return Utils.toJSONString(this);
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java
index 09b8bfa..f3a2cde 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java
@@ -35,7 +35,7 @@ import static org.apache.solr.common.ConditionalMapWriter.NON_NULL_VAL;
 import static org.apache.solr.common.ConditionalMapWriter.dedupeKeyPredicate;
 import static org.apache.solr.common.cloud.ZkStateReader.LEADER_PROP;
 
-
+@SuppressWarnings({"overrides"})
 public class ReplicaInfo implements MapWriter {
   private final String name;
   private final String core, collection, shard;
@@ -75,9 +75,10 @@ public class ReplicaInfo implements MapWriter {
     validate();
   }
 
+  @SuppressWarnings({"unchecked"})
   public ReplicaInfo(Map<String, Object> map) {
     this.name = map.keySet().iterator().next();
-    Map details = (Map) map.get(name);
+    @SuppressWarnings({"rawtypes"})Map details = (Map) map.get(name);
     details = Utils.getDeepCopy(details, 4);
     this.collection = (String) details.remove("collection");
     this.shard = (String) details.remove("shard");
@@ -208,6 +209,11 @@ public class ReplicaInfo implements MapWriter {
     }
   }
 
+//  @Override
+//  public int hashCode() {
+//    throw new UnsupportedOperationException("TODO unimplemented");
+//  }
+
   @Override
   public String toString() {
     return Utils.toJSONString(this);
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaVariable.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaVariable.java
index 675382a..5163d3a 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaVariable.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaVariable.java
@@ -156,6 +156,7 @@ class ReplicaVariable extends VariableBase {
     }
   }
 
+  @SuppressWarnings({"unchecked", "rawtypes"})
   private int getNumBuckets(Policy.Session session, Clause clause) {
     if (clause.getTag().getOperand() == Operand.IN) {
       return ((Collection) clause.getTag().val).size();
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Row.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Row.java
index 17b494f..e2b6a55 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Row.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Row.java
@@ -60,7 +60,9 @@ public class Row implements MapWriter {
   boolean anyValueMissing = false;
   boolean isLive = true;
   Policy.Session session;
+  @SuppressWarnings({"rawtypes"})
   Map globalCache;
+  @SuppressWarnings({"rawtypes"})
   Map perCollCache;
 
   public Row(String node, List<Pair<String, Variable.Type>> params, List<String> perReplicaAttributes, Policy.Session session) {
@@ -75,6 +77,7 @@ public class Row implements MapWriter {
    * {@link org.apache.solr.client.solrj.cloud.autoscaling.Policy.Session#Session(List, SolrCloudManager, List, Set, List, NodeStateProvider, Policy, Policy.Transaction)}
    * once the new {@link Policy.Session} instance is available.</p>
    */
+  @SuppressWarnings({"rawtypes"})
   Row(String node, List<Pair<String, Variable.Type>> params, List<String> perReplicaAttributes, Policy.Session session,
       NodeStateProvider nsp, SolrCloudManager cloudManager) {
     this.session = session;
@@ -134,6 +137,7 @@ public class Row implements MapWriter {
   }
 
 
+  @SuppressWarnings({"unchecked"})
   public <R> R computeCacheIfAbsent(String cacheName, Function<Object, R> supplier) {
     R result = (R) globalCache.get(cacheName);
     if (result != null) {
@@ -146,6 +150,7 @@ public class Row implements MapWriter {
     }
   }
 
+  @SuppressWarnings({"unchecked", "rawtypes"})
   public <R> R computeCacheIfAbsent(String coll, String shard, String cacheName, Object key, Function<Object, R> supplier) {
     Map collMap = (Map) this.perCollCache.get(coll);
     if (collMap == null) this.perCollCache.put(coll, collMap = new HashMap());
@@ -165,9 +170,11 @@ public class Row implements MapWriter {
   }
 
 
-
-  public Row(String node, Cell[] cells, boolean anyValueMissing, Map<String,
-      Map<String, List<ReplicaInfo>>> collectionVsShardVsReplicas, boolean isLive, Policy.Session session, Map perRowCache, Map globalCache) {
+  public Row(String node, Cell[] cells, boolean anyValueMissing,
+             @SuppressWarnings({"rawtypes"}) Map<String,
+                     Map<String, List<ReplicaInfo>>> collectionVsShardVsReplicas, boolean isLive, Policy.Session session,
+             @SuppressWarnings({"rawtypes"}) Map perRowCache,
+             @SuppressWarnings({"rawtypes"})Map globalCache) {
     this.session = session;
     this.node = node;
     this.isLive = isLive;
@@ -266,6 +273,7 @@ public class Row implements MapWriter {
 
   boolean isAlreadyCopied = false;
 
+  @SuppressWarnings({"unchecked", "rawtypes"})
   private void lazyCopyReplicas(String coll, String shard) {
     globalCache = new HashMap();
     Map cacheCopy = new HashMap<>(perCollCache);
@@ -286,6 +294,7 @@ public class Row implements MapWriter {
     return collectionVsShardVsReplicas.containsKey(coll);
   }
 
+  @SuppressWarnings({"unchecked"})
   public void createCollShard(Pair<String, String> collShard) {
     Map<String, List<ReplicaInfo>> shardInfo = collectionVsShardVsReplicas.computeIfAbsent(collShard.first(), Utils.NEW_HASHMAP_FUN);
     if (collShard.second() != null) shardInfo.computeIfAbsent(collShard.second(), Utils.NEW_ARRAYLIST_FUN);
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SplitShardSuggester.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SplitShardSuggester.java
index a244a10..b483033 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SplitShardSuggester.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SplitShardSuggester.java
@@ -37,7 +37,9 @@ class SplitShardSuggester extends Suggester {
   }
 
   @Override
+  @SuppressWarnings({"rawtypes"})
   SolrRequest init() {
+    @SuppressWarnings({"unchecked"})
     Set<Pair<String, String>> shards = (Set<Pair<String, String>>) hints.getOrDefault(Hint.COLL_SHARD, Collections.emptySet());
     if (shards.isEmpty()) {
       throw new RuntimeException("split-shard requires 'collection' and 'shard'");
@@ -46,6 +48,7 @@ class SplitShardSuggester extends Suggester {
       throw new RuntimeException("split-shard requires exactly one pair of 'collection' and 'shard'");
     }
     Pair<String, String> collShard = shards.iterator().next();
+    @SuppressWarnings({"unchecked"})
     Map<String, Object> params = (Map<String, Object>)hints.getOrDefault(Hint.PARAMS, Collections.emptyMap());
     Float splitFuzz = (Float)params.get(CommonAdminParams.SPLIT_FUZZ);
     CollectionAdminRequest.SplitShard req = CollectionAdminRequest.splitShard(collShard.first()).setShardName(collShard.second());
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggester.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggester.java
index 26f1a9d..28460cd 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggester.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggester.java
@@ -62,6 +62,7 @@ public abstract class Suggester implements MapWriter {
 
   protected final EnumMap<Hint, Object> hints = new EnumMap<>(Hint.class);
   Policy.Session session;
+  @SuppressWarnings({"rawtypes"})
   SolrRequest operation;
   boolean force;
   protected List<Violation> originalViolations = new ArrayList<>();
@@ -88,6 +89,7 @@ public abstract class Suggester implements MapWriter {
     }
     return false;
   }
+  @SuppressWarnings({"unchecked", "rawtypes"})
   public Suggester hint(Hint hint, Object value) {
     hint.validator.accept(value);
     if (hint.multiValued) {
@@ -143,9 +145,10 @@ public abstract class Suggester implements MapWriter {
     return true;
   }
 
+  @SuppressWarnings({"rawtypes"})
   abstract SolrRequest init();
 
-  @SuppressWarnings("unchecked")
+  @SuppressWarnings({"unchecked", "rawtypes"})
   public SolrRequest getSuggestion() {
     if (!isInitialized) {
       Set<String> collections = (Set<String>) hints.getOrDefault(Hint.COLL, Collections.emptySet());
@@ -226,14 +229,16 @@ public abstract class Suggester implements MapWriter {
   public static class SuggestionInfo implements MapWriter {
     Suggestion.Type type;
     Violation violation;
+    @SuppressWarnings({"rawtypes"})
     SolrRequest operation;
 
-    public SuggestionInfo(Violation violation, SolrRequest op, Suggestion.Type type) {
+    public SuggestionInfo(Violation violation, @SuppressWarnings({"rawtypes"})SolrRequest op, Suggestion.Type type) {
       this.violation = violation;
       this.operation = op;
       this.type = type;
     }
 
+    @SuppressWarnings({"rawtypes"})
     public SolrRequest getOperation() {
       return operation;
     }
@@ -344,6 +349,7 @@ public abstract class Suggester implements MapWriter {
     Object hintVal = hints.get(hint);
     if (hintVal == null) return true;
     if (hint.multiValued) {
+      @SuppressWarnings({"rawtypes"})
       Set set = (Set) hintVal;
       return set == null || set.contains(v);
     } else {
@@ -356,11 +362,13 @@ public abstract class Suggester implements MapWriter {
     // collection shard pair
     // this should be a Pair<String, String> , (collection,shard)
     COLL_SHARD(true, v -> {
+      @SuppressWarnings({"rawtypes"})
       Collection c = v instanceof Collection ? (Collection) v : Collections.singleton(v);
       for (Object o : c) {
         if (!(o instanceof Pair)) {
           throw new RuntimeException("COLL_SHARD hint must use a Pair");
         }
+        @SuppressWarnings({"rawtypes"})
         Pair p = (Pair) o;
         if (p.first() == null || p.second() == null) {
           throw new RuntimeException("Both collection and shard must not be null");
@@ -371,6 +379,7 @@ public abstract class Suggester implements MapWriter {
       @Override
       public Object parse(Object v) {
         if (v instanceof Map) {
+          @SuppressWarnings({"rawtypes"})
           Map map = (Map) v;
           return Pair.parse(map);
         }
@@ -409,6 +418,7 @@ public abstract class Suggester implements MapWriter {
 
     Hint(boolean multiValued) {
       this(multiValued, v -> {
+        @SuppressWarnings({"rawtypes"})
         Collection c = v instanceof Collection ? (Collection) v : Collections.singleton(v);
         for (Object o : c) {
           if (!(o instanceof String)) throw new RuntimeException("hint must be of type String");
@@ -453,6 +463,7 @@ public abstract class Suggester implements MapWriter {
     ew.put("hints", (MapWriter) ew1 -> hints.forEach((hint, o) -> ew1.putNoEx(hint.toString(), o)));
   }
 
+  @SuppressWarnings({"rawtypes"})
   protected Collection setupWithCollectionTargetNodes(Set<String> collections, Set<Pair<String, String>> s, String withCollection) {
     Collection originalTargetNodesCopy = null;
     if (withCollection != null) {
@@ -477,6 +488,7 @@ public abstract class Suggester implements MapWriter {
 
       if (originalTargetNodesCopy != null && !originalTargetNodesCopy.isEmpty()) {
         // find intersection of the set of target nodes with the set of 'withCollection' nodes
+        @SuppressWarnings({"unchecked"})
         Set<String> set = (Set<String>) hints.computeIfAbsent(Hint.TARGET_NODE, h -> new HashSet<>());
         set.retainAll(withCollectionNodes);
         if (set.isEmpty()) {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggestion.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggestion.java
index dd83eb4..29fea84 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggestion.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggestion.java
@@ -42,11 +42,14 @@ public class Suggestion {
     public Policy.Session session;
     public Violation violation;
     List<Suggester.SuggestionInfo> suggestions = new ArrayList<>();
+    @SuppressWarnings({"rawtypes"})
     SolrRequest addSuggestion(Suggester suggester) {
       return addSuggestion(suggester, Type.violation);
     }
 
+    @SuppressWarnings({"rawtypes"})
     SolrRequest addSuggestion(Suggester suggester, Type type) {
+      @SuppressWarnings({"rawtypes"})
       SolrRequest op = suggester.getSuggestion();
       if (op != null) {
         session = suggester.getSession();
@@ -93,6 +96,7 @@ public class Suggestion {
         Suggester suggester = ctx.session.getSuggester(MOVEREPLICA)
             .hint(Suggester.Hint.COLL_SHARD, new Pair<>(ctx.violation.coll, shard))
             .forceOperation(true);
+        @SuppressWarnings({"rawtypes"})
         SolrRequest op = ctx.addSuggestion(suggester);
         if (op == null) continue;
         totalSuggestions++;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/UnsupportedSuggester.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/UnsupportedSuggester.java
index ab5c28b..0ba49ba 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/UnsupportedSuggester.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/UnsupportedSuggester.java
@@ -47,12 +47,14 @@ public class UnsupportedSuggester extends Suggester {
   }
 
   @Override
+  @SuppressWarnings({"rawtypes"})
   SolrRequest init() {
     log.warn("Unsupported suggester for action {} with hings {} - no suggestion available", action, hints);
     return null;
   }
 
   @Override
+  @SuppressWarnings({"rawtypes"})
   public SolrRequest getSuggestion() {
     return null;
   }
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Variable.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Variable.java
index 22fd7a5..4b45107 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Variable.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Variable.java
@@ -237,6 +237,7 @@ public interface Variable {
     DISKTYPE;
 
     public final String tagName;
+    @SuppressWarnings({"rawtypes"})
     public final Class type;
     public Meta meta;
 
@@ -375,6 +376,7 @@ public interface Variable {
   @interface Meta {
     String name();
 
+    @SuppressWarnings({"rawtypes"})
     Class type();
 
     String[] associatedPerNodeValue() default NULL;
@@ -399,6 +401,7 @@ public interface Variable {
 
     String metricsKey() default NULL;
 
+    @SuppressWarnings({"rawtypes"})
     Class implementation() default void.class;
 
     ComputedType[] computedValues() default ComputedType.NULL;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/VariableBase.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/VariableBase.java
index 3001f11..746faca 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/VariableBase.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/VariableBase.java
@@ -98,7 +98,9 @@ public class VariableBase implements Variable {
     return info;
   }
 
+  @SuppressWarnings({"unchecked"})
   static Variable loadImpl(Meta meta, Type t) {
+    @SuppressWarnings({"rawtypes"})
     Class implementation = meta.implementation();
     if (implementation == void.class) implementation = VariableBase.class;
     try {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/VersionedData.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/VersionedData.java
index 2aa4a9b..8fad7cb 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/VersionedData.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/VersionedData.java
@@ -28,6 +28,7 @@ import org.apache.zookeeper.CreateMode;
 /**
  * Immutable representation of binary data with version.
  */
+@SuppressWarnings({"overrides"})
 public class VersionedData implements MapWriter {
   private final int version;
   private final byte[] data;
@@ -91,4 +92,10 @@ public class VersionedData implements MapWriter {
         Objects.equals(owner, that.owner) &&
         mode == that.mode;
   }
+
+//  @Override
+//  public int hashCode() {
+//    throw new UnsupportedOperationException("TODO unimplemented");
+//  }
+
 }
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/WithCollectionVariable.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/WithCollectionVariable.java
index db50726..8cab901 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/WithCollectionVariable.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/WithCollectionVariable.java
@@ -42,6 +42,7 @@ public class WithCollectionVariable extends VariableBase {
 
   @Override
   public boolean match(Object inputVal, Operand op, Object val, String name, Row row) {
+    @SuppressWarnings({"unchecked"})
     Map<String, String> withCollectionMap = (Map<String, String>) inputVal;
     if (withCollectionMap == null || withCollectionMap.isEmpty()) return true;
 
@@ -61,6 +62,7 @@ public class WithCollectionVariable extends VariableBase {
       return;
     }
 
+    @SuppressWarnings({"unchecked"})
     Map<String, String> withCollectionMap = (Map<String, String>) cell.val;
     if (withCollectionMap == null || withCollectionMap.isEmpty()) return;
 
@@ -86,6 +88,7 @@ public class WithCollectionVariable extends VariableBase {
     String node = ctx.currentViolation.node;
     for (Row row : ctx.allRows) {
       if (node.equals(row.node)) {
+        @SuppressWarnings({"unchecked"})
         Map<String, String> withCollectionMap = (Map<String, String>) row.getVal("withCollection");
         if (withCollectionMap != null) {
           row.forEachReplica(r -> {
@@ -111,6 +114,7 @@ public class WithCollectionVariable extends VariableBase {
     if (ctx.violation.getViolatingReplicas().isEmpty()) return;
 
     Map<String, Object> nodeValues = ctx.session.nodeStateProvider.getNodeValues(ctx.violation.node, Collections.singleton("withCollection"));
+    @SuppressWarnings({"unchecked"})
     Map<String, String> withCollectionsMap = (Map<String, String>) nodeValues.get("withCollection");
     if (withCollectionsMap == null) return;