mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
fix fileaccess plugin structure
This commit is contained in:
parent
dacbb3725b
commit
aaeecb38ab
@ -19,7 +19,7 @@ package io.nosqlbench.engine.extensions.files;
|
||||
|
||||
import io.nosqlbench.nb.api.content.NBIO;
|
||||
|
||||
public class FileAccess extends FileAccessPluginData {
|
||||
public class FileAccess {
|
||||
|
||||
public String read(String filepath) {
|
||||
return NBIO.readCharBuffer(filepath).toString();
|
||||
|
@ -24,20 +24,17 @@ import org.apache.logging.log4j.Logger;
|
||||
|
||||
import javax.script.ScriptContext;
|
||||
|
||||
@Service(ScriptingPluginInfo.class)
|
||||
public class FileAccessPluginData implements ScriptingPluginInfo<FileAccessPluginData> {
|
||||
@Service(value = ScriptingPluginInfo.class, selector = "files")
|
||||
public class FileAccessPluginData implements ScriptingPluginInfo<FileAccess> {
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Allows for convenient read access to local files";
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileAccessPluginData getExtensionObject(Logger logger, MetricRegistry metricRegistry, ScriptContext scriptContext) {
|
||||
public FileAccess getExtensionObject(Logger logger, MetricRegistry metricRegistry, ScriptContext scriptContext) {
|
||||
return new FileAccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBaseVariableName() {
|
||||
return "files";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user