You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/12/04 11:23:36 UTC

[GitHub] [flink] leonardBang opened a new pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

leonardBang opened a new pull request #14310:
URL: https://github.com/apache/flink/pull/14310


   ## What is the purpose of the change
   
   * Currently we limits the monitor interval should be at least 1 hour to avoid produce pressure to hive meta store, this should be safe in production, but it's inconvenient for demo or simple user case. This pull request to unlock the monitor interval limitation of hive temporal table.
   
   
   ## Brief change log
   
     - update file `org/apache/flink/connectors/hive/HiveLookupTableSource.java`
   
   
   ## Verifying this change
   
   * Add unit test to check monitor interval can be set by users.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): ( no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   


----------------------------------------------------------------
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.

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



[GitHub] [flink] lirui-apache commented on a change in pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
lirui-apache commented on a change in pull request #14310:
URL: https://github.com/apache/flink/pull/14310#discussion_r536070401



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveLookupTableSource.java
##########
@@ -114,16 +117,16 @@ private void validateLookupConfigurations() {
 			Duration monitorInterval = configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL) == null
 					? DEFAULT_LOOKUP_MONITOR_INTERVAL
 					: configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL);
-			Preconditions.checkArgument(
-					monitorInterval.toMillis() >= DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-					String.format(
-							"Currently the value of '%s' is required bigger or equal to default value '%s' " +
-									"when set '%s' to 'latest', but actual is '%s'",
-							STREAMING_SOURCE_MONITOR_INTERVAL.key(),
-							DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-							STREAMING_SOURCE_PARTITION_INCLUDE.key(),
-							monitorInterval.toMillis())
-			);
+
+			if (monitorInterval.toMillis() < DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis()) {
+				LOG.warn(String.format(
+					"Currently the recommended value of '%s' is bigger than default value '%s' " +

Review comment:
       It seems to me that contacting metastore every 30min for new partitions should be absolutely fine.




----------------------------------------------------------------
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.

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



[GitHub] [flink] lirui-apache commented on a change in pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
lirui-apache commented on a change in pull request #14310:
URL: https://github.com/apache/flink/pull/14310#discussion_r537258582



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveLookupTableSource.java
##########
@@ -114,16 +117,16 @@ private void validateLookupConfigurations() {
 			Duration monitorInterval = configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL) == null
 					? DEFAULT_LOOKUP_MONITOR_INTERVAL
 					: configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL);
-			Preconditions.checkArgument(
-					monitorInterval.toMillis() >= DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-					String.format(
-							"Currently the value of '%s' is required bigger or equal to default value '%s' " +
-									"when set '%s' to 'latest', but actual is '%s'",
-							STREAMING_SOURCE_MONITOR_INTERVAL.key(),
-							DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-							STREAMING_SOURCE_PARTITION_INCLUDE.key(),
-							monitorInterval.toMillis())
-			);
+
+			if (monitorInterval.toMillis() < DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis()) {
+				LOG.warn(String.format(
+					"Currently the recommended value of '%s' is bigger than default value '%s' " +

Review comment:
       @leonardBang  I see your point and I didn't realize it's distributed access to HMS. In that case, I'm fine to keep the threshold as it is. Perhaps we should worry more about how many tasks can concurrently access HMS, than how often they access.
   
   One more suggestion about the log message: I think `"Currently the recommended value of '%s' is at least '%s' when set...` is easier to understand.




----------------------------------------------------------------
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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14310:
URL: https://github.com/apache/flink/pull/14310#issuecomment-738741642


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cded2fcb5f10c8d6bdbfdece1c591fa658377f90",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10524",
       "triggerID" : "cded2fcb5f10c8d6bdbfdece1c591fa658377f90",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cded2fcb5f10c8d6bdbfdece1c591fa658377f90 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10524) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

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



[GitHub] [flink] wuchong merged pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
wuchong merged pull request #14310:
URL: https://github.com/apache/flink/pull/14310


   


----------------------------------------------------------------
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.

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



[GitHub] [flink] wuchong commented on a change in pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #14310:
URL: https://github.com/apache/flink/pull/14310#discussion_r537220712



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveLookupTableSource.java
##########
@@ -114,16 +117,16 @@ private void validateLookupConfigurations() {
 			Duration monitorInterval = configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL) == null
 					? DEFAULT_LOOKUP_MONITOR_INTERVAL
 					: configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL);
-			Preconditions.checkArgument(
-					monitorInterval.toMillis() >= DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-					String.format(
-							"Currently the value of '%s' is required bigger or equal to default value '%s' " +
-									"when set '%s' to 'latest', but actual is '%s'",
-							STREAMING_SOURCE_MONITOR_INTERVAL.key(),
-							DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-							STREAMING_SOURCE_PARTITION_INCLUDE.key(),
-							monitorInterval.toMillis())
-			);
+
+			if (monitorInterval.toMillis() < DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis()) {
+				LOG.warn(String.format(
+					"Currently the recommended value of '%s' is bigger than default value '%s' " +

Review comment:
       I agree with @lirui-apache 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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14310:
URL: https://github.com/apache/flink/pull/14310#issuecomment-738741642


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cded2fcb5f10c8d6bdbfdece1c591fa658377f90",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10524",
       "triggerID" : "cded2fcb5f10c8d6bdbfdece1c591fa658377f90",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9a8532f2384af5fab3b187902da54c32d05b713a",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9a8532f2384af5fab3b187902da54c32d05b713a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cded2fcb5f10c8d6bdbfdece1c591fa658377f90 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10524) 
   * 9a8532f2384af5fab3b187902da54c32d05b713a UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

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



[GitHub] [flink] leonardBang commented on a change in pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #14310:
URL: https://github.com/apache/flink/pull/14310#discussion_r537222451



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveLookupTableSource.java
##########
@@ -114,16 +117,16 @@ private void validateLookupConfigurations() {
 			Duration monitorInterval = configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL) == null
 					? DEFAULT_LOOKUP_MONITOR_INTERVAL
 					: configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL);
-			Preconditions.checkArgument(
-					monitorInterval.toMillis() >= DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-					String.format(
-							"Currently the value of '%s' is required bigger or equal to default value '%s' " +
-									"when set '%s' to 'latest', but actual is '%s'",
-							STREAMING_SOURCE_MONITOR_INTERVAL.key(),
-							DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-							STREAMING_SOURCE_PARTITION_INCLUDE.key(),
-							monitorInterval.toMillis())
-			);
+
+			if (monitorInterval.toMillis() < DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis()) {
+				LOG.warn(String.format(
+					"Currently the recommended value of '%s' is bigger than default value '%s' " +

Review comment:
        >So I suppose the warning threshold here shouldn't be bigger than that.
   
   I totally agree that we should align the behaviour, but as the document reminded, currently the look up hive parttiont implementation is visit metastore from every task and the  `hive-streaming source/sink` just visit metastore from one task. So, I'm worried about use same value is not a good choice from current situation. 
   




----------------------------------------------------------------
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.

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



[GitHub] [flink] lirui-apache commented on a change in pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
lirui-apache commented on a change in pull request #14310:
URL: https://github.com/apache/flink/pull/14310#discussion_r536069619



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveLookupTableSource.java
##########
@@ -114,16 +117,16 @@ private void validateLookupConfigurations() {
 			Duration monitorInterval = configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL) == null
 					? DEFAULT_LOOKUP_MONITOR_INTERVAL
 					: configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL);
-			Preconditions.checkArgument(
-					monitorInterval.toMillis() >= DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-					String.format(
-							"Currently the value of '%s' is required bigger or equal to default value '%s' " +
-									"when set '%s' to 'latest', but actual is '%s'",
-							STREAMING_SOURCE_MONITOR_INTERVAL.key(),
-							DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-							STREAMING_SOURCE_PARTITION_INCLUDE.key(),
-							monitorInterval.toMillis())
-			);
+
+			if (monitorInterval.toMillis() < DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis()) {
+				LOG.warn(String.format(
+					"Currently the recommended value of '%s' is bigger than default value '%s' " +

Review comment:
       I'm curious how we decided that 1h is the recommended value for monitor interval, and why a smaller value, say, 30min can cause pressure on metastore?




----------------------------------------------------------------
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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14310:
URL: https://github.com/apache/flink/pull/14310#issuecomment-738741642


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cded2fcb5f10c8d6bdbfdece1c591fa658377f90",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10524",
       "triggerID" : "cded2fcb5f10c8d6bdbfdece1c591fa658377f90",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9a8532f2384af5fab3b187902da54c32d05b713a",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10563",
       "triggerID" : "9a8532f2384af5fab3b187902da54c32d05b713a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cded2fcb5f10c8d6bdbfdece1c591fa658377f90 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10524) 
   * 9a8532f2384af5fab3b187902da54c32d05b713a Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10563) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

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



[GitHub] [flink] leonardBang commented on a change in pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #14310:
URL: https://github.com/apache/flink/pull/14310#discussion_r537306539



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveLookupTableSource.java
##########
@@ -114,16 +117,16 @@ private void validateLookupConfigurations() {
 			Duration monitorInterval = configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL) == null
 					? DEFAULT_LOOKUP_MONITOR_INTERVAL
 					: configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL);
-			Preconditions.checkArgument(
-					monitorInterval.toMillis() >= DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-					String.format(
-							"Currently the value of '%s' is required bigger or equal to default value '%s' " +
-									"when set '%s' to 'latest', but actual is '%s'",
-							STREAMING_SOURCE_MONITOR_INTERVAL.key(),
-							DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-							STREAMING_SOURCE_PARTITION_INCLUDE.key(),
-							monitorInterval.toMillis())
-			);
+
+			if (monitorInterval.toMillis() < DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis()) {
+				LOG.warn(String.format(
+					"Currently the recommended value of '%s' is bigger than default value '%s' " +

Review comment:
       > Perhaps we should worry more about how many tasks can concurrently access HMS, than how often they access.
   
   Maybe we need introduce a new mechanism the source can notify the all join subtask when to update in Flink SQL




----------------------------------------------------------------
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.

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



[GitHub] [flink] flinkbot commented on pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14310:
URL: https://github.com/apache/flink/pull/14310#issuecomment-738731861


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit cded2fcb5f10c8d6bdbfdece1c591fa658377f90 (Fri Dec 04 11:25:42 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
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.

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



[GitHub] [flink] lirui-apache commented on a change in pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
lirui-apache commented on a change in pull request #14310:
URL: https://github.com/apache/flink/pull/14310#discussion_r537199758



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveLookupTableSource.java
##########
@@ -114,16 +117,16 @@ private void validateLookupConfigurations() {
 			Duration monitorInterval = configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL) == null
 					? DEFAULT_LOOKUP_MONITOR_INTERVAL
 					: configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL);
-			Preconditions.checkArgument(
-					monitorInterval.toMillis() >= DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-					String.format(
-							"Currently the value of '%s' is required bigger or equal to default value '%s' " +
-									"when set '%s' to 'latest', but actual is '%s'",
-							STREAMING_SOURCE_MONITOR_INTERVAL.key(),
-							DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-							STREAMING_SOURCE_PARTITION_INCLUDE.key(),
-							monitorInterval.toMillis())
-			);
+
+			if (monitorInterval.toMillis() < DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis()) {
+				LOG.warn(String.format(
+					"Currently the recommended value of '%s' is bigger than default value '%s' " +

Review comment:
       I agree `1h` may be more popular than `30min` for partitioning. But just because more users use `1h` doesn't mean those using `30min` deserve a scary warning.
   
   When writing stream data into hive, we usually tell users that the minimum value supported for `sink.partition-commit.delay` is around `10min`. So I suppose the warning threshold here shouldn't be bigger than that. Because if users can commit new partitions every 10min, it's reasonable to assume they also want to monitor at roughly the same interval. WDYT?




----------------------------------------------------------------
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.

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



[GitHub] [flink] leonardBang commented on a change in pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #14310:
URL: https://github.com/apache/flink/pull/14310#discussion_r537276200



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveLookupTableSource.java
##########
@@ -114,16 +117,16 @@ private void validateLookupConfigurations() {
 			Duration monitorInterval = configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL) == null
 					? DEFAULT_LOOKUP_MONITOR_INTERVAL
 					: configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL);
-			Preconditions.checkArgument(
-					monitorInterval.toMillis() >= DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-					String.format(
-							"Currently the value of '%s' is required bigger or equal to default value '%s' " +
-									"when set '%s' to 'latest', but actual is '%s'",
-							STREAMING_SOURCE_MONITOR_INTERVAL.key(),
-							DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-							STREAMING_SOURCE_PARTITION_INCLUDE.key(),
-							monitorInterval.toMillis())
-			);
+
+			if (monitorInterval.toMillis() < DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis()) {
+				LOG.warn(String.format(
+					"Currently the recommended value of '%s' is bigger than default value '%s' " +

Review comment:
       @lirui-apache Nice suggestion, will update soon




----------------------------------------------------------------
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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14310:
URL: https://github.com/apache/flink/pull/14310#issuecomment-738741642


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cded2fcb5f10c8d6bdbfdece1c591fa658377f90",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10524",
       "triggerID" : "cded2fcb5f10c8d6bdbfdece1c591fa658377f90",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cded2fcb5f10c8d6bdbfdece1c591fa658377f90 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10524) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

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



[GitHub] [flink] leonardBang commented on pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
leonardBang commented on pull request #14310:
URL: https://github.com/apache/flink/pull/14310#issuecomment-739727317


   I've updated and Rebased


----------------------------------------------------------------
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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14310:
URL: https://github.com/apache/flink/pull/14310#issuecomment-738741642


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cded2fcb5f10c8d6bdbfdece1c591fa658377f90",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10524",
       "triggerID" : "cded2fcb5f10c8d6bdbfdece1c591fa658377f90",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9a8532f2384af5fab3b187902da54c32d05b713a",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10563",
       "triggerID" : "9a8532f2384af5fab3b187902da54c32d05b713a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9a8532f2384af5fab3b187902da54c32d05b713a Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10563) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

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



[GitHub] [flink] leonardBang commented on a change in pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #14310:
URL: https://github.com/apache/flink/pull/14310#discussion_r536190157



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveLookupTableSource.java
##########
@@ -114,16 +117,16 @@ private void validateLookupConfigurations() {
 			Duration monitorInterval = configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL) == null
 					? DEFAULT_LOOKUP_MONITOR_INTERVAL
 					: configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL);
-			Preconditions.checkArgument(
-					monitorInterval.toMillis() >= DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-					String.format(
-							"Currently the value of '%s' is required bigger or equal to default value '%s' " +
-									"when set '%s' to 'latest', but actual is '%s'",
-							STREAMING_SOURCE_MONITOR_INTERVAL.key(),
-							DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-							STREAMING_SOURCE_PARTITION_INCLUDE.key(),
-							monitorInterval.toMillis())
-			);
+
+			if (monitorInterval.toMillis() < DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis()) {
+				LOG.warn(String.format(
+					"Currently the recommended value of '%s' is bigger than default value '%s' " +

Review comment:
       The duration `1h` is an empirical value, compare to `30min`, hive partition that use hour is more common that hive partition use  half an hour.




----------------------------------------------------------------
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.

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



[GitHub] [flink] leonardBang commented on a change in pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #14310:
URL: https://github.com/apache/flink/pull/14310#discussion_r537222451



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveLookupTableSource.java
##########
@@ -114,16 +117,16 @@ private void validateLookupConfigurations() {
 			Duration monitorInterval = configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL) == null
 					? DEFAULT_LOOKUP_MONITOR_INTERVAL
 					: configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL);
-			Preconditions.checkArgument(
-					monitorInterval.toMillis() >= DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-					String.format(
-							"Currently the value of '%s' is required bigger or equal to default value '%s' " +
-									"when set '%s' to 'latest', but actual is '%s'",
-							STREAMING_SOURCE_MONITOR_INTERVAL.key(),
-							DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-							STREAMING_SOURCE_PARTITION_INCLUDE.key(),
-							monitorInterval.toMillis())
-			);
+
+			if (monitorInterval.toMillis() < DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis()) {
+				LOG.warn(String.format(
+					"Currently the recommended value of '%s' is bigger than default value '%s' " +

Review comment:
        >So I suppose the warning threshold here shouldn't be bigger than that.
   
   I totally agree that we should align the behaviour, but as the document reminded, but currently the look up hive parttiont implementation is visit metastore from every task and the  `hive-streaming source/sink` just visit metastore from one task. So, I'm worried about use same value is not a good choice from current situation. 
   




----------------------------------------------------------------
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.

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



[GitHub] [flink] leonardBang commented on a change in pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
leonardBang commented on a change in pull request #14310:
URL: https://github.com/apache/flink/pull/14310#discussion_r536190157



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveLookupTableSource.java
##########
@@ -114,16 +117,16 @@ private void validateLookupConfigurations() {
 			Duration monitorInterval = configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL) == null
 					? DEFAULT_LOOKUP_MONITOR_INTERVAL
 					: configuration.get(STREAMING_SOURCE_MONITOR_INTERVAL);
-			Preconditions.checkArgument(
-					monitorInterval.toMillis() >= DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-					String.format(
-							"Currently the value of '%s' is required bigger or equal to default value '%s' " +
-									"when set '%s' to 'latest', but actual is '%s'",
-							STREAMING_SOURCE_MONITOR_INTERVAL.key(),
-							DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis(),
-							STREAMING_SOURCE_PARTITION_INCLUDE.key(),
-							monitorInterval.toMillis())
-			);
+
+			if (monitorInterval.toMillis() < DEFAULT_LOOKUP_MONITOR_INTERVAL.toMillis()) {
+				LOG.warn(String.format(
+					"Currently the recommended value of '%s' is bigger than default value '%s' " +

Review comment:
       The duration `1h` is just an empirical value, compare to `30min`, hive partition that use hour is more common that hive partition use  half an hour.




----------------------------------------------------------------
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.

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



[GitHub] [flink] flinkbot commented on pull request #14310: [FLINK-20486][hive] Hive temporal join shouldn't require a minimal 1h monitor interval

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14310:
URL: https://github.com/apache/flink/pull/14310#issuecomment-738741642


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cded2fcb5f10c8d6bdbfdece1c591fa658377f90",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "cded2fcb5f10c8d6bdbfdece1c591fa658377f90",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cded2fcb5f10c8d6bdbfdece1c591fa658377f90 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

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