@@ -81,7 +81,7 @@ public Map<String, Object> getPoolDetails(String pool) {
81
81
Map <String , Object > responseMap = new HashMap <String , Object >();
82
82
responseMap .put ("buckets" , bucket );
83
83
84
- List <Object > nodes = getNodesServingPool (pool );
84
+ List <Map < String , Object > > nodes = getNodesServingPool (pool );
85
85
responseMap .put ("nodes" , nodes );
86
86
87
87
return responseMap ;
@@ -204,7 +204,7 @@ public String getBucketUUID(String pool, String bucket) {
204
204
int tries = 0 ;
205
205
bucketUUID = this .lookupUUID (bucket , "bucketUUID" );
206
206
while (bucketUUID == null && tries < 100 ) {
207
- logger .debug ("bucket UUID doesn't exist yet, creaating , attempt: {}" , tries +1 );
207
+ logger .debug ("bucket UUID doesn't exist yet, creating , attempt: {}" , tries +1 );
208
208
String newUUID = UUID .randomUUID ().toString ().replace ("-" , "" );
209
209
storeUUID (bucket , "bucketUUID" , newUUID );
210
210
bucketUUID = this .lookupUUID (bucket , "bucketUUID" );
@@ -221,14 +221,14 @@ public String getBucketUUID(String pool, String bucket) {
221
221
}
222
222
223
223
@ Override
224
- public List <Object > getNodesServingPool (String pool ) {
224
+ public List <Map < String , Object > > getNodesServingPool (String pool ) {
225
225
if ("default" .equals (pool )) {
226
226
227
227
NodesInfoRequestBuilder infoBuilder = client .admin ().cluster ().prepareNodesInfo ((String []) null );
228
228
NodesInfoResponse infoResponse = infoBuilder .execute ().actionGet ();
229
229
230
230
// extract what we need from this response
231
- List <Object > nodes = new ArrayList <Object >();
231
+ List <Map < String , Object >> nodes = new ArrayList <>();
232
232
for (NodeInfo nodeInfo : infoResponse .getNodes ()) {
233
233
234
234
// FIXME there has to be a better way than
@@ -255,10 +255,10 @@ public List<Object> getNodesServingPool(String pool) {
255
255
start + 1 , end );
256
256
String [] parts = hostPort .split (":" );
257
257
258
- Map <String , Object > nodePorts = new HashMap <String , Object >();
258
+ Map <String , Object > nodePorts = new HashMap <>();
259
259
nodePorts .put ("direct" , Integer .parseInt (parts [1 ]));
260
260
261
- Map <String , Object > node = new HashMap <String , Object >();
261
+ Map <String , Object > node = new HashMap <>();
262
262
node .put ("couchApiBase" , String .format ("http://%s/" , hostPort ));
263
263
node .put ("hostname" , hostPort );
264
264
node .put ("ports" , nodePorts );
@@ -276,7 +276,7 @@ public List<Object> getNodesServingPool(String pool) {
276
276
277
277
@ Override
278
278
public Map <String , Object > getStats () {
279
- Map <String , Object > result = new HashMap <String , Object >();
279
+ Map <String , Object > result = new HashMap <>();
280
280
return result ;
281
281
}
282
282
0 commit comments