mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
formatting fix
This commit is contained in:
parent
f5855a0cfc
commit
ea2a71cc02
@ -43,7 +43,9 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
public class DocServer implements Runnable {
|
public class DocServer implements Runnable {
|
||||||
|
|
||||||
private final static Logger logger = LogManager.getLogger(DocServer.class);private final List<Path> basePaths = new ArrayList<>();
|
private final static Logger logger = LogManager.getLogger(DocServer.class);
|
||||||
|
|
||||||
|
private final List<Path> basePaths = new ArrayList<>();
|
||||||
private final List<Class> servletClasses = new ArrayList<>();
|
private final List<Class> servletClasses = new ArrayList<>();
|
||||||
private ServletContextHandler contextHandler;
|
private ServletContextHandler contextHandler;
|
||||||
private ServletHolder servletHolder;
|
private ServletHolder servletHolder;
|
||||||
|
@ -22,7 +22,8 @@ import java.util.concurrent.atomic.AtomicLong;
|
|||||||
@Singleton
|
@Singleton
|
||||||
@Path("/services/docs/")
|
@Path("/services/docs/")
|
||||||
public class DocsysMarkdownEndpoint implements WebServiceObject {
|
public class DocsysMarkdownEndpoint implements WebServiceObject {
|
||||||
private final static Logger logger = LogManager.getLogger(DocsysMarkdownEndpoint.class);private DocsBinder docsinfo;
|
private final static Logger logger = LogManager.getLogger(DocsysMarkdownEndpoint.class);
|
||||||
|
private DocsBinder docsinfo;
|
||||||
private DocsBinder enabled;
|
private DocsBinder enabled;
|
||||||
private DocsBinder disabled;
|
private DocsBinder disabled;
|
||||||
|
|
||||||
|
@ -12,7 +12,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class PathWalker {
|
public class PathWalker {
|
||||||
private final static Logger logger = LogManager.getLogger(PathWalker.class);public static void walk(Path p, PathVisitor v) {
|
private final static Logger logger = LogManager.getLogger(PathWalker.class);
|
||||||
|
public static void walk(Path p, PathVisitor v) {
|
||||||
walk(p,v,PathWalker.WALK_ALL);
|
walk(p,v,PathWalker.WALK_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@ import java.nio.file.Path;
|
|||||||
import java.security.InvalidParameterException;
|
import java.security.InvalidParameterException;
|
||||||
|
|
||||||
public class FavIconHandler extends AbstractHandler {
|
public class FavIconHandler extends AbstractHandler {
|
||||||
private final static Logger logger = LogManager.getLogger(FavIconHandler.class);private final Path faviconPath;
|
private final static Logger logger = LogManager.getLogger(FavIconHandler.class);
|
||||||
|
private final Path faviconPath;
|
||||||
|
|
||||||
byte[] iconData;
|
byte[] iconData;
|
||||||
private long lastModified = 0L;
|
private long lastModified = 0L;
|
||||||
|
@ -36,7 +36,8 @@ import java.util.*;
|
|||||||
* directly on your provided objects. See the detailed method docs for more information.</p>
|
* directly on your provided objects. See the detailed method docs for more information.</p>
|
||||||
*/
|
*/
|
||||||
public class Bindings {
|
public class Bindings {
|
||||||
private final static Logger logger = LogManager.getLogger(Bindings.class);private BindingsTemplate template;
|
private final static Logger logger = LogManager.getLogger(Bindings.class);
|
||||||
|
private BindingsTemplate template;
|
||||||
private List<DataMapper<?>> dataMappers = new ArrayList<DataMapper<?>>();
|
private List<DataMapper<?>> dataMappers = new ArrayList<DataMapper<?>>();
|
||||||
private ThreadLocal<Map<String, DataMapper<?>>> nameCache;
|
private ThreadLocal<Map<String, DataMapper<?>>> nameCache;
|
||||||
|
|
||||||
|
@ -38,7 +38,8 @@ import java.util.Optional;
|
|||||||
* bindings will be used in.
|
* bindings will be used in.
|
||||||
*/
|
*/
|
||||||
public class BindingsTemplate {
|
public class BindingsTemplate {
|
||||||
private final static Logger logger = LogManager.getLogger(BindingsTemplate.class);private List<String> bindPointNames = new ArrayList<>();
|
private final static Logger logger = LogManager.getLogger(BindingsTemplate.class);
|
||||||
|
private List<String> bindPointNames = new ArrayList<>();
|
||||||
private List<String> specifiers = new ArrayList<>();
|
private List<String> specifiers = new ArrayList<>();
|
||||||
|
|
||||||
// public BindingsTemplate(Map<String,String> specs) {
|
// public BindingsTemplate(Map<String,String> specs) {
|
||||||
|
@ -11,7 +11,9 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
public class CompatibilityFixups {
|
public class CompatibilityFixups {
|
||||||
|
|
||||||
private final static Logger logger = LogManager.getLogger(CompatibilityFixups.class);// Not all of these are simple upper-case changes
|
private final static Logger logger = LogManager.getLogger(CompatibilityFixups.class);
|
||||||
|
|
||||||
|
// Not all of these are simple upper-case changes
|
||||||
private final static Map<String,String> funcs = new HashMap<String,String>() {{
|
private final static Map<String,String> funcs = new HashMap<String,String>() {{
|
||||||
put("log_normal","LogNormal");
|
put("log_normal","LogNormal");
|
||||||
put("normal", "Normal");
|
put("normal", "Normal");
|
||||||
|
@ -9,7 +9,9 @@ import java.util.Optional;
|
|||||||
|
|
||||||
public class ResolverDiagnostics {
|
public class ResolverDiagnostics {
|
||||||
|
|
||||||
private final static Logger logger = LogManager.getLogger(ResolverDiagnostics.class);private ResolvedFunction resolvedFunction;
|
private final static Logger logger = LogManager.getLogger(ResolverDiagnostics.class);
|
||||||
|
|
||||||
|
private ResolvedFunction resolvedFunction;
|
||||||
private final StringBuilder log = new StringBuilder();
|
private final StringBuilder log = new StringBuilder();
|
||||||
private Throwable error;
|
private Throwable error;
|
||||||
|
|
||||||
|
@ -10,7 +10,8 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class VirtData {
|
public class VirtData {
|
||||||
private final static Logger logger = LogManager.getLogger(VirtData.class);/**
|
private final static Logger logger = LogManager.getLogger(VirtData.class);
|
||||||
|
/**
|
||||||
* Create a bindings template from the pair-wise names and specifiers.
|
* Create a bindings template from the pair-wise names and specifiers.
|
||||||
* Each even-numbered (starting with zero) argument is a binding name,
|
* Each even-numbered (starting with zero) argument is a binding name,
|
||||||
* and each odd-numbered (starting with one) argument is a binding spec.
|
* and each odd-numbered (starting with one) argument is a binding spec.
|
||||||
|
@ -50,7 +50,8 @@ import java.util.stream.Collectors;
|
|||||||
public class VirtDataComposer {
|
public class VirtDataComposer {
|
||||||
|
|
||||||
private final static String PREAMBLE = "compose ";
|
private final static String PREAMBLE = "compose ";
|
||||||
private final static Logger logger = LogManager.getLogger(DataMapperLibrary.class);private final static MethodHandles.Lookup lookup = MethodHandles.publicLookup();
|
private final static Logger logger = LogManager.getLogger(DataMapperLibrary.class);
|
||||||
|
private final static MethodHandles.Lookup lookup = MethodHandles.publicLookup();
|
||||||
|
|
||||||
private final VirtDataFunctionLibrary functionLibrary;
|
private final VirtDataFunctionLibrary functionLibrary;
|
||||||
private final Map<String,Object> customElements = new HashMap<>();
|
private final Map<String,Object> customElements = new HashMap<>();
|
||||||
|
@ -16,7 +16,8 @@ import java.util.*;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class VirtDataFunctionResolver {
|
public class VirtDataFunctionResolver {
|
||||||
private final static Logger logger = LogManager.getLogger(VirtDataFunctionResolver.class);private final static MethodHandles.Lookup lookup = MethodHandles.publicLookup();
|
private final static Logger logger = LogManager.getLogger(VirtDataFunctionResolver.class);
|
||||||
|
private final static MethodHandles.Lookup lookup = MethodHandles.publicLookup();
|
||||||
private final VirtDataFunctionFinder virtDataFunctionFinder = new VirtDataFunctionFinder();
|
private final VirtDataFunctionFinder virtDataFunctionFinder = new VirtDataFunctionFinder();
|
||||||
|
|
||||||
public List<ResolvedFunction> resolveFunctions(Class<?> returnType, Class<?> inputType, String functionName, Map<String,?> customParameters, Object... parameters) {
|
public List<ResolvedFunction> resolveFunctions(Class<?> returnType, Class<?> inputType, String functionName, Map<String,?> customParameters, Object... parameters) {
|
||||||
|
@ -9,7 +9,8 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class VirtDataLibraries implements VirtDataFunctionLibrary {
|
public class VirtDataLibraries implements VirtDataFunctionLibrary {
|
||||||
private final static Logger logger = LogManager.getLogger(VirtDataLibraries.class);private static VirtDataLibraries instance = new VirtDataLibraries();
|
private final static Logger logger = LogManager.getLogger(VirtDataLibraries.class);
|
||||||
|
private static VirtDataLibraries instance = new VirtDataLibraries();
|
||||||
private final Map<String,DataMapper<?>> threadSafeCache = new HashMap<>();
|
private final Map<String,DataMapper<?>> threadSafeCache = new HashMap<>();
|
||||||
|
|
||||||
private final VirtDataFunctionResolver resolver = new VirtDataFunctionResolver();
|
private final VirtDataFunctionResolver resolver = new VirtDataFunctionResolver();
|
||||||
|
@ -8,7 +8,8 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import java.util.function.*;
|
import java.util.function.*;
|
||||||
|
|
||||||
public class ComposerForLongFunction implements FunctionComposer<LongFunction<?>> {
|
public class ComposerForLongFunction implements FunctionComposer<LongFunction<?>> {
|
||||||
private final static Logger logger = LogManager.getLogger(ComposerForLongFunction.class);private final LongFunction<?> inner;
|
private final static Logger logger = LogManager.getLogger(ComposerForLongFunction.class);
|
||||||
|
private final LongFunction<?> inner;
|
||||||
|
|
||||||
public ComposerForLongFunction(LongFunction<?> inner) {
|
public ComposerForLongFunction(LongFunction<?> inner) {
|
||||||
this.inner = inner;
|
this.inner = inner;
|
||||||
|
@ -7,7 +7,8 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import java.util.function.*;
|
import java.util.function.*;
|
||||||
|
|
||||||
public class FunctionAssembly implements FunctionComposer {
|
public class FunctionAssembly implements FunctionComposer {
|
||||||
private final static Logger logger = LogManager.getLogger(FunctionAssembly.class);private FunctionComposer<?> composer = null;
|
private final static Logger logger = LogManager.getLogger(FunctionAssembly.class);
|
||||||
|
private FunctionComposer<?> composer = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getFunctionObject() {
|
public Object getFunctionObject() {
|
||||||
|
@ -87,7 +87,8 @@ public class ParsedTemplate {
|
|||||||
Pattern.compile("\\{(?<anchor>\\w+[-_\\d\\w.]*)}"),
|
Pattern.compile("\\{(?<anchor>\\w+[-_\\d\\w.]*)}"),
|
||||||
Pattern.compile("\\?(?<anchor>\\w+[-_\\d\\w.]*)")
|
Pattern.compile("\\?(?<anchor>\\w+[-_\\d\\w.]*)")
|
||||||
};
|
};
|
||||||
private final static Logger logger = LogManager.getLogger(ParsedTemplate.class);private final Pattern[] patterns;
|
private final static Logger logger = LogManager.getLogger(ParsedTemplate.class);
|
||||||
|
private final Pattern[] patterns;
|
||||||
// Spans is an even-odd form of (literal, variable, ..., ..., literal)
|
// Spans is an even-odd form of (literal, variable, ..., ..., literal)
|
||||||
private final String rawtemplate;
|
private final String rawtemplate;
|
||||||
private final String[] spans;
|
private final String[] spans;
|
||||||
|
@ -16,7 +16,8 @@ import java.util.Stack;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class VirtDataBuilder extends VirtDataBaseListener {
|
public class VirtDataBuilder extends VirtDataBaseListener {
|
||||||
private final static Logger logger = LogManager.getLogger(VirtDataBuilder.class);private VirtDataAST model = new VirtDataAST();
|
private final static Logger logger = LogManager.getLogger(VirtDataBuilder.class);
|
||||||
|
private VirtDataAST model = new VirtDataAST();
|
||||||
private List<ErrorNode> errorNodes = new ArrayList<>();
|
private List<ErrorNode> errorNodes = new ArrayList<>();
|
||||||
|
|
||||||
private Stack<VirtDataParser.VirtdataFlowContext> flowContexts = new Stack<>();
|
private Stack<VirtDataParser.VirtdataFlowContext> flowContexts = new Stack<>();
|
||||||
|
@ -6,10 +6,10 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.LongUnaryOperator;
|
import java.util.function.LongUnaryOperator;
|
||||||
import java.util.logging.LogManager;
|
|
||||||
|
|
||||||
public class MetaShift {
|
public class MetaShift {
|
||||||
private final static Logger logger = LogManager.getLogger(MetaShift.class);public static Func forSizeAndBank(long size, int selector) {
|
private final static Logger logger = LogManager.getLogger(MetaShift.class);
|
||||||
|
public static Func forSizeAndBank(long size, int selector) {
|
||||||
GaloisData data = Masks.forPeriodAndBank(size, selector);
|
GaloisData data = Masks.forPeriodAndBank(size, selector);
|
||||||
return new Func(data);
|
return new Func(data);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,8 @@ import java.util.function.LongFunction;
|
|||||||
@ThreadSafeMapper
|
@ThreadSafeMapper
|
||||||
@Categories({Category.conversion})
|
@Categories({Category.conversion})
|
||||||
public class ModuloToBigDecimal implements LongFunction<BigDecimal> {
|
public class ModuloToBigDecimal implements LongFunction<BigDecimal> {
|
||||||
private final static Logger logger = LogManager.getLogger(ModuloToBigDecimal.class);private final long modulo;
|
private final static Logger logger = LogManager.getLogger(ModuloToBigDecimal.class);
|
||||||
|
private final long modulo;
|
||||||
|
|
||||||
public ModuloToBigDecimal() {
|
public ModuloToBigDecimal() {
|
||||||
this.modulo = Long.MAX_VALUE;
|
this.modulo = Long.MAX_VALUE;
|
||||||
@ -48,4 +49,4 @@ public class ModuloToBigDecimal implements LongFunction<BigDecimal> {
|
|||||||
long ret = (value % modulo) & Long.MAX_VALUE;
|
long ret = (value % modulo) & Long.MAX_VALUE;
|
||||||
return BigDecimal.valueOf(ret);
|
return BigDecimal.valueOf(ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,8 @@ import java.util.function.LongFunction;
|
|||||||
@ThreadSafeMapper
|
@ThreadSafeMapper
|
||||||
@Categories({Category.conversion})
|
@Categories({Category.conversion})
|
||||||
public class ModuloToBigInt implements LongFunction<BigInteger> {
|
public class ModuloToBigInt implements LongFunction<BigInteger> {
|
||||||
private final static Logger logger = LogManager.getLogger(ModuloToBigInt.class);private final long modulo;
|
private final static Logger logger = LogManager.getLogger(ModuloToBigInt.class);
|
||||||
|
private final long modulo;
|
||||||
|
|
||||||
public ModuloToBigInt() {
|
public ModuloToBigInt() {
|
||||||
this.modulo = Long.MAX_VALUE;
|
this.modulo = Long.MAX_VALUE;
|
||||||
@ -48,4 +49,4 @@ public class ModuloToBigInt implements LongFunction<BigInteger> {
|
|||||||
long ret = (value % modulo) & Long.MAX_VALUE;
|
long ret = (value % modulo) & Long.MAX_VALUE;
|
||||||
return BigInteger.valueOf(ret);
|
return BigInteger.valueOf(ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,8 @@ import java.util.function.LongToIntFunction;
|
|||||||
*/
|
*/
|
||||||
@ThreadSafeMapper
|
@ThreadSafeMapper
|
||||||
public class HashedLineToInt implements LongToIntFunction {
|
public class HashedLineToInt implements LongToIntFunction {
|
||||||
private final static Logger logger = LogManager.getLogger(HashedLineToInt.class);private int[] values;
|
private final static Logger logger = LogManager.getLogger(HashedLineToInt.class);
|
||||||
|
private int[] values;
|
||||||
private final String filename;
|
private final String filename;
|
||||||
private final Hash intHash;
|
private final Hash intHash;
|
||||||
|
|
||||||
|
@ -29,7 +29,8 @@ import java.util.function.LongUnaryOperator;
|
|||||||
*/
|
*/
|
||||||
@ThreadSafeMapper
|
@ThreadSafeMapper
|
||||||
public class ModuloToLong implements LongUnaryOperator {
|
public class ModuloToLong implements LongUnaryOperator {
|
||||||
private final static Logger logger = LogManager.getLogger(ModuloToLong.class);private final long modulo;
|
private final static Logger logger = LogManager.getLogger(ModuloToLong.class);
|
||||||
|
private final long modulo;
|
||||||
|
|
||||||
public ModuloToLong(long modulo) {
|
public ModuloToLong(long modulo) {
|
||||||
this.modulo=modulo;
|
this.modulo=modulo;
|
||||||
@ -41,4 +42,4 @@ public class ModuloToLong implements LongUnaryOperator {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,9 @@ import java.util.regex.Pattern;
|
|||||||
@ThreadSafeMapper
|
@ThreadSafeMapper
|
||||||
public class DirectoryLines implements LongFunction<String> {
|
public class DirectoryLines implements LongFunction<String> {
|
||||||
|
|
||||||
private final static Logger logger = LogManager.getLogger(DirectoryLines.class);private final Pattern namePattern;
|
private final static Logger logger = LogManager.getLogger(DirectoryLines.class);
|
||||||
|
|
||||||
|
private final Pattern namePattern;
|
||||||
private final String basepath;
|
private final String basepath;
|
||||||
private final List<Path> allFiles;
|
private final List<Path> allFiles;
|
||||||
private Iterator<String> stringIterator;
|
private Iterator<String> stringIterator;
|
||||||
|
@ -37,7 +37,9 @@ import java.util.function.LongFunction;
|
|||||||
@ThreadSafeMapper
|
@ThreadSafeMapper
|
||||||
public class HashedFileExtractToString implements LongFunction<String> {
|
public class HashedFileExtractToString implements LongFunction<String> {
|
||||||
|
|
||||||
private final static Logger logger = LogManager.getLogger(HashedFileExtractToString.class);private static CharBuffer fileDataImage =null;
|
private final static Logger logger = LogManager.getLogger(HashedFileExtractToString.class);
|
||||||
|
|
||||||
|
private static CharBuffer fileDataImage =null;
|
||||||
private final HashRange sizeRange;
|
private final HashRange sizeRange;
|
||||||
private final HashRange positionRange;
|
private final HashRange positionRange;
|
||||||
|
|
||||||
|
@ -34,7 +34,8 @@ import java.util.function.LongFunction;
|
|||||||
*/
|
*/
|
||||||
@ThreadSafeMapper
|
@ThreadSafeMapper
|
||||||
public class HashedLineToString implements LongFunction<String> {
|
public class HashedLineToString implements LongFunction<String> {
|
||||||
private final static Logger logger = LogManager.getLogger(HashedLineToString.class);private final HashRange indexRange;
|
private final static Logger logger = LogManager.getLogger(HashedLineToString.class);
|
||||||
|
private final HashRange indexRange;
|
||||||
|
|
||||||
private List<String> lines = new ArrayList<>();
|
private List<String> lines = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -33,7 +33,8 @@ import java.util.function.LongFunction;
|
|||||||
*/
|
*/
|
||||||
@ThreadSafeMapper
|
@ThreadSafeMapper
|
||||||
public class ModuloLineToString implements LongFunction<String> {
|
public class ModuloLineToString implements LongFunction<String> {
|
||||||
private final static Logger logger = LogManager.getLogger(ModuloLineToString.class);private List<String> lines = new ArrayList<>();
|
private final static Logger logger = LogManager.getLogger(ModuloLineToString.class);
|
||||||
|
private List<String> lines = new ArrayList<>();
|
||||||
|
|
||||||
private String filename;
|
private String filename;
|
||||||
|
|
||||||
|
@ -35,7 +35,8 @@ import java.util.regex.Pattern;
|
|||||||
*/
|
*/
|
||||||
@ThreadSafeMapper
|
@ThreadSafeMapper
|
||||||
public class Template implements LongFunction<String> {
|
public class Template implements LongFunction<String> {
|
||||||
private final static Logger logger = LogManager.getLogger(Template.class);private static final String EXPR_BEGIN = "[[";
|
private final static Logger logger = LogManager.getLogger(Template.class);
|
||||||
|
private static final String EXPR_BEGIN = "[[";
|
||||||
private static final String EXPR_END = "]]";
|
private static final String EXPR_END = "]]";
|
||||||
private final static ThreadLocal<StringBuilder> sb = ThreadLocal.withInitial(StringBuilder::new);
|
private final static ThreadLocal<StringBuilder> sb = ThreadLocal.withInitial(StringBuilder::new);
|
||||||
private final String rawTemplate;
|
private final String rawTemplate;
|
||||||
|
@ -15,7 +15,9 @@ import java.util.function.Function;
|
|||||||
@ThreadSafeMapper
|
@ThreadSafeMapper
|
||||||
public class FieldExtractor implements Function<String,String> {
|
public class FieldExtractor implements Function<String,String> {
|
||||||
|
|
||||||
private final static Logger logger = LogManager.getLogger(FieldExtractor.class);private final String fields;
|
private final static Logger logger = LogManager.getLogger(FieldExtractor.class);
|
||||||
|
|
||||||
|
private final String fields;
|
||||||
private final String splitDelim;
|
private final String splitDelim;
|
||||||
private final String printDelim;
|
private final String printDelim;
|
||||||
private final int maxIdx;
|
private final int maxIdx;
|
||||||
|
@ -32,7 +32,9 @@ import java.util.function.LongFunction;
|
|||||||
@DeprecatedFunction("random mappers are not deterministic. They will be replaced with hash-based functions.")
|
@DeprecatedFunction("random mappers are not deterministic. They will be replaced with hash-based functions.")
|
||||||
public class RandomFileExtractToString implements LongFunction<String> {
|
public class RandomFileExtractToString implements LongFunction<String> {
|
||||||
|
|
||||||
private final static Logger logger = LogManager.getLogger(RandomFileExtractToString.class);private static CharBuffer fileDataImage =null;
|
private final static Logger logger = LogManager.getLogger(RandomFileExtractToString.class);
|
||||||
|
|
||||||
|
private static CharBuffer fileDataImage =null;
|
||||||
|
|
||||||
private int minsize, maxsize;
|
private int minsize, maxsize;
|
||||||
private final MersenneTwister rng;
|
private final MersenneTwister rng;
|
||||||
|
@ -13,7 +13,8 @@ import java.util.function.LongToIntFunction;
|
|||||||
|
|
||||||
@DeprecatedFunction("random mappers are not deterministic. They will be replaced with hash-based functions.")
|
@DeprecatedFunction("random mappers are not deterministic. They will be replaced with hash-based functions.")
|
||||||
public class RandomLineToInt implements LongToIntFunction {
|
public class RandomLineToInt implements LongToIntFunction {
|
||||||
private final static Logger logger = LogManager.getLogger(RandomLineToInt.class);private final List<String> lines;
|
private final static Logger logger = LogManager.getLogger(RandomLineToInt.class);
|
||||||
|
private final List<String> lines;
|
||||||
|
|
||||||
private final MersenneTwister rng;
|
private final MersenneTwister rng;
|
||||||
private final IntegerDistribution itemDistribution;
|
private final IntegerDistribution itemDistribution;
|
||||||
|
@ -35,7 +35,8 @@ import java.util.function.LongFunction;
|
|||||||
*/
|
*/
|
||||||
@DeprecatedFunction("random mappers are not deterministic. They will be replaced with hash-based functions.")
|
@DeprecatedFunction("random mappers are not deterministic. They will be replaced with hash-based functions.")
|
||||||
public class RandomLineToString implements LongFunction<String> {
|
public class RandomLineToString implements LongFunction<String> {
|
||||||
private final static Logger logger = LogManager.getLogger(RandomLineToString.class);private List<String> lines = new ArrayList<>();
|
private final static Logger logger = LogManager.getLogger(RandomLineToString.class);
|
||||||
|
private List<String> lines = new ArrayList<>();
|
||||||
|
|
||||||
private final MersenneTwister rng;
|
private final MersenneTwister rng;
|
||||||
private final IntegerDistribution itemDistribution;
|
private final IntegerDistribution itemDistribution;
|
||||||
|
@ -5,7 +5,9 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
|
|
||||||
public class ValuesCheckerApp {
|
public class ValuesCheckerApp {
|
||||||
|
|
||||||
private final static Logger logger = LogManager.getLogger(ValuesCheckerApp.class);public static void main(String[] args) {
|
private final static Logger logger = LogManager.getLogger(ValuesCheckerApp.class);
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
if (args.length<5) {
|
if (args.length<5) {
|
||||||
System.out.println("ARGS: 'specifier' threads bufsize start end");
|
System.out.println("ARGS: 'specifier' threads bufsize start end");
|
||||||
System.out.println("example: 'timeuuid()' 100 1000 0 10000");
|
System.out.println("example: 'timeuuid()' 100 1000 0 10000");
|
||||||
|
@ -13,7 +13,9 @@ import java.util.concurrent.locks.Lock;
|
|||||||
|
|
||||||
public class ValuesCheckerRunnable implements Runnable {
|
public class ValuesCheckerRunnable implements Runnable {
|
||||||
|
|
||||||
private final static Logger logger = LogManager.getLogger(ValuesCheckerRunnable.class);private final Condition goTime;
|
private final static Logger logger = LogManager.getLogger(ValuesCheckerRunnable.class);
|
||||||
|
|
||||||
|
private final Condition goTime;
|
||||||
private final Lock lock;
|
private final Lock lock;
|
||||||
private final long start;
|
private final long start;
|
||||||
private final long end;
|
private final long end;
|
||||||
|
Loading…
Reference in New Issue
Block a user