You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/05/23 18:43:11 UTC

[GitHub] [lucene-solr] ErickErickson opened a new pull request #1533: SOLR-14474

ErickErickson opened a new pull request #1533:
URL: https://github.com/apache/lucene-solr/pull/1533


   This should finish everything in Solr, I'll commit Tuesday barring objections.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] ErickErickson commented on pull request #1533: SOLR-14474

Posted by GitBox <gi...@apache.org>.
ErickErickson commented on pull request #1533:
URL: https://github.com/apache/lucene-solr/pull/1533#issuecomment-633235060


   > Thanks for doing this!
   > 
   > There are subclasses of FacetParser that are located as inner classes within FacetRequest. I think they should be moved to be inner classes of FacetParser. WDYT? The point is logical organization.
   
   Yeah, good catch. I've been concentrating on getting the warnings out and, especially when it comes to this kind of organization miss some of the higher-level considerations, which is one reason I'm glad for your review.
   
   Anyway, another PR coming later today.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] ErickErickson commented on a change in pull request #1533: SOLR-14474

Posted by GitBox <gi...@apache.org>.
ErickErickson commented on a change in pull request #1533:
URL: https://github.com/apache/lucene-solr/pull/1533#discussion_r429629302



##########
File path: solr/core/src/java/org/apache/solr/cloud/OverseerElectionContext.java
##########
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.solr.cloud;
+
+import java.lang.invoke.MethodHandles;
+import org.apache.solr.common.SolrException;
+import org.apache.solr.common.SolrException.ErrorCode;
+import org.apache.solr.common.cloud.SolrZkClient;
+import org.apache.solr.common.cloud.ZkCmdExecutor;
+import org.apache.solr.common.cloud.ZkNodeProps;
+import org.apache.solr.common.util.Utils;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.solr.common.params.CommonParams.ID;
+final class OverseerElectionContext extends ElectionContext {

Review comment:
       Done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] ErickErickson commented on a change in pull request #1533: SOLR-14474

Posted by GitBox <gi...@apache.org>.
ErickErickson commented on a change in pull request #1533:
URL: https://github.com/apache/lucene-solr/pull/1533#discussion_r429630097



##########
File path: solr/core/src/java/org/apache/solr/update/TransactionLog.java
##########
@@ -657,7 +659,8 @@ public LogReader(long startingPos) {
     }
 
     // for classes that extend
-    protected LogReader() {}

Review comment:
       Done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] ErickErickson closed pull request #1533: SOLR-14474

Posted by GitBox <gi...@apache.org>.
ErickErickson closed pull request #1533:
URL: https://github.com/apache/lucene-solr/pull/1533


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] dsmiley commented on a change in pull request #1533: SOLR-14474

Posted by GitBox <gi...@apache.org>.
dsmiley commented on a change in pull request #1533:
URL: https://github.com/apache/lucene-solr/pull/1533#discussion_r429598265



##########
File path: solr/core/src/java/org/apache/solr/cloud/OverseerElectionContext.java
##########
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.solr.cloud;
+
+import java.lang.invoke.MethodHandles;
+import org.apache.solr.common.SolrException;
+import org.apache.solr.common.SolrException.ErrorCode;
+import org.apache.solr.common.cloud.SolrZkClient;
+import org.apache.solr.common.cloud.ZkCmdExecutor;
+import org.apache.solr.common.cloud.ZkNodeProps;
+import org.apache.solr.common.util.Utils;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.solr.common.params.CommonParams.ID;
+final class OverseerElectionContext extends ElectionContext {

Review comment:
       add newline

##########
File path: solr/core/src/java/org/apache/solr/update/TransactionLog.java
##########
@@ -657,7 +659,8 @@ public LogReader(long startingPos) {
     }
 
     // for classes that extend
-    protected LogReader() {}

Review comment:
       IntelliJ has a "Simple methods in one line" option that I recommend to check.  It seems you auto-indented some things.

##########
File path: solr/core/src/java/org/apache/solr/handler/component/StatsComponent.java
##########
@@ -167,89 +167,91 @@ public void finishStage(ResponseBuilder rb) {
   public String getDescription() {
     return "Calculate Statistics";
   }
-}
 
-/**
- * Models all of the information about stats needed for a single request
- * @see StatsField
- */
-class StatsInfo {
-
-  private final ResponseBuilder rb;
-  private final List<StatsField> statsFields = new ArrayList<>(7);
-  private final Map<String, StatsValues> distribStatsValues = new LinkedHashMap<>();
-  private final Map<String, StatsField> statsFieldMap = new LinkedHashMap<>();
-  private final Map<String, List<StatsField>> tagToStatsFields = new LinkedHashMap<>();
-
-  public StatsInfo(ResponseBuilder rb) { 
-    this.rb = rb;
-    SolrParams params = rb.req.getParams();
-    String[] statsParams = params.getParams(StatsParams.STATS_FIELD);
-    if (null == statsParams) {
-      // no stats.field params, nothing to parse.
-      return;
-    }
-    
-    for (String paramValue : statsParams) {
-      StatsField current = new StatsField(rb, paramValue);
-      statsFields.add(current);
-      for (String tag : current.getTagList()) {
-        List<StatsField> fieldList = tagToStatsFields.get(tag);
-        if (fieldList == null) {
-          fieldList = new ArrayList<>();
+
+  /**
+   * Models all of the information about stats needed for a single request
+   *
+   * @see StatsField
+   */
+  static class StatsInfo {

Review comment:
       Didn't we agree in JIRA this should be in its own file?  What made you change your mind?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] ErickErickson commented on a change in pull request #1533: SOLR-14474

Posted by GitBox <gi...@apache.org>.
ErickErickson commented on a change in pull request #1533:
URL: https://github.com/apache/lucene-solr/pull/1533#discussion_r429638118



##########
File path: solr/core/src/java/org/apache/solr/handler/component/StatsComponent.java
##########
@@ -167,89 +167,91 @@ public void finishStage(ResponseBuilder rb) {
   public String getDescription() {
     return "Calculate Statistics";
   }
-}
 
-/**
- * Models all of the information about stats needed for a single request
- * @see StatsField
- */
-class StatsInfo {
-
-  private final ResponseBuilder rb;
-  private final List<StatsField> statsFields = new ArrayList<>(7);
-  private final Map<String, StatsValues> distribStatsValues = new LinkedHashMap<>();
-  private final Map<String, StatsField> statsFieldMap = new LinkedHashMap<>();
-  private final Map<String, List<StatsField>> tagToStatsFields = new LinkedHashMap<>();
-
-  public StatsInfo(ResponseBuilder rb) { 
-    this.rb = rb;
-    SolrParams params = rb.req.getParams();
-    String[] statsParams = params.getParams(StatsParams.STATS_FIELD);
-    if (null == statsParams) {
-      // no stats.field params, nothing to parse.
-      return;
-    }
-    
-    for (String paramValue : statsParams) {
-      StatsField current = new StatsField(rb, paramValue);
-      statsFields.add(current);
-      for (String tag : current.getTagList()) {
-        List<StatsField> fieldList = tagToStatsFields.get(tag);
-        if (fieldList == null) {
-          fieldList = new ArrayList<>();
+
+  /**
+   * Models all of the information about stats needed for a single request
+   *
+   * @see StatsField
+   */
+  static class StatsInfo {

Review comment:
       Yeah, lost track of that, thanks for pointing it out! It'll be in the next PR.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org