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

fix: allow factory to export to different projects #2374

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mutianf
Copy link
Contributor

@mutianf mutianf commented Oct 8, 2024

This fix removed the check on Bigtable project id and gets the BigtableTable resource project id directly from metrics attribute. BigtableDataClientFactory can create one client for multiple projects. Removing the check allows people using BigtableDataClientFactory to export to different projects.

@mutianf mutianf requested review from a team as code owners October 8, 2024 14:01
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigtable Issues related to the googleapis/java-bigtable API. labels Oct 8, 2024
@mutianf mutianf marked this pull request as draft October 8, 2024 15:32
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Oct 16, 2024
@mutianf mutianf marked this pull request as ready for review October 16, 2024 13:26
Copy link
Contributor

@igorbernstein2 igorbernstein2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, this needs a test :)

@@ -110,17 +111,22 @@ static String getProjectId(PointData pointData) {
return pointData.getAttributes().get(BIGTABLE_PROJECT_ID_KEY);
}

static List<TimeSeries> convertToBigtableTimeSeries(List<MetricData> collection, String taskId) {
List<TimeSeries> allTimeSeries = new ArrayList<>();
static Map<String, List<TimeSeries>> convertToBigtableTimeSeries(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs for what the key is here

@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/java-bigtable API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants