You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2017/07/03 11:58:29 UTC

[49/58] [abbrv] lucene-solr:jira/solr-10879: SOLR-10954: this was supposed to be in the solrj package

SOLR-10954: this was supposed to be in the solrj package


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

Branch: refs/heads/jira/solr-10879
Commit: 2e56e7eb28a99109aa0b7c35a9698250f531b984
Parents: f3c851a
Author: Noble Paul <no...@apache.org>
Authored: Sat Jul 1 11:44:22 2017 +0930
Committer: Noble Paul <no...@apache.org>
Committed: Sat Jul 1 11:44:22 2017 +0930

----------------------------------------------------------------------
 .../solr/common/cloud/ReplicaPosition.java      | 55 --------------------
 .../solr/common/cloud/ReplicaPosition.java      | 55 ++++++++++++++++++++
 2 files changed, 55 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2e56e7eb/solr/core/src/java/org/apache/solr/common/cloud/ReplicaPosition.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/common/cloud/ReplicaPosition.java b/solr/core/src/java/org/apache/solr/common/cloud/ReplicaPosition.java
deleted file mode 100644
index d64d1d1..0000000
--- a/solr/core/src/java/org/apache/solr/common/cloud/ReplicaPosition.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.common.cloud;
-
-
-public class ReplicaPosition implements Comparable<ReplicaPosition> {
-  public final String shard;
-  public final int index;
-  public final Replica.Type type;
-  public String node;
-
-  public ReplicaPosition(String shard, int replicaIdx, Replica.Type type) {
-    this.shard = shard;
-    this.index = replicaIdx;
-    this.type = type;
-  }
-  public ReplicaPosition(String shard, int replicaIdx, Replica.Type type, String node) {
-    this.shard = shard;
-    this.index = replicaIdx;
-    this.type = type;
-    this.node = node;
-  }
-
-  @Override
-  public int compareTo(ReplicaPosition that) {
-    //this is to ensure that we try one replica from each shard first instead of
-    // all replicas from same shard
-    return that.index > index ? -1 : that.index == index ? 0 : 1;
-  }
-
-  @Override
-  public String toString() {
-    return shard + ":" + index;
-  }
-
-  public ReplicaPosition setNode(String node) {
-    this.node = node;
-    return this;
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2e56e7eb/solr/solrj/src/java/org/apache/solr/common/cloud/ReplicaPosition.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ReplicaPosition.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ReplicaPosition.java
new file mode 100644
index 0000000..d64d1d1
--- /dev/null
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ReplicaPosition.java
@@ -0,0 +1,55 @@
+/*
+ * 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.common.cloud;
+
+
+public class ReplicaPosition implements Comparable<ReplicaPosition> {
+  public final String shard;
+  public final int index;
+  public final Replica.Type type;
+  public String node;
+
+  public ReplicaPosition(String shard, int replicaIdx, Replica.Type type) {
+    this.shard = shard;
+    this.index = replicaIdx;
+    this.type = type;
+  }
+  public ReplicaPosition(String shard, int replicaIdx, Replica.Type type, String node) {
+    this.shard = shard;
+    this.index = replicaIdx;
+    this.type = type;
+    this.node = node;
+  }
+
+  @Override
+  public int compareTo(ReplicaPosition that) {
+    //this is to ensure that we try one replica from each shard first instead of
+    // all replicas from same shard
+    return that.index > index ? -1 : that.index == index ? 0 : 1;
+  }
+
+  @Override
+  public String toString() {
+    return shard + ":" + index;
+  }
+
+  public ReplicaPosition setNode(String node) {
+    this.node = node;
+    return this;
+  }
+}