From efaef823838798a702d454d8efe20e2e330e5a1c Mon Sep 17 00:00:00 2001 From: Steven Rowe Date: Sun, 17 Mar 2013 07:32:30 +0000 Subject: [PATCH] Fix AnalyzerFactoryTask to call ResourceLoaderAware.inform using the current directory if neither the 'work.dir' property value nor ./work/ are legit directories; also fix the english-porter-comparison.alg report task to be RepSumByNameRound instead of RepSumByName. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1457390 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/benchmark/conf/english-porter-comparison.alg | 2 +- .../lucene/benchmark/byTask/tasks/AnalyzerFactoryTask.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lucene/benchmark/conf/english-porter-comparison.alg b/lucene/benchmark/conf/english-porter-comparison.alg index 51de5ece7a7..682983c8a5d 100644 --- a/lucene/benchmark/conf/english-porter-comparison.alg +++ b/lucene/benchmark/conf/english-porter-comparison.alg @@ -48,4 +48,4 @@ docs.dir=reuters-out NewRound } : 5 -RepSumByName +RepSumByNameRound diff --git a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AnalyzerFactoryTask.java b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AnalyzerFactoryTask.java index d69fe64a413..856eab656de 100644 --- a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AnalyzerFactoryTask.java +++ b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AnalyzerFactoryTask.java @@ -376,6 +376,9 @@ public class AnalyzerFactoryTask extends PerfTask { instance.init(argMap); if (instance instanceof ResourceLoaderAware) { File baseDir = new File(getRunData().getConfig().get("work.dir", "work")).getAbsoluteFile(); + if ( ! baseDir.isDirectory()) { + baseDir = new File(".").getAbsoluteFile(); + } ((ResourceLoaderAware)instance).inform(new FilesystemResourceLoader(baseDir)); } if (CharFilterFactory.class.isAssignableFrom(clazz)) {