Skip to content

Commit e523a83

Browse files
epughcpoerschke
andauthored
Review Solr Streaming code for typos (#2657)
Co-authored-by: Christine Poerschke <[email protected]>
1 parent 5f920b1 commit e523a83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+88
-87
lines changed

solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
import org.slf4j.Logger;
4242
import org.slf4j.LoggerFactory;
4343

44-
/** The SolrClientCache caches SolrClients so they can be reused by different TupleStreams. */
44+
/** The SolrClientCache caches SolrClients, so they can be reused by different TupleStreams. */
4545
public class SolrClientCache implements Closeable {
4646

4747
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
4848

4949
// Set the floor for timeouts to 60 seconds.
50-
// Timeouts cans be increased by setting the system properties defined below.
50+
// Timeouts can be increased by setting the system properties defined below.
5151
private static final int MIN_TIMEOUT = 60000;
5252
private static final int minConnTimeout =
5353
Math.max(
@@ -148,7 +148,7 @@ private static CloudHttp2SolrClient newCloudHttp2SolrClient(
148148
/**
149149
* Create (and cache) a SolrClient based around the provided URL
150150
*
151-
* @param baseUrl a Solr URL. May be either a "base" URL (i.e. ending in "/solr"), or point to a
151+
* @param baseUrl a Solr URL. May either be a "base" URL (i.e. ending in "/solr"), or point to a
152152
* particular collection or core.
153153
* @return a SolrClient configured to use the provided URL. The cache retains a reference to the
154154
* returned client, and will close it when callers invoke {@link SolrClientCache#close()}

solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/comp/FieldComparator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ public Explanation toExplanation(StreamFactory factory) throws IOException {
9898

9999
/*
100100
* What are we doing here messing around with lambdas for the comparator logic?
101-
* We want the compare(...) function to run as fast as possible because it will be called many many
101+
* We want the compare(...) function to run as fast as possible because it will be called many
102102
* times over the lifetime of this object. For that reason we want to limit the number of comparisons
103103
* taking place in the compare(...) function. Because this class supports both ascending and
104104
* descending comparisons and the logic for each is slightly different, we want to do the
105105
* if(ascending){ compare like this } else { compare like this }
106106
* check only once - we can do that in the constructor of this class, create a lambda, and then execute
107-
* that lambda in the compare function. A little bit of branch prediction savings right here.
107+
* that lambda in the compare function. A bit of branch prediction savings right here.
108108
*/
109109
@SuppressWarnings({"unchecked"})
110110
private void assignComparator() {

solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/eval/BicubicSplineEvaluator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public Object doWork(Object... objects) throws IOException {
3636

3737
if (objects.length != 3) {
3838
throw new IOException(
39-
"The bicubicSpline function requires three paremeters," + objects.length + " found.");
39+
"The bicubicSpline function requires three parameters," + objects.length + " found.");
4040
}
4141

4242
Object first = objects[0];

solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/eval/IsNullEvaluator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public Object doWork(Object... values) throws IOException {
4545
}
4646

4747
if (values[0] instanceof String) {
48-
// Check to see if the this tuple had a null value for that string.
48+
// Check to see if this tuple had a null value for that string.
4949
String nullField = getStreamContext().getTupleContext().get("null");
5050
if (nullField != null && nullField.equals(values[0])) {
5151
return true;

solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/eval/KnnRegressionEvaluator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public Object doWork(Object... values) throws IOException {
5858

5959
if (values.length < 3) {
6060
throw new IOException(
61-
"knnRegress expects atleast three parameters: an observation matrix, an outcomes vector and k.");
61+
"knnRegress expects at least three parameters: an observation matrix, an outcomes vector and k.");
6262
}
6363

6464
Matrix observations = null;

solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/eval/Matrix.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public List<String> getRowLabels() {
6161
return rowLabels;
6262
}
6363

64-
public void setRowLabels(List<String> rowLables) {
65-
this.rowLabels = rowLables;
64+
public void setRowLabels(List<String> rowLabels) {
65+
this.rowLabels = rowLabels;
6666
}
6767

6868
public double[][] getData() {

solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/eval/NotNullEvaluator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public Object doWork(Object... values) throws IOException {
4545
}
4646

4747
if (values[0] instanceof String) {
48-
// Check to see if the this tuple had a null value for that string.
48+
// Check to see if this tuple had a null value for that string.
4949
String nullField = getStreamContext().getTupleContext().get("null");
5050
if (nullField != null && nullField.equals(values[0])) {
5151
return false;

solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/eval/PredictEvaluator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public Object doWork(Object... objects) throws IOException {
178178
y = ((Number) third).doubleValue();
179179
return bivariateFunction.value(x, y);
180180
} else {
181-
throw new IOException("BivariateFunction requires two numberic parameters.");
181+
throw new IOException("BivariateFunction requires two numeric parameters.");
182182
}
183183
} else if (objects.length == 2) {
184184
if (second instanceof Matrix) {

solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/eval/ProbabilityEvaluator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public Object doWork(Object... values) throws IOException {
6060
throw new IOException(
6161
String.format(
6262
Locale.ROOT,
63-
"Invalid expression %s - found type %s for the first value, expecting a IntegerDistributionm for probability at a specific value.",
63+
"Invalid expression %s - found type %s for the first value, expecting a IntegerDistribution for probability at a specific value.",
6464
toExpression(constructingFactory),
6565
first.getClass().getSimpleName()));
6666
}

solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/eval/RecursiveEvaluator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected Object normalizeOutputType(Object value) {
126126
return ((List<?>) value)
127127
.stream().map(innerValue -> normalizeOutputType(innerValue)).collect(Collectors.toList());
128128
} else if (value instanceof Tuple && value.getClass().getEnclosingClass() == null) {
129-
// If its a tuple and not a inner class that has extended tuple, which is done in a number of
129+
// If it's a tuple and not an inner class that has extended tuple, which occurs in a number of
130130
// cases so that mathematical models can be contained within a tuple.
131131

132132
Tuple tuple = (Tuple) value;

0 commit comments

Comments
 (0)