mirror of https://github.com/apache/lucene.git
Formatting fixed
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1669204 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c3bbff6ee6
commit
f0ea6a662d
|
@ -105,12 +105,11 @@ import static org.apache.solr.common.cloud.ZkStateReader.SHARD_ID_PROP;
|
|||
|
||||
/**
|
||||
* Handle ZooKeeper interactions.
|
||||
*
|
||||
* <p>
|
||||
* notes: loads everything on init, creates what's not there - further updates
|
||||
* are prompted with Watches.
|
||||
*
|
||||
* <p>
|
||||
* TODO: exceptions during close on attempts to update cloud state
|
||||
*
|
||||
*/
|
||||
public final class ZkController {
|
||||
|
||||
|
@ -164,6 +163,7 @@ public final class ZkController {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private final Map<ContextKey, ElectionContext> electionContexts = Collections.synchronizedMap(new HashMap<>());
|
||||
|
||||
private final SolrZkClient zkClient;
|
||||
|
@ -597,6 +597,7 @@ public final class ZkController {
|
|||
|
||||
/**
|
||||
* Create the zknodes necessary for a cluster to operate
|
||||
*
|
||||
* @param zkClient a SolrZkClient
|
||||
* @throws KeeperException if there is a Zookeeper error
|
||||
* @throws InterruptedException on interrupt
|
||||
|
@ -1353,8 +1354,7 @@ public final class ZkController {
|
|||
return;
|
||||
}
|
||||
throw new SolrException(ErrorCode.SERVER_ERROR, "Error creating collection node in Zookeeper", e);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
} catch (InterruptedException e) {
|
||||
Thread.interrupted();
|
||||
throw new SolrException(ErrorCode.SERVER_ERROR, "Error creating collection node in Zookeeper", e);
|
||||
}
|
||||
|
@ -1908,7 +1908,7 @@ public final class ZkController {
|
|||
/**
|
||||
* When a leader receives a communication error when trying to send a request to a replica,
|
||||
* it calls this method to ensure the replica enters recovery when connectivity is restored.
|
||||
*
|
||||
* <p>
|
||||
* returns true if the node hosting the replica is still considered "live" by ZooKeeper;
|
||||
* false means the node is not live either, so no point in trying to send recovery commands
|
||||
* to it.
|
||||
|
@ -1916,8 +1916,7 @@ public final class ZkController {
|
|||
public boolean ensureReplicaInLeaderInitiatedRecovery(
|
||||
final String collection, final String shardId, final ZkCoreNodeProps replicaCoreProps,
|
||||
String leaderCoreNodeName, boolean forcePublishState, boolean retryOnConnLoss)
|
||||
throws KeeperException, InterruptedException
|
||||
{
|
||||
throws KeeperException, InterruptedException {
|
||||
final String replicaUrl = replicaCoreProps.getCoreUrl();
|
||||
|
||||
if (collection == null)
|
||||
|
@ -2266,7 +2265,8 @@ public final class ZkController {
|
|||
|
||||
}
|
||||
|
||||
/**This will give a callback to the listener whenever a child is modified in the
|
||||
/**
|
||||
* This will give a callback to the listener whenever a child is modified in the
|
||||
* conf directory. It is the responsibility of the listener to check if the individual
|
||||
* item of interest has been modified. When the last core which was interested in
|
||||
* this conf directory is gone the listeners will be removed automatically.
|
||||
|
@ -2283,7 +2283,8 @@ public final class ZkController {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void postClose(SolrCore core) { }
|
||||
public void postClose(SolrCore core) {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
throw new SolrException(ErrorCode.SERVER_ERROR, "This conf directory is not valid");
|
||||
|
@ -2299,9 +2300,8 @@ public final class ZkController {
|
|||
confDirectoryListeners.put(zkDir, new HashSet<Runnable>());
|
||||
setConfWatcher(zkDir, new WatcherImpl(zkDir), null);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private class WatcherImpl implements Watcher {
|
||||
private final String zkDir;
|
||||
|
||||
|
|
Loading…
Reference in New Issue