@@ -237,7 +237,7 @@ private String getIndexRoutingFileName() {
237
237
public CheckedRunnable <IOException > getAsyncIndexMetadataReadAction (
238
238
String uploadedFilename ,
239
239
Index index ,
240
- LatchedActionListener <RemoteIndexRoutingResult > latchedActionListener ) {
240
+ LatchedActionListener <IndexRoutingTable > latchedActionListener ) {
241
241
int idx = uploadedFilename .lastIndexOf ("/" );
242
242
String blobFileName = uploadedFilename .substring (idx +1 );
243
243
BlobContainer blobContainer = blobStoreRepository .blobStore ().blobContainer ( BlobPath .cleanPath ().add (uploadedFilename .substring (0 ,idx )));
@@ -246,7 +246,7 @@ public CheckedRunnable<IOException> getAsyncIndexMetadataReadAction(
246
246
blobContainer ,
247
247
blobFileName ,
248
248
threadPool .executor (ThreadPool .Names .GENERIC ),
249
- ActionListener .wrap (response -> latchedActionListener .onResponse (new RemoteIndexRoutingResult ( index . getName (), response .readIndexRoutingTable (index ) )), latchedActionListener ::onFailure )
249
+ ActionListener .wrap (response -> latchedActionListener .onResponse (response .readIndexRoutingTable (index )), latchedActionListener ::onFailure )
250
250
);
251
251
}
252
252
@@ -255,7 +255,6 @@ public void readAsync(BlobContainer blobContainer, String name, ExecutorService
255
255
try {
256
256
listener .onResponse (read (blobContainer , name ));
257
257
} catch (Exception e ) {
258
- logger .error ("routing table download failed : " , e );
259
258
listener .onFailure (e );
260
259
}
261
260
});
@@ -307,22 +306,4 @@ public void start() {
307
306
blobStoreRepository = (BlobStoreRepository ) repository ;
308
307
}
309
308
310
- public static class RemoteIndexRoutingResult {
311
- String indexName ;
312
- IndexRoutingTable indexRoutingTable ;
313
-
314
- public RemoteIndexRoutingResult (String indexName , IndexRoutingTable indexRoutingTable ) {
315
- this .indexName = indexName ;
316
- this .indexRoutingTable = indexRoutingTable ;
317
- }
318
-
319
- public String getIndexName () {
320
- return indexName ;
321
- }
322
-
323
- public IndexRoutingTable getIndexRoutingTable () {
324
- return indexRoutingTable ;
325
- }
326
- }
327
-
328
309
}
0 commit comments