mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-23 15:40:44 -06:00
additional dataset parsers
This commit is contained in:
parent
9f1cd4015c
commit
e80fc18fe4
@ -21,6 +21,10 @@ public interface DatasetParser {
|
||||
switch(parsername) {
|
||||
case "default":
|
||||
return new DefaultDatasetParser();
|
||||
case "noop":
|
||||
return new NoopDatasetParser();
|
||||
case "jaw":
|
||||
return new JAWDatasetParser();
|
||||
default:
|
||||
throw new RuntimeException("Unknown parser name: " + parsername);
|
||||
}
|
||||
|
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 nosqlbench
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.nosqlbench.datamappers.functions.hdf_to_cql;
|
||||
|
||||
public class JAWDatasetParser implements DatasetParser {
|
||||
private static final String WHERE = "WHERE";
|
||||
@Override
|
||||
public String parse(String raw) {
|
||||
if (!raw.toUpperCase().startsWith(WHERE)) {
|
||||
raw = WHERE + " " + raw;
|
||||
}
|
||||
return raw;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2023 nosqlbench
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.nosqlbench.datamappers.functions.hdf_to_cql;
|
||||
|
||||
public class NoopDatasetParser implements DatasetParser {
|
||||
@Override
|
||||
public String parse(String raw) {
|
||||
return raw;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user