Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose node config to StoreMetadataService #442

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import apache.rocketmq.controller.v1.S3WALObject;
import apache.rocketmq.controller.v1.StreamMetadata;
import apache.rocketmq.controller.v1.StreamRole;
import com.automq.rocketmq.common.config.ControllerConfig;
import com.automq.rocketmq.controller.exception.ControllerException;
import com.automq.rocketmq.controller.metadata.MetadataStore;
import com.automq.rocketmq.controller.metadata.database.DefaultMetadataStore;
Expand Down Expand Up @@ -146,6 +147,11 @@ public int ownerNode(long topicId, int queueId) {
return metadataStore.ownerNode(topicId, queueId);
}

@Override
public ControllerConfig nodeConfig() {
return metadataStore.config();
}

@Override
public CompletableFuture<List<StreamMetadata>> getStreams(List<Long> streamIds) {
return metadataStore.getStreams(streamIds);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import apache.rocketmq.controller.v1.S3StreamObject;
import apache.rocketmq.controller.v1.S3WALObject;
import apache.rocketmq.controller.v1.StreamMetadata;
import com.automq.rocketmq.common.config.ControllerConfig;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.apache.commons.lang3.tuple.Pair;
Expand Down Expand Up @@ -184,6 +185,8 @@ CompletableFuture<Pair<List<S3StreamObject>, List<S3WALObject>>> listObjects(lon

int ownerNode(long topicId, int queueId);

ControllerConfig nodeConfig();

/**
* Get the stream metadata for the specified list of stream ids.
* @param streamIds list of specified stream ids
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import apache.rocketmq.controller.v1.S3StreamObject;
import apache.rocketmq.controller.v1.S3WALObject;
import apache.rocketmq.controller.v1.StreamMetadata;
import com.automq.rocketmq.common.config.ControllerConfig;
import com.automq.rocketmq.metadata.api.StoreMetadataService;
import java.nio.ByteBuffer;
import java.util.List;
Expand Down Expand Up @@ -142,6 +143,11 @@ public int ownerNode(long topicId, int queueId) {
return 0;
}

@Override
public ControllerConfig nodeConfig() {
return null;
}

@Override
public CompletableFuture<List<StreamMetadata>> getStreams(List<Long> streamIds) {
return null;
Expand Down