Search in sources :

Example 1 with BucketConfig

use of com.couchbase.client.core.config.BucketConfig in project couchbase-elasticsearch-connector by couchbase.

the class SeedNodeHelper method getKvNodes.

/**
 * Returns complete host and port information for every node running the KV service.
 */
public static Set<SeedNode> getKvNodes(Bucket bucket, String connectionString, boolean tls, NetworkResolution networkResolution, Duration timeout) {
    // Bucket config is most reliable way to determine KV ports
    BucketConfig config = CouchbaseHelper.getConfig(bucket, timeout);
    // so the actual node names can be used.
    if (networkResolution.equals(NetworkResolution.AUTO)) {
        EventBus eventBus = bucket.environment().eventBus();
        // The Java client calls seedNodesFromConnectionString during bootstrap, but the results
        // are not accessible here. Call it again.
        Set<String> seedHosts = ConnectionStringUtil.seedNodesFromConnectionString(connectionString, true, tls, eventBus).stream().map(SeedNode::address).collect(toSet());
        networkResolution = inferNetwork(config, networkResolution, seedHosts);
    }
    // Resolve alternate addresses
    // so lambda can access it
    NetworkResolution finalNetworkResolution = networkResolution;
    return config.nodes().stream().map(node -> new ResolvedNodeInfo(node, tls, finalNetworkResolution)).map(node -> SeedNode.create(node.host(), node.port(KV), node.port(MANAGER))).filter(node -> node.kvPort().isPresent()).collect(toSet());
}
Also used : KV(com.couchbase.client.core.service.ServiceType.KV) NodeInfo(com.couchbase.client.core.config.NodeInfo) CouchbaseException(com.couchbase.client.dcp.core.CouchbaseException) Set(java.util.Set) AlternateAddress(com.couchbase.client.core.config.AlternateAddress) ConnectionStringUtil(com.couchbase.client.core.util.ConnectionStringUtil) HashMap(java.util.HashMap) SeedNode(com.couchbase.client.core.env.SeedNode) MANAGER(com.couchbase.client.core.service.ServiceType.MANAGER) RedactableArgument.system(com.couchbase.client.dcp.core.logging.RedactableArgument.system) Bucket(com.couchbase.client.java.Bucket) EventBus(com.couchbase.client.core.cnc.EventBus) NetworkResolution(com.couchbase.client.core.env.NetworkResolution) ServiceType(com.couchbase.client.core.service.ServiceType) CouchbaseHelper(com.couchbase.connector.dcp.CouchbaseHelper) Duration(java.time.Duration) Map(java.util.Map) Optional(java.util.Optional) Collections.unmodifiableMap(java.util.Collections.unmodifiableMap) BucketConfig(com.couchbase.client.core.config.BucketConfig) Collectors.toSet(java.util.stream.Collectors.toSet) NetworkResolution(com.couchbase.client.core.env.NetworkResolution) EventBus(com.couchbase.client.core.cnc.EventBus) BucketConfig(com.couchbase.client.core.config.BucketConfig)

Example 2 with BucketConfig

use of com.couchbase.client.core.config.BucketConfig in project kafka-connect-couchbase by couchbase.

the class SeedNodeHelper method getKvNodes.

/**
 * Returns complete host and port information for every node running the KV service.
 */
public static Set<SeedNode> getKvNodes(Bucket bucket, String connectionString, boolean tls, NetworkResolution networkResolution, Duration timeout) {
    // Bucket config is most reliable way to determine KV ports
    BucketConfig config = CouchbaseHelper.getConfig(bucket, timeout);
    // so the actual node names can be used.
    if (networkResolution.equals(NetworkResolution.AUTO)) {
        EventBus eventBus = bucket.environment().eventBus();
        // The Java client calls seedNodesFromConnectionString during bootstrap, but the results
        // are not accessible here. Call it again.
        Set<String> seedHosts = ConnectionStringUtil.seedNodesFromConnectionString(connectionString, true, tls, eventBus).stream().map(SeedNode::address).collect(toSet());
        networkResolution = inferNetwork(config, networkResolution, seedHosts);
    }
    // Resolve alternate addresses
    // so lambda can access it
    NetworkResolution finalNetworkResolution = networkResolution;
    return config.nodes().stream().map(node -> new ResolvedNodeInfo(node, tls, finalNetworkResolution)).map(node -> SeedNode.create(node.host(), node.port(KV), node.port(MANAGER))).filter(node -> node.kvPort().isPresent()).collect(toSet());
}
Also used : KV(com.couchbase.client.core.service.ServiceType.KV) NodeInfo(com.couchbase.client.core.config.NodeInfo) CouchbaseException(com.couchbase.client.dcp.core.CouchbaseException) Set(java.util.Set) AlternateAddress(com.couchbase.client.core.config.AlternateAddress) ConnectionStringUtil(com.couchbase.client.core.util.ConnectionStringUtil) HashMap(java.util.HashMap) SeedNode(com.couchbase.client.core.env.SeedNode) MANAGER(com.couchbase.client.core.service.ServiceType.MANAGER) RedactableArgument.system(com.couchbase.client.dcp.core.logging.RedactableArgument.system) Bucket(com.couchbase.client.java.Bucket) EventBus(com.couchbase.client.core.cnc.EventBus) NetworkResolution(com.couchbase.client.core.env.NetworkResolution) ServiceType(com.couchbase.client.core.service.ServiceType) Duration(java.time.Duration) Map(java.util.Map) Optional(java.util.Optional) Collections.unmodifiableMap(java.util.Collections.unmodifiableMap) BucketConfig(com.couchbase.client.core.config.BucketConfig) Collectors.toSet(java.util.stream.Collectors.toSet) NetworkResolution(com.couchbase.client.core.env.NetworkResolution) EventBus(com.couchbase.client.core.cnc.EventBus) BucketConfig(com.couchbase.client.core.config.BucketConfig)

Example 3 with BucketConfig

use of com.couchbase.client.core.config.BucketConfig in project couchbase-jvm-clients by couchbase.

the class AsyncCollection method mutateInRequest.

/**
 * Helper method to create the underlying subdoc mutate request.
 *
 * @param id the outer document ID.
 * @param specs the spec which specifies the type of mutations to perform.
 * @param opts custom options to modify the mutation options.
 * @return the subdoc mutate request.
 */
CompletableFuture<SubdocMutateRequest> mutateInRequest(final String id, final List<MutateInSpec> specs, final MutateInOptions.Built opts, final Duration timeout) {
    notNullOrEmpty(id, "Id", () -> ReducedKeyValueErrorContext.create(id, collectionIdentifier));
    notNullOrEmpty(specs, "MutateInSpecs", () -> ReducedKeyValueErrorContext.create(id, collectionIdentifier));
    if (specs.isEmpty()) {
        throw SubdocMutateRequest.errIfNoCommands(ReducedKeyValueErrorContext.create(id, collectionIdentifier));
    } else if (specs.size() > SubdocMutateRequest.SUBDOC_MAX_FIELDS) {
        throw SubdocMutateRequest.errIfTooManyCommands(ReducedKeyValueErrorContext.create(id, collectionIdentifier));
    }
    final boolean requiresBucketConfig = opts.createAsDeleted() || opts.storeSemantics() == StoreSemantics.REVIVE;
    CompletableFuture<BucketConfig> bucketConfigFuture;
    if (requiresBucketConfig) {
        bucketConfigFuture = BucketConfigUtil.waitForBucketConfig(core, bucketName(), timeout).toFuture();
    } else {
        // Nothing will be using the bucket config so just provide null
        bucketConfigFuture = CompletableFuture.completedFuture(null);
    }
    return bucketConfigFuture.thenCompose(bucketConfig -> {
        RetryStrategy retryStrategy = opts.retryStrategy().orElse(environment.retryStrategy());
        JsonSerializer serializer = opts.serializer() == null ? environment.jsonSerializer() : opts.serializer();
        final RequestSpan span = environment.requestTracer().requestSpan(TracingIdentifiers.SPAN_REQUEST_KV_MUTATE_IN, opts.parentSpan().orElse(null));
        ArrayList<SubdocMutateRequest.Command> commands = new ArrayList<>(specs.size());
        final RequestSpan encodeSpan = environment.requestTracer().requestSpan(TracingIdentifiers.SPAN_REQUEST_ENCODING, span);
        long start = System.nanoTime();
        try {
            for (int i = 0; i < specs.size(); i++) {
                MutateInSpec spec = specs.get(i);
                commands.add(spec.encode(serializer, i));
            }
        } finally {
            encodeSpan.end();
        }
        long end = System.nanoTime();
        // xattrs come first
        commands.sort(Comparator.comparing(v -> !v.xattr()));
        long expiry = opts.expiry().encode();
        SubdocMutateRequest request = new SubdocMutateRequest(timeout, coreContext, collectionIdentifier, bucketConfig, retryStrategy, id, opts.storeSemantics() == StoreSemantics.INSERT, opts.storeSemantics() == StoreSemantics.UPSERT, opts.storeSemantics() == StoreSemantics.REVIVE, opts.accessDeleted(), opts.createAsDeleted(), commands, expiry, opts.preserveExpiry(), opts.cas(), opts.durabilityLevel(), span);
        request.context().clientContext(opts.clientContext()).encodeLatency(end - start);
        final CompletableFuture<SubdocMutateRequest> future = new CompletableFuture<>();
        future.complete(request);
        return future;
    });
}
Also used : MutateInAccessor(com.couchbase.client.java.kv.MutateInAccessor) JsonSerializer(com.couchbase.client.java.codec.JsonSerializer) InsertOptions(com.couchbase.client.java.kv.InsertOptions) MutationResult(com.couchbase.client.java.kv.MutationResult) DEFAULT_REPLACE_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_REPLACE_OPTIONS) Validators.notNull(com.couchbase.client.core.util.Validators.notNull) PersistTo(com.couchbase.client.java.kv.PersistTo) ReplaceAccessor(com.couchbase.client.java.kv.ReplaceAccessor) TouchAccessor(com.couchbase.client.java.kv.TouchAccessor) DEFAULT_GET_AND_LOCK_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_GET_AND_LOCK_OPTIONS) CoreContext(com.couchbase.client.core.CoreContext) Duration(java.time.Duration) RequestSpan(com.couchbase.client.core.cnc.RequestSpan) ClusterEnvironment(com.couchbase.client.java.env.ClusterEnvironment) GetAndTouchOptions(com.couchbase.client.java.kv.GetAndTouchOptions) LookupInMacro(com.couchbase.client.java.kv.LookupInMacro) BucketConfig(com.couchbase.client.core.config.BucketConfig) GetAllReplicasOptions(com.couchbase.client.java.kv.GetAllReplicasOptions) TouchRequest(com.couchbase.client.core.msg.kv.TouchRequest) RemoveOptions(com.couchbase.client.java.kv.RemoveOptions) ExistsOptions(com.couchbase.client.java.kv.ExistsOptions) InsertAccessor(com.couchbase.client.java.kv.InsertAccessor) DEFAULT_INSERT_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_INSERT_OPTIONS) GetAndTouchRequest(com.couchbase.client.core.msg.kv.GetAndTouchRequest) GetReplicaResult(com.couchbase.client.java.kv.GetReplicaResult) ExistsResult(com.couchbase.client.java.kv.ExistsResult) UnlockAccessor(com.couchbase.client.java.kv.UnlockAccessor) InvalidArgumentException(com.couchbase.client.core.error.InvalidArgumentException) Validators.notNullOrEmpty(com.couchbase.client.core.util.Validators.notNullOrEmpty) ReplicaHelper(com.couchbase.client.core.service.kv.ReplicaHelper) Expiry(com.couchbase.client.java.kv.Expiry) List(java.util.List) SubdocGetRequest(com.couchbase.client.core.msg.kv.SubdocGetRequest) GetAndLockRequest(com.couchbase.client.core.msg.kv.GetAndLockRequest) LookupInOptions(com.couchbase.client.java.kv.LookupInOptions) SubdocMutateRequest(com.couchbase.client.core.msg.kv.SubdocMutateRequest) GetAccessor(com.couchbase.client.java.kv.GetAccessor) GetRequest(com.couchbase.client.core.msg.kv.GetRequest) Optional(java.util.Optional) ReplaceRequest(com.couchbase.client.core.msg.kv.ReplaceRequest) DEFAULT_GET_ALL_REPLICAS_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_GET_ALL_REPLICAS_OPTIONS) DEFAULT_MUTATE_IN_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_MUTATE_IN_OPTIONS) GetOptions(com.couchbase.client.java.kv.GetOptions) UpsertAccessor(com.couchbase.client.java.kv.UpsertAccessor) RemoveAccessor(com.couchbase.client.java.kv.RemoveAccessor) GetResult(com.couchbase.client.java.kv.GetResult) ExistsAccessor(com.couchbase.client.java.kv.ExistsAccessor) TouchOptions(com.couchbase.client.java.kv.TouchOptions) UnlockOptions(com.couchbase.client.java.kv.UnlockOptions) DEFAULT_GET_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_GET_OPTIONS) RemoveRequest(com.couchbase.client.core.msg.kv.RemoveRequest) StoreSemantics(com.couchbase.client.java.kv.StoreSemantics) CompletableFuture(java.util.concurrent.CompletableFuture) CommonDurabilityOptions(com.couchbase.client.java.kv.CommonDurabilityOptions) GetMetaRequest(com.couchbase.client.core.msg.kv.GetMetaRequest) ArrayList(java.util.ArrayList) DEFAULT_TOUCH_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_TOUCH_OPTIONS) GetAnyReplicaOptions(com.couchbase.client.java.kv.GetAnyReplicaOptions) ReplaceOptions(com.couchbase.client.java.kv.ReplaceOptions) InsertRequest(com.couchbase.client.core.msg.kv.InsertRequest) TracingIdentifiers(com.couchbase.client.core.cnc.TracingIdentifiers) GetAndLockOptions(com.couchbase.client.java.kv.GetAndLockOptions) DEFAULT_REMOVE_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_REMOVE_OPTIONS) MutateInSpec(com.couchbase.client.java.kv.MutateInSpec) Stability(com.couchbase.client.core.annotation.Stability) DEFAULT_EXISTS_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_EXISTS_OPTIONS) DEFAULT_GET_ANY_REPLICA_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_GET_ANY_REPLICA_OPTIONS) UpsertOptions(com.couchbase.client.java.kv.UpsertOptions) LookupInResult(com.couchbase.client.java.kv.LookupInResult) MutateInOptions(com.couchbase.client.java.kv.MutateInOptions) MutateInResult(com.couchbase.client.java.kv.MutateInResult) DEFAULT_UPSERT_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_UPSERT_OPTIONS) UnlockRequest(com.couchbase.client.core.msg.kv.UnlockRequest) LookupInAccessor(com.couchbase.client.java.kv.LookupInAccessor) DEFAULT_GET_AND_TOUCH_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_GET_AND_TOUCH_OPTIONS) UpsertRequest(com.couchbase.client.core.msg.kv.UpsertRequest) LookupInSpec(com.couchbase.client.java.kv.LookupInSpec) DEFAULT_LOOKUP_IN_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_LOOKUP_IN_OPTIONS) Transcoder(com.couchbase.client.java.codec.Transcoder) DurabilityLevel(com.couchbase.client.core.msg.kv.DurabilityLevel) CollectionIdentifier(com.couchbase.client.core.io.CollectionIdentifier) RetryStrategy(com.couchbase.client.core.retry.RetryStrategy) Core(com.couchbase.client.core.Core) ReducedKeyValueErrorContext(com.couchbase.client.core.error.context.ReducedKeyValueErrorContext) Comparator(java.util.Comparator) DEFAULT_UNLOCK_OPTIONS(com.couchbase.client.java.ReactiveCollection.DEFAULT_UNLOCK_OPTIONS) TimeoutConfig(com.couchbase.client.core.env.TimeoutConfig) SubdocCommandType(com.couchbase.client.core.msg.kv.SubdocCommandType) BucketConfigUtil(com.couchbase.client.core.util.BucketConfigUtil) ArrayList(java.util.ArrayList) MutateInSpec(com.couchbase.client.java.kv.MutateInSpec) JsonSerializer(com.couchbase.client.java.codec.JsonSerializer) BucketConfig(com.couchbase.client.core.config.BucketConfig) RequestSpan(com.couchbase.client.core.cnc.RequestSpan) CompletableFuture(java.util.concurrent.CompletableFuture) SubdocMutateRequest(com.couchbase.client.core.msg.kv.SubdocMutateRequest) RetryStrategy(com.couchbase.client.core.retry.RetryStrategy)

Example 4 with BucketConfig

use of com.couchbase.client.core.config.BucketConfig in project couchbase-jvm-clients by couchbase.

the class CoreTest method removeNodesAndServicesOnNewConfig.

@Test
@SuppressWarnings("unchecked")
void removeNodesAndServicesOnNewConfig() {
    final ConfigurationProvider configProvider = mock(ConfigurationProvider.class);
    DirectProcessor<ClusterConfig> configs = DirectProcessor.create();
    ClusterConfig clusterConfig = new ClusterConfig();
    when(configProvider.configs()).thenReturn(configs);
    when(configProvider.config()).thenReturn(clusterConfig);
    Node mock101 = mock(Node.class);
    when(mock101.identifier()).thenReturn(new NodeIdentifier("10.143.190.101", 8091));
    when(mock101.addService(any(ServiceType.class), anyInt(), any(Optional.class))).thenReturn(Mono.empty());
    when(mock101.removeService(any(ServiceType.class), any(Optional.class))).thenReturn(Mono.empty());
    when(mock101.serviceEnabled(any(ServiceType.class))).thenReturn(true);
    when(mock101.disconnect()).thenReturn(Mono.empty());
    Node mock102 = mock(Node.class);
    when(mock102.identifier()).thenReturn(new NodeIdentifier("10.143.190.102", 8091));
    when(mock102.addService(any(ServiceType.class), anyInt(), any(Optional.class))).thenReturn(Mono.empty());
    when(mock102.removeService(any(ServiceType.class), any(Optional.class))).thenReturn(Mono.empty());
    when(mock102.serviceEnabled(any(ServiceType.class))).thenReturn(true);
    when(mock102.disconnect()).thenReturn(Mono.empty());
    final Map<String, Node> mocks = new HashMap<>();
    mocks.put("10.143.190.101", mock101);
    mocks.put("10.143.190.102", mock102);
    new Core(ENV, AUTHENTICATOR, SeedNode.LOCALHOST) {

        @Override
        public ConfigurationProvider createConfigurationProvider() {
            return configProvider;
        }

        @Override
        protected Node createNode(final NodeIdentifier target, final Optional<String> alternate) {
            return mocks.get(target.address());
        }
    };
    configs.onNext(clusterConfig);
    BucketConfig twoNodesConfig = BucketConfigParser.parse(readResource("two_nodes_config_more_services.json", CoreTest.class), ENV, LOCALHOST);
    clusterConfig.setBucketConfig(twoNodesConfig);
    configs.onNext(clusterConfig);
    verify(mock101, times(1)).addService(ServiceType.VIEWS, 8092, Optional.empty());
    verify(mock101, times(1)).addService(ServiceType.MANAGER, 8091, Optional.empty());
    verify(mock101, times(1)).addService(ServiceType.QUERY, 8093, Optional.empty());
    verify(mock101, times(1)).addService(ServiceType.KV, 11210, Optional.of("travel-sample"));
    verify(mock102, times(1)).addService(ServiceType.VIEWS, 8092, Optional.empty());
    verify(mock102, times(1)).addService(ServiceType.MANAGER, 8091, Optional.empty());
    verify(mock102, times(1)).addService(ServiceType.QUERY, 8093, Optional.empty());
    verify(mock102, times(1)).addService(ServiceType.KV, 11210, Optional.of("travel-sample"));
    verify(mock102, times(1)).addService(ServiceType.SEARCH, 8094, Optional.empty());
    BucketConfig twoNodesLessServices = BucketConfigParser.parse(readResource("two_nodes_config.json", CoreTest.class), ENV, LOCALHOST);
    clusterConfig.setBucketConfig(twoNodesLessServices);
    configs.onNext(clusterConfig);
    verify(mock102, times(1)).removeService(ServiceType.SEARCH, Optional.empty());
}
Also used : Optional(java.util.Optional) HashMap(java.util.HashMap) ConfigurationProvider(com.couchbase.client.core.config.ConfigurationProvider) SeedNode(com.couchbase.client.core.env.SeedNode) Node(com.couchbase.client.core.node.Node) BucketConfig(com.couchbase.client.core.config.BucketConfig) ServiceType(com.couchbase.client.core.service.ServiceType) NodeIdentifier(com.couchbase.client.core.node.NodeIdentifier) ClusterConfig(com.couchbase.client.core.config.ClusterConfig) Test(org.junit.jupiter.api.Test)

Example 5 with BucketConfig

use of com.couchbase.client.core.config.BucketConfig in project couchbase-jvm-clients by couchbase.

the class CoreTest method addsSecondNodeIfBothSameHostname.

/**
 * With cluster_run it is possible to run more than one node on the same hostname. So we need to make sure that
 * the node is identified by a tuple of hostname and manager port, and this should work.
 */
@Test
@SuppressWarnings("unchecked")
void addsSecondNodeIfBothSameHostname() {
    final ConfigurationProvider configProvider = mock(ConfigurationProvider.class);
    DirectProcessor<ClusterConfig> configs = DirectProcessor.create();
    ClusterConfig clusterConfig = new ClusterConfig();
    when(configProvider.configs()).thenReturn(configs);
    when(configProvider.config()).thenReturn(clusterConfig);
    Node mock101 = mock(Node.class);
    when(mock101.identifier()).thenReturn(new NodeIdentifier(LOCALHOST, 9000));
    when(mock101.addService(any(ServiceType.class), anyInt(), any(Optional.class))).thenReturn(Mono.empty());
    when(mock101.removeService(any(ServiceType.class), any(Optional.class))).thenReturn(Mono.empty());
    when(mock101.serviceEnabled(any(ServiceType.class))).thenReturn(true);
    when(mock101.disconnect()).thenReturn(Mono.empty());
    Node mock102 = mock(Node.class);
    when(mock102.identifier()).thenReturn(new NodeIdentifier(LOCALHOST, 9001));
    when(mock102.addService(any(ServiceType.class), anyInt(), any(Optional.class))).thenReturn(Mono.empty());
    when(mock102.removeService(any(ServiceType.class), any(Optional.class))).thenReturn(Mono.empty());
    when(mock102.serviceEnabled(any(ServiceType.class))).thenReturn(true);
    when(mock102.disconnect()).thenReturn(Mono.empty());
    final Map<String, Node> mocks = new HashMap<>();
    mocks.put("127.0.0.1:9000", mock101);
    mocks.put("127.0.0.1:9001", mock102);
    new Core(ENV, AUTHENTICATOR, SeedNode.LOCALHOST) {

        @Override
        public ConfigurationProvider createConfigurationProvider() {
            return configProvider;
        }

        @Override
        protected Node createNode(final NodeIdentifier target, final Optional<String> alternate) {
            return mocks.get(target.address() + ":" + target.managerPort());
        }
    };
    configs.onNext(clusterConfig);
    BucketConfig oneNodeConfig = BucketConfigParser.parse(readResource("cluster_run_two_nodes.json", CoreTest.class), ENV, LOCALHOST);
    clusterConfig.setBucketConfig(oneNodeConfig);
    configs.onNext(clusterConfig);
    verify(mock101, times(1)).addService(ServiceType.VIEWS, 9500, Optional.empty());
    verify(mock101, times(1)).addService(ServiceType.MANAGER, 9000, Optional.empty());
    verify(mock101, times(1)).addService(ServiceType.KV, 12000, Optional.of("default"));
    verify(mock102, times(1)).addService(ServiceType.VIEWS, 9501, Optional.empty());
    verify(mock102, times(1)).addService(ServiceType.MANAGER, 9001, Optional.empty());
    verify(mock102, times(1)).addService(ServiceType.KV, 12002, Optional.of("default"));
}
Also used : Optional(java.util.Optional) HashMap(java.util.HashMap) ConfigurationProvider(com.couchbase.client.core.config.ConfigurationProvider) SeedNode(com.couchbase.client.core.env.SeedNode) Node(com.couchbase.client.core.node.Node) BucketConfig(com.couchbase.client.core.config.BucketConfig) ServiceType(com.couchbase.client.core.service.ServiceType) NodeIdentifier(com.couchbase.client.core.node.NodeIdentifier) ClusterConfig(com.couchbase.client.core.config.ClusterConfig) Test(org.junit.jupiter.api.Test)

Aggregations

BucketConfig (com.couchbase.client.core.config.BucketConfig)20 Optional (java.util.Optional)12 ServiceType (com.couchbase.client.core.service.ServiceType)10 NodeIdentifier (com.couchbase.client.core.node.NodeIdentifier)9 HashMap (java.util.HashMap)9 SeedNode (com.couchbase.client.core.env.SeedNode)8 Duration (java.time.Duration)8 ClusterConfig (com.couchbase.client.core.config.ClusterConfig)7 ConfigurationProvider (com.couchbase.client.core.config.ConfigurationProvider)7 ArrayList (java.util.ArrayList)7 Map (java.util.Map)7 Test (org.junit.jupiter.api.Test)7 Core (com.couchbase.client.core.Core)6 Stability (com.couchbase.client.core.annotation.Stability)6 CouchbaseBucketConfig (com.couchbase.client.core.config.CouchbaseBucketConfig)6 Node (com.couchbase.client.core.node.Node)6 List (java.util.List)5 Flux (reactor.core.publisher.Flux)5 Reactor (com.couchbase.client.core.Reactor)4 EventBus (com.couchbase.client.core.cnc.EventBus)4