FSDirectory directory = FSDirectory.open( outputFolder.toPath() ) ) DefaultIndexUpdater.unpackIndexData( is, directory, (IndexingContext) Proxy.newProxyInstance( getClass().getClassLoader(), new Class[] { IndexingContext.class }, new PartialImplementation()
private Properties loadIndexProperties( final File indexDirectoryFile, final String remoteIndexPropertiesName ) { File indexProperties = new File( indexDirectoryFile, remoteIndexPropertiesName ); try ( FileInputStream fis = new FileInputStream( indexProperties ) ) { Properties properties = new Properties(); properties.load( fis ); return properties; } catch ( IOException e ) { getLogger().debug( "Unable to read remote properties stored locally", e ); } return null; }
public Date getTimestamp() { Properties properties = getProperties(); if ( properties == null ) { return null; } Date timestamp = DefaultIndexUpdater.this.getTimestamp( properties, IndexingContext.INDEX_TIMESTAMP ); if ( timestamp == null ) { timestamp = DefaultIndexUpdater.this.getTimestamp( properties, IndexingContext.INDEX_LEGACY_TIMESTAMP ); } return timestamp; }
timestamp = unpackIndexData( is, directory, // updateRequest.getIndexingContext() ); filterDirectory( directory, updateRequest.getDocumentFilter() ); getLogger().info( IndexUpdateSideEffect.class.getName() + " extensions found: " + sideEffects.size() ); for ( IndexUpdateSideEffect sideeffect : sideEffects )
localTimestamp = getTimestamp( localProperties, IndexingContext.INDEX_TIMESTAMP ); Date updateTimestamp = getTimestamp( remoteProperties, IndexingContext.INDEX_TIMESTAMP ); updateTimestamp = getTimestamp( remoteProperties, IndexingContext.INDEX_LEGACY_TIMESTAMP ); getLogger().error( "Fallback to *.zip also failed: " + ex2 ); // do not bother with stack trace
public Date setIndexFile( ResourceFetcher source, String filename ) throws IOException { cleanCacheDirectory( dir ); result.setFullUpdate( true ); File target = new File( dir, filename ); FileUtils.copyStreamToFile( new RawInputStreamFacade( source.retrieve( filename ) ), target ); return null; }
if ( fetchAndUpdateIndex( updateRequest, fetcher, cache ).isSuccessful() ) result = fetchAndUpdateIndex( updateRequest, fetcher, target );
if ( remoteIndexFile.endsWith( ".gz" ) ) IndexDataReadResult result = unpackIndexData( is, directory, updateRequest.getIndexingContext() ); timestamp = result.getTimestamp(); rootGroups = result.getRootGroups(); filterDirectory( directory, updateRequest.getDocumentFilter() ); getLogger().info( IndexUpdateSideEffect.class.getName() + " extensions found: " + sideEffects.size() ); for ( IndexUpdateSideEffect sideeffect : sideEffects )
localTimestamp = getTimestamp( localProperties, IndexingContext.INDEX_TIMESTAMP ); Date updateTimestamp = getTimestamp( remoteProperties, IndexingContext.INDEX_TIMESTAMP ); updateTimestamp = getTimestamp( remoteProperties, IndexingContext.INDEX_LEGACY_TIMESTAMP ); getLogger().error( "Fallback to *.zip also failed: " + ex2 ); // do not bother with stack trace
public Date setIndexFile( ResourceFetcher source, String filename ) throws IOException { cleanCacheDirectory( dir ); result.setFullUpdate( true ); File target = new File( dir, filename ); FileUtils.copyStreamToFile( new RawInputStreamFacade( source.retrieve( filename ) ), target ); return null; }
if( fetchAndUpdateIndex( updateRequest, fetcher, cache ).isSuccessful() ) result = fetchAndUpdateIndex( updateRequest, fetcher, target );
if ( remoteIndexFile.endsWith( ".gz" ) ) IndexDataReadResult result = unpackIndexData( is, directory, updateRequest.getIndexingContext() ); timestamp = result.getTimestamp(); rootGroups = result.getRootGroups(); filterDirectory( directory, updateRequest.getDocumentFilter() ); getLogger().info( IndexUpdateSideEffect.class.getName() + " extensions found: " + sideEffects.size() ); for ( IndexUpdateSideEffect sideeffect : sideEffects )
localTimestamp = getTimestamp( localProperties, IndexingContext.INDEX_TIMESTAMP ); Date updateTimestamp = getTimestamp( remoteProperties, IndexingContext.INDEX_TIMESTAMP ); updateTimestamp = getTimestamp( remoteProperties, IndexingContext.INDEX_LEGACY_TIMESTAMP ); getLogger().error( "Fallback to *.zip also failed: " + ex2 ); // do not bother with stack trace
public Date setIndexFile( ResourceFetcher source, String filename ) throws IOException { cleanCacheDirectory( dir ); result.setFullUpdate( true ); File target = new File( dir, filename ); FileUtils.copyStreamToFile( new RawInputStreamFacade( source.retrieve( filename ) ), target ); return null; }
public Date getTimestamp() { Properties properties = getProperties(); if ( properties == null ) { return null; } Date timestamp = DefaultIndexUpdater.this.getTimestamp( properties, IndexingContext.INDEX_TIMESTAMP ); if ( timestamp == null ) { timestamp = DefaultIndexUpdater.this.getTimestamp( properties, IndexingContext.INDEX_LEGACY_TIMESTAMP ); } return timestamp; }
private Properties loadIndexProperties( final File indexDirectoryFile, final String remoteIndexPropertiesName ) { File indexProperties = new File( indexDirectoryFile, remoteIndexPropertiesName ); try ( FileInputStream fis = new FileInputStream( indexProperties ) ) { Properties properties = new Properties(); properties.load( fis ); return properties; } catch ( IOException e ) { getLogger().debug( "Unable to read remote properties stored locally", e ); } return null; }
if ( fetchAndUpdateIndex( updateRequest, fetcher, cache ).isSuccessful() ) result = fetchAndUpdateIndex( updateRequest, fetcher, target );
public Date getTimestamp() { Properties properties = getProperties(); if ( properties == null ) { return null; } Date timestamp = DefaultIndexUpdater.this.getTimestamp( properties, IndexingContext.INDEX_TIMESTAMP ); if ( timestamp == null ) { timestamp = DefaultIndexUpdater.this.getTimestamp( properties, IndexingContext.INDEX_LEGACY_TIMESTAMP ); } return timestamp; }
private Properties loadIndexProperties( final File indexDirectoryFile, final String remoteIndexPropertiesName ) { File indexProperties = new File( indexDirectoryFile, remoteIndexPropertiesName ); FileInputStream fis = null; try { Properties properties = new Properties(); fis = new FileInputStream( indexProperties ); properties.load( fis ); return properties; } catch ( IOException e ) { getLogger().debug( "Unable to read remote properties stored locally", e ); } finally { IOUtil.close( fis ); } return null; }