private void fetchFileList(long gen) throws IOException {
  ModifiableSolrParams params=new ModifiableSolrParams();
  params.set(COMMAND,CMD_GET_FILE_LIST);
  params.set(GENERATION,String.valueOf(gen));
  params.set(CommonParams.WT,"javabin");
  params.set(CommonParams.QT,"/replication");
  QueryRequest req=new QueryRequest(params);
  HttpSolrServer server=new HttpSolrServer(masterUrl,myHttpClient);
  try {
    server.setSoTimeout(60000);
    server.setConnectionTimeout(15000);
    NamedList response=server.request(req);
    List<Map<String,Object>> files=(List<Map<String,Object>>)response.get(CMD_GET_FILE_LIST);
    if (files != null)     filesToDownload=Collections.synchronizedList(files);
 else {
      filesToDownload=Collections.emptyList();
      LOG.error("No files to download for index generation: " + gen);
    }
    files=(List<Map<String,Object>>)response.get(CONF_FILES);
    if (files != null)     confFilesToDownload=Collections.synchronizedList(files);
  }
 catch (  SolrServerException e) {
    throw new IOException(e);
  }
 finally {
    server.shutdown();
  }
}

private void fetchFileList ( long gen ) throws IOException { ModifiableSolrParams params = new ModifiableSolrParams ( ) ; params . set ( COMMAND , CMD_GET_FILE_LIST ) ; params . set ( GENERATION , String . valueOf ( gen ) ) ; params . set ( CommonParams . WT , "javabin" ) ; params . set ( CommonParams . QT , "/replication" ) ; QueryRequest req = new QueryRequest ( params ) ; HttpSolrServer server = new HttpSolrServer ( masterUrl , myHttpClient ) ; try { server . setSoTimeout ( 60000 ) ; server . setConnectionTimeout ( 15000 ) ; NamedList response = server . request ( req ) ; List < Map < String , Object > > files = ( List < Map < String , Object > > ) response . get ( CMD_GET_FILE_LIST ) ; if ( files != null ) filesToDownload = Collections . synchronizedList ( files ) ; else { filesToDownload = Collections . emptyList ( ) ; LOG . error ( "No files to download for index generation: " + gen ) ; } files = ( List < Map < String , Object > > ) response . get ( CONF_FILES ) ; if ( files != null ) confFilesToDownload = Collections . synchronizedList ( files ) ; } catch ( SolrServerException e ) { throw new IOException ( e ) ; } finally { server . shutdown ( ) ; } }
fetches the list of files in a given index commit point and updates internal list of files to download .
