mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
fix for nb export-dos NPE w/ service annotation
This commit is contained in:
@@ -19,6 +19,8 @@ package io.nosqlbench.adapter.milvus;
|
|||||||
import io.nosqlbench.adapter.milvus.ops.MilvusBaseOp;
|
import io.nosqlbench.adapter.milvus.ops.MilvusBaseOp;
|
||||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||||
|
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||||
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||||
@@ -26,6 +28,9 @@ import io.nosqlbench.nb.api.labels.NBLabels;
|
|||||||
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
import static io.nosqlbench.adapter.milvus.MilvusUtils.MILVUS;
|
||||||
|
|
||||||
|
@Service(value = DriverAdapter.class, selector = MILVUS)
|
||||||
public class MilvusDriverAdapter extends BaseDriverAdapter<MilvusBaseOp<?>, MilvusSpace> {
|
public class MilvusDriverAdapter extends BaseDriverAdapter<MilvusBaseOp<?>, MilvusSpace> {
|
||||||
|
|
||||||
public MilvusDriverAdapter(NBComponent parentComponent, NBLabels labels) {
|
public MilvusDriverAdapter(NBComponent parentComponent, NBLabels labels) {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
package io.nosqlbench.adapter.milvus;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2024 nosqlbench
|
* Copyright (c) 2024 nosqlbench
|
||||||
*
|
*
|
||||||
@@ -7,23 +5,25 @@ package io.nosqlbench.adapter.milvus;
|
|||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing,
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* software distributed under the License is distributed on an
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* KIND, either express or implied. See the License for the
|
* See the License for the specific language governing permissions and
|
||||||
* specific language governing permissions and limitations
|
* limitations under the License.
|
||||||
* under the License.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package io.nosqlbench.adapter.milvus;
|
||||||
|
|
||||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||||
import io.nosqlbench.nb.annotations.Service;
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||||
|
|
||||||
@Service(value = DriverAdapterLoader.class, selector = "milvus")
|
import static io.nosqlbench.adapter.milvus.MilvusUtils.MILVUS;
|
||||||
|
|
||||||
|
@Service(value = DriverAdapterLoader.class, selector = MILVUS)
|
||||||
public class MilvusDriverAdapterLoader implements DriverAdapterLoader {
|
public class MilvusDriverAdapterLoader implements DriverAdapterLoader {
|
||||||
@Override
|
@Override
|
||||||
public MilvusDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
public MilvusDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class MilvusUtils {
|
public class MilvusUtils {
|
||||||
|
public static final String MILVUS = "milvus";
|
||||||
|
|
||||||
public static List<String> splitNames(String input) {
|
public static List<String> splitNames(String input) {
|
||||||
assert StringUtils.isNotBlank(input) && StringUtils.isNotEmpty(input);
|
assert StringUtils.isNotBlank(input) && StringUtils.isNotEmpty(input);
|
||||||
|
|||||||
Reference in New Issue
Block a user