Commit 6ca967f5 authored by reuschling's avatar reuschling
Browse files

bugfix: wrong flag brokens service startup for the gui



git-svn-id: https://dynaq.opendfki.de/repos/application/trunk@1051 8b50620d-ddf8-0310-9f5d-8b2f31fd9ac4
parent f1d5f488
......@@ -332,6 +332,31 @@
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.apache.mahout</groupId> -->
<!-- <artifactId>mahout-integration</artifactId> -->
<!-- <version>0.9</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.apache.mahout</groupId> -->
<!-- <artifactId>mahout-examples</artifactId> -->
<!-- <version>0.9</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.apache.lucene</groupId> -->
<!-- <artifactId>lucene-facet</artifactId> -->
<!-- <version>4.9.0</version> -->
<!-- </dependency> -->
</dependencies>
......
......@@ -119,14 +119,15 @@ public class LuceneIndexSet implements Runnable, Serializable
{
DynaQServer dynaQServiceHandler = (DynaQServer) KafkaRCP.getRunnablePlugins().get(DynaQServer.class.getName());
if(dynaQServiceHandler == null) throw new DynaQException("found no running DynaQService");
LuceneIndexSet luceneIndexSet = dynaQServiceHandler.getIndexSet(DynaQServer.DEFAULT_INDEX_SET);
if(luceneIndexSet == null) throw new DynaQException("default LuceneIndexSet from the running DynaQService is null.");
return luceneIndexSet;
}
protected List<String> m_lExternalIndexUris;
protected String m_strDefaultIndexUri;
......@@ -367,7 +368,19 @@ public class LuceneIndexSet implements Runnable, Serializable
public List<String> getExternalIndexPaths()
{
return m_lExternalIndexUris;
LinkedList<String> lExternalIndexPaths = new LinkedList<String>();
for (String strIndexUri : m_lExternalIndexUris)
{
if(strIndexUri.toLowerCase().startsWith("http:") || strIndexUri.toLowerCase().startsWith("https:"))
lExternalIndexPaths.add(strIndexUri);
else
lExternalIndexPaths.add(KafkaRCPConstants.addKafkaBaseDir2RelativePath(strIndexUri));
}
return lExternalIndexPaths;
}
......@@ -828,7 +841,7 @@ public class LuceneIndexSet implements Runnable, Serializable
IndexWriter writer =
new IndexWriter(FSDirectory.open(new File(this.getDefaultIndexPath())),
new IndexWriterConfig(Version.LUCENE_31, getDynaQAnalyzer()).setOpenMode(OpenMode.CREATE));
new IndexWriterConfig(Version.LUCENE_CURRENT, getDynaQAnalyzer()).setOpenMode(OpenMode.CREATE));
......
......@@ -134,15 +134,11 @@ public class DynaQServer implements DynaQService, Runnable
/**
* Creates a new DynaQServiceHandler Object with configured parameters
*
* @param bStartService false in the case the service should not be started. Use this if you simply want to use this class for easyly reading out its according config
* files. If false, the service will be started with -1 port. In this case some arbitrary free port will be used, with the chance to ofind this service
* over the bonjour/zeroConf protocoll.
*
* @throws Exception
*/
public DynaQServer() throws Exception
{
this(false);
this(true);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment