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/11/22 16:40:43 UTC
lucene-solr:apiv2: SOLR-8029: cleanup code for readability
Repository: lucene-solr
Updated Branches:
refs/heads/apiv2 31933ec76 -> 4942f3325
SOLR-8029: cleanup code for readability
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/4942f332
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4942f332
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4942f332
Branch: refs/heads/apiv2
Commit: 4942f3325e5a1f89a1902b071642163f0c806398
Parents: 31933ec
Author: Noble Paul <no...@gmail.com>
Authored: Tue Nov 22 22:09:32 2016 +0530
Committer: Noble Paul <no...@gmail.com>
Committed: Tue Nov 22 22:09:32 2016 +0530
----------------------------------------------------------------------
.../apache/solr/handler/admin/CoreAdminHandlerApi.java | 2 +-
.../java/org/apache/solr/util/JsonSchemaValidator.java | 6 +++---
solr/core/src/java/org/apache/solr/util/PathTrie.java | 12 ++++++------
.../collections.collection.shards.shard.Commands.json | 2 +-
.../src/resources/apispec/core.config.Commands.json | 5 +++--
5 files changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4942f332/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandlerApi.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandlerApi.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandlerApi.java
index 306bf1e..50579fa 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandlerApi.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandlerApi.java
@@ -55,7 +55,7 @@ public class CoreAdminHandlerApi extends BaseHandlerApiSupport {
SPLIT(PER_CORE_COMMANDS, POST, SPLIT_OP, null, ImmutableMap.of("split.key", "splitKey")),
PREPRECOVERY(PER_CORE_COMMANDS, POST, PREPRECOVERY_OP, "prep-recovery", null),
REQUESTRECOVERY(PER_CORE_COMMANDS, POST, REQUESTRECOVERY_OP, null, null),
- REQUESTSYNCSHARD(PER_CORE_COMMANDS, POST, REQUESTRECOVERY_OP, "request-sync-shard", null),
+ REQUESTSYNCSHARD(PER_CORE_COMMANDS, POST, REQUESTSYNCSHARD_OP, "request-sync-shard", null),
REQUESTBUFFERUPDATES(PER_CORE_COMMANDS, POST, REQUESTBUFFERUPDATES_OP, "request-buffer-updates", null),
REQUESTAPPLYUPDATES(PER_CORE_COMMANDS, POST, REQUESTAPPLYUPDATES_OP, "request-apply-updates", null),
REQUESTSTATUS(PER_CORE_COMMANDS, POST, REQUESTSTATUS_OP, null, null),
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4942f332/solr/core/src/java/org/apache/solr/util/JsonSchemaValidator.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/util/JsonSchemaValidator.java b/solr/core/src/java/org/apache/solr/util/JsonSchemaValidator.java
index 1284678..6211981 100644
--- a/solr/core/src/java/org/apache/solr/util/JsonSchemaValidator.java
+++ b/solr/core/src/java/org/apache/solr/util/JsonSchemaValidator.java
@@ -74,7 +74,7 @@ public class JsonSchemaValidator {
}
Type type = Type.get(typeStr);
if (type == null) {
- errs.add ("Unknown type " + typeStr + "in object "+ Utils.toJSONString(jsonSchema));
+ errs.add ("Unknown type " + typeStr + " in object "+ Utils.toJSONString(jsonSchema));
return;
}
this.type = type;
@@ -261,7 +261,7 @@ public class JsonSchemaValidator {
}
interface TypeValidator {
- void valdateData(String key, Object o, SchemaNode schemaNode, List<String> errs);
+ void validateData(String key, Object o, SchemaNode schemaNode, List<String> errs);
}
enum Type {
@@ -338,7 +338,7 @@ public class JsonSchemaValidator {
void validateData(String key, Object o, SchemaNode attr, List<String> errs) {
if (validator != null) {
- validator.valdateData(key, o, attr, errs);
+ validator.validateData(key, o, attr, errs);
return;
}
if (!typeValidator.test(o))
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4942f332/solr/core/src/java/org/apache/solr/util/PathTrie.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/util/PathTrie.java b/solr/core/src/java/org/apache/solr/util/PathTrie.java
index 3326737..80a613f 100644
--- a/solr/core/src/java/org/apache/solr/util/PathTrie.java
+++ b/solr/core/src/java/org/apache/solr/util/PathTrie.java
@@ -161,23 +161,23 @@ public class PathTrie<T> {
/**
*
- * @param pieces pieces in the url /a/b/c has pieces as 'a' , 'b' , 'c'
+ * @param pathSegments pieces in the url /a/b/c has pieces as 'a' , 'b' , 'c'
* @param index current index of the pieces that we are looking at in /a/b/c 0='a' and 1='b'
* @param templateVariables The mapping of template variable to its value
* @param availableSubPaths If not null , available sub paths will be returned in this set
*/
- public T lookup(List<String> pieces, int index, Map<String, String> templateVariables, Set<String> availableSubPaths) {
- if (templateName != null) templateVariables.put(templateName, pieces.get(index - 1));
- if (pieces.size() < index + 1) {
+ public T lookup(List<String> pathSegments, int index, Map<String, String> templateVariables, Set<String> availableSubPaths) {
+ if (templateName != null) templateVariables.put(templateName, pathSegments.get(index - 1));
+ if (pathSegments.size() < index + 1) {
findAvailableChildren("", availableSubPaths);
return obj;
}
- String piece = pieces.get(index);
+ String piece = pathSegments.get(index);
if (children == null) return null;
Node n = children.get(piece);
if (n == null && !reserved.contains(piece)) n = children.get("");
if (n == null) return null;
- return n.lookup(pieces, index + 1, templateVariables, availableSubPaths);
+ return n.lookup(pathSegments, index + 1, templateVariables, availableSubPaths);
}
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4942f332/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json b/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
index 18de4b8..54e4abf 100644
--- a/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
+++ b/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
@@ -16,7 +16,7 @@
"documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-ForceLeader",
"type": "object"
},
- "synch-shard": {
+ "sync-shard": {
"type": "object"
}
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4942f332/solr/core/src/resources/apispec/core.config.Commands.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.config.Commands.json b/solr/core/src/resources/apispec/core.config.Commands.json
index 6dc8d4a..a7e039a 100644
--- a/solr/core/src/resources/apispec/core.config.Commands.json
+++ b/solr/core/src/resources/apispec/core.config.Commands.json
@@ -147,8 +147,9 @@
"additionalProperties": true
},
"update-listener": {
- "type": "object",
- "additionalProperties": true
+ "type":"object",
+ "description":"",
+ "documentation":""
},
"delete-listener": {
"type": "array",