Project

General

Profile

« Previous | Next » 

Revision 55808

reintegrated branch solr75 -r53828:HEAD

View differences:

RemoteSolrAdministrator.java
1 1
package eu.dnetlib.functionality.index.utils;
2 2

  
3
import java.io.IOException;
4
import java.util.Map;
5

  
6 3
import com.google.common.collect.Maps;
7 4
import com.google.gson.JsonElement;
8 5
import com.google.gson.JsonObject;
......
22 19
import org.apache.solr.client.solrj.response.LukeResponse.FieldInfo;
23 20
import org.apache.solr.client.solrj.response.SolrPingResponse;
24 21
import org.apache.solr.common.cloud.SolrZkClient;
22
import org.apache.zookeeper.WatchedEvent;
25 23
import org.apache.zookeeper.Watcher;
26 24
import org.apache.zookeeper.data.Stat;
27 25
import org.springframework.beans.factory.annotation.Required;
28 26

  
27
import java.io.IOException;
28
import java.util.Map;
29

  
29 30
public class RemoteSolrAdministrator {
30 31

  
31 32
	/**
......
75 76

  
76 77
	public boolean indexCollectionExists(final String indexCollectionId, final CloudSolrClient client) {
77 78

  
78
		Watcher watcher = arg0 -> {};
79
		Watcher watcher = new Watcher() {
80

  
81
			@Override
82
			public void process(final WatchedEvent arg0) {}
83
		};
79 84
		try {
80 85
			// server.connect();
81 86
			SolrZkClient zkClient = client.getZkStateReader().getZkClient();
82 87
			if (!zkClient.isConnected()) {
88
				client.close();
83 89
				client.connect();
84 90
			}
85 91

  

Also available in: Unified diff