yihua commented on code in PR #11956:
URL: https://github.com/apache/hudi/pull/11956#discussion_r1765762237
##########
hudi-gcp/src/test/java/org/apache/hudi/gcp/bigquery/TestBigQuerySyncConfig.java:
##########
@@ -47,6 +48,7 @@ public class TestBigQuerySyncConfig {
public void testGetConfigs() {
Properties props = new Properties();
props.setProperty(BIGQUERY_SYNC_PROJECT_ID.key(), "fooproject");
+ props.setProperty(BIGQUERY_SYNC_BILLING_PROJECT_ID.key(), "fooproject");
Review Comment:
Could you use a different project ID for billing in the test?
##########
hudi-gcp/src/test/java/org/apache/hudi/gcp/bigquery/TestHoodieBigQuerySyncClient.java:
##########
@@ -62,6 +62,7 @@
public class TestHoodieBigQuerySyncClient {
private static final String PROJECT_ID = "test_project";
+ private static final String BILLING_PROJECT_ID = "test_project";
Review Comment:
Similar here.
##########
hudi-gcp/src/main/java/org/apache/hudi/gcp/bigquery/HoodieBigQuerySyncClient.java:
##########
@@ -124,7 +128,7 @@ public void createOrUpdateTableUsingBqManifestFile(String
tableName, String bqMa
QueryJobConfiguration queryConfig =
QueryJobConfiguration.newBuilder(query)
.setUseLegacySql(false)
.build();
- JobId jobId =
JobId.newBuilder().setProject(projectId).setRandomJob().build();
+ JobId jobId =
JobId.newBuilder().setProject(billingProjectId).setRandomJob().build();
Review Comment:
Why is the billing project ID used here only?
##########
hudi-gcp/src/main/java/org/apache/hudi/gcp/bigquery/BigQuerySyncConfig.java:
##########
@@ -58,6 +58,12 @@ public class BigQuerySyncConfig extends HoodieSyncConfig
implements Serializable
.markAdvanced()
.withDocumentation("Name of the target project in BigQuery");
+ public static final ConfigProperty<String> BIGQUERY_SYNC_BILLING_PROJECT_ID
= ConfigProperty
+ .key("hoodie.gcp.bigquery.sync.project_id")
Review Comment:
```suggestion
.key("hoodie.gcp.bigquery.sync.billing_project_id")
```
##########
hudi-gcp/src/main/java/org/apache/hudi/gcp/bigquery/BigQuerySyncConfig.java:
##########
@@ -58,6 +58,12 @@ public class BigQuerySyncConfig extends HoodieSyncConfig
implements Serializable
.markAdvanced()
.withDocumentation("Name of the target project in BigQuery");
+ public static final ConfigProperty<String> BIGQUERY_SYNC_BILLING_PROJECT_ID
= ConfigProperty
+ .key("hoodie.gcp.bigquery.sync.project_id")
+ .noDefaultValue()
+ .markAdvanced()
Review Comment:
Add `.sinceVersion("1.0.0")`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]