You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "bvolpato (via GitHub)" <gi...@apache.org> on 2023/10/16 17:15:00 UTC

[PR] [JdbcIO] Add fetchSize to the schema provider for partitioned reads [beam]

bvolpato opened a new pull request, #29015:
URL: https://github.com/apache/beam/pull/29015

   Follow up on https://github.com/apache/beam/pull/28999
   
   Support to fetchSize was added, but missed the Schema Provider to be able to use it through xlang (thanks @Abacn!)
   
   


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [JdbcIO] Add fetchSize to the schema provider for partitioned reads [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #29015:
URL: https://github.com/apache/beam/pull/29015#issuecomment-1769825794

   Run Python 3.8 PostCommit


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [JdbcIO] Add fetchSize to the schema provider for partitioned reads [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #29015:
URL: https://github.com/apache/beam/pull/29015#discussion_r1362258682


##########
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcSchemaIOProvider.java:
##########
@@ -134,6 +134,12 @@ public PCollection<Row> expand(PBegin input) {
             if (partitions != null) {
               readRows = readRows.withNumPartitions(partitions);
             }
+
+            @Nullable Short fetchSize = config.getInt16("fetchSize");

Review Comment:
   this would change existing behavior. If change the default we should switch the int16 to int32 type for fetchSize everywhere (SchemaIOProvider, Python wrapper) to give an option for user a way to keep the original size (50,000). Current change also LGTM. 



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [JdbcIO] Add fetchSize to the schema provider for partitioned reads [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #29015:
URL: https://github.com/apache/beam/pull/29015#issuecomment-1765149038

   Assigning reviewers. If you would like to opt out of this review, comment `assign to next reviewer`:
   
   R: @Abacn for label java.
   R: @chamikaramj for label io.
   
   Available commands:
   - `stop reviewer notifications` - opt out of the automated review tooling
   - `remind me after tests pass` - tag the comment author after tests pass
   - `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
   
   The PR bot will only process comments in the main thread (not review comments).


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [JdbcIO] Add fetchSize to the schema provider for partitioned reads [beam]

Posted by "bvolpato (via GitHub)" <gi...@apache.org>.
bvolpato commented on code in PR #29015:
URL: https://github.com/apache/beam/pull/29015#discussion_r1361111071


##########
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcSchemaIOProvider.java:
##########
@@ -134,6 +134,12 @@ public PCollection<Row> expand(PBegin input) {
             if (partitions != null) {
               readRows = readRows.withNumPartitions(partitions);
             }
+
+            @Nullable Short fetchSize = config.getInt16("fetchSize");

Review Comment:
   Yes, I found it strange but just replicated what was in the non-partitioned.
   
   I think making it clearer and switching the default to int16_max instead of 50000 would make more sense, and make JdbcIO more usable / drop-in for most databases (since we reportedly had issues when some databases went over it).
   
   What do you think?
   



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [JdbcIO] Add fetchSize to the schema provider for partitioned reads [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #29015:
URL: https://github.com/apache/beam/pull/29015#issuecomment-1769825092

   Run Python3.8 PostCommit


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [JdbcIO] Add fetchSize to the schema provider for partitioned reads [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #29015:
URL: https://github.com/apache/beam/pull/29015#discussion_r1361108187


##########
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcSchemaIOProvider.java:
##########
@@ -134,6 +134,12 @@ public PCollection<Row> expand(PBegin input) {
             if (partitions != null) {
               readRows = readRows.withNumPartitions(partitions);
             }
+
+            @Nullable Short fetchSize = config.getInt16("fetchSize");

Review Comment:
   This would result in the same limit as https://github.com/apache/beam/pull/28999 as int64_max=32767. This may or may not be a reason why https://github.com/apache/beam/pull/12498/files set this to int16 at the first place. We may revisit this if there is use case that need to make fetch size larger. Currently better document the max allowed number is int16_max here



##########
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcSchemaIOProvider.java:
##########
@@ -134,6 +134,12 @@ public PCollection<Row> expand(PBegin input) {
             if (partitions != null) {
               readRows = readRows.withNumPartitions(partitions);
             }
+
+            @Nullable Short fetchSize = config.getInt16("fetchSize");

Review Comment:
   This would result in the same limit as https://github.com/apache/beam/pull/28999 as int16_max=32767. This may or may not be a reason why https://github.com/apache/beam/pull/12498/files set this to int16 at the first place. We may revisit this if there is use case that need to make fetch size larger. Currently better document the max allowed number is int16_max here



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [JdbcIO] Add fetchSize to the schema provider for partitioned reads [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #29015:
URL: https://github.com/apache/beam/pull/29015#discussion_r1362258682


##########
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcSchemaIOProvider.java:
##########
@@ -134,6 +134,12 @@ public PCollection<Row> expand(PBegin input) {
             if (partitions != null) {
               readRows = readRows.withNumPartitions(partitions);
             }
+
+            @Nullable Short fetchSize = config.getInt16("fetchSize");

Review Comment:
   this would change existing behavior. If change the default we should switch the int16 to int32 type for fetchSize everywhere (SchemaIOProvider, Python wrapper) to give an option for user to keep the original size (50,000). Current change also LGTM. 



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [JdbcIO] Add fetchSize to the schema provider for partitioned reads [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn merged PR #29015:
URL: https://github.com/apache/beam/pull/29015


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org