fix for nb export-dos NPE w/ service annotation

This commit is contained in:
Madhavan Sridharan 2024-03-20 18:36:19 -04:00
parent 2502def067
commit 66bd819710
3 changed files with 16 additions and 10 deletions
adapter-milvus/src/main/java/io/nosqlbench/adapter/milvus

View File

@ -19,6 +19,8 @@ package io.nosqlbench.adapter.milvus;
import io.nosqlbench.adapter.milvus.ops.MilvusBaseOp;
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
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.config.standard.NBConfigModel;
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 static io.nosqlbench.adapter.milvus.MilvusUtils.MILVUS;
@Service(value = DriverAdapter.class, selector = MILVUS)
public class MilvusDriverAdapter extends BaseDriverAdapter<MilvusBaseOp<?>, MilvusSpace> {
public MilvusDriverAdapter(NBComponent parentComponent, NBLabels labels) {

View File

@ -1,5 +1,3 @@
package io.nosqlbench.adapter.milvus;
/*
* 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 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,
* 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.
* 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.adapter.milvus;
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
import io.nosqlbench.nb.annotations.Service;
import io.nosqlbench.nb.api.components.core.NBComponent;
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 {
@Override
public MilvusDriverAdapter load(NBComponent parent, NBLabels childLabels) {

View File

@ -22,6 +22,7 @@ import java.util.Arrays;
import java.util.List;
public class MilvusUtils {
public static final String MILVUS = "milvus";
public static List<String> splitNames(String input) {
assert StringUtils.isNotBlank(input) && StringUtils.isNotEmpty(input);