Skip to content

Commit

Permalink
Rename upgrade to lucene-index-upgrade, licences files for manual
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaDemianenko committed Dec 5, 2015
1 parent d840219 commit aae3af9
Show file tree
Hide file tree
Showing 26 changed files with 19 additions and 5 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -51,18 +51,18 @@ public IndexUpgraderWrapper( Supplier<EmbeddedJarLoader> jarLoaderSupplier )


public void upgradeIndex( Path indexPath ) throws Throwable public void upgradeIndex( Path indexPath ) throws Throwable
{ {
// since lucene use ServiceLocator to load services, context class loader need to be replaced as well
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
try try
{ {
if ( mainMethod == null ) if ( mainMethod == null )
{ {
luceneLoader = jarLoaderSupplier.get(); luceneLoader = jarLoaderSupplier.get();
Thread.currentThread().setContextClassLoader( luceneLoader.getJarsClassLoader() ); Class upgrader = luceneLoader.loadEmbeddedClass( LUCENE_INDEX_UPGRADER_CLASS_NAME );
Class<?> upgrader = luceneLoader.loadEmbeddedClass( LUCENE_INDEX_UPGRADER_CLASS_NAME );
MethodHandles.Lookup lookup = MethodHandles.lookup(); MethodHandles.Lookup lookup = MethodHandles.lookup();
mainMethod = lookup.findStatic( upgrader, "main", mainMethod = lookup.findStatic( upgrader, "main", MethodType.methodType( void.class, String[].class ) );
MethodType.methodType( void.class, String[].class ) );
} }
Thread.currentThread().setContextClassLoader( luceneLoader.getJarsClassLoader() );
mainMethod.invokeExact( new String[]{indexPath.toString()} ); mainMethod.invokeExact( new String[]{indexPath.toString()} );
} }
finally finally
Expand Down
2 changes: 1 addition & 1 deletion community/pom.xml
Expand Up @@ -44,6 +44,7 @@
<module>udc</module> <module>udc</module>
<module>monitor-logging</module> <module>monitor-logging</module>
<module>lucene-index</module> <module>lucene-index</module>
<module>lucene-index-upgrade</module>
<module>graph-algo</module> <module>graph-algo</module>
<module>graph-matching</module> <module>graph-matching</module>
<module>neo4j</module> <module>neo4j</module>
Expand All @@ -61,7 +62,6 @@
<module>consistency-check</module> <module>consistency-check</module>
<module>neo4j-harness</module> <module>neo4j-harness</module>
<module>licensecheck-config</module> <module>licensecheck-config</module>
<module>upgade</module>
</modules> </modules>


<licenses> <licenses>
Expand Down
3 changes: 3 additions & 0 deletions manual/cypher/graphgist/LICENSES.txt
Expand Up @@ -8,7 +8,10 @@ Apache Software License, Version 2.0
ConcurrentLinkedHashMap ConcurrentLinkedHashMap
Data Mapper for Jackson Data Mapper for Jackson
Jackson Jackson
Lucene Common Analyzers
Lucene Core Lucene Core
Lucene Memory
Lucene QueryParsers
opencsv opencsv
parboiled-core parboiled-core
parboiled-scala parboiled-scala
Expand Down
3 changes: 3 additions & 0 deletions manual/cypher/graphgist/NOTICE.txt
Expand Up @@ -31,7 +31,10 @@ Apache Software License, Version 2.0
ConcurrentLinkedHashMap ConcurrentLinkedHashMap
Data Mapper for Jackson Data Mapper for Jackson
Jackson Jackson
Lucene Common Analyzers
Lucene Core Lucene Core
Lucene Memory
Lucene QueryParsers
opencsv opencsv
parboiled-core parboiled-core
parboiled-scala parboiled-scala
Expand Down
2 changes: 2 additions & 0 deletions manual/neo4j-harness-enterprise-test/LICENSES.txt
Expand Up @@ -9,6 +9,8 @@ Apache Software License, Version 2.0
Commons Digester Commons Digester
Commons Lang Commons Lang
Commons Logging Commons Logging
Lucene Core
Lucene Memory
------------------------------------------------------------------------------ ------------------------------------------------------------------------------


Apache License Apache License
Expand Down
2 changes: 2 additions & 0 deletions manual/neo4j-harness-enterprise-test/NOTICE.txt
Expand Up @@ -31,6 +31,8 @@ Apache Software License, Version 2.0
Commons Digester Commons Digester
Commons Lang Commons Lang
Commons Logging Commons Logging
Lucene Core
Lucene Memory


Common Development and Distribution License Version 1.1 Common Development and Distribution License Version 1.1
jsr311-api jsr311-api
Expand Down
2 changes: 2 additions & 0 deletions manual/neo4j-harness-test/LICENSES.txt
Expand Up @@ -9,6 +9,8 @@ Apache Software License, Version 2.0
Commons Digester Commons Digester
Commons Lang Commons Lang
Commons Logging Commons Logging
Lucene Core
Lucene Memory
------------------------------------------------------------------------------ ------------------------------------------------------------------------------


Apache License Apache License
Expand Down
2 changes: 2 additions & 0 deletions manual/neo4j-harness-test/NOTICE.txt
Expand Up @@ -32,6 +32,8 @@ Apache Software License, Version 2.0
Commons Digester Commons Digester
Commons Lang Commons Lang
Commons Logging Commons Logging
Lucene Core
Lucene Memory


Common Development and Distribution License Version 1.1 Common Development and Distribution License Version 1.1
jsr311-api jsr311-api
Expand Down

0 comments on commit aae3af9

Please sign in to comment.