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 2022/01/07 03:37:56 UTC

[GitHub] [flink] BruceWong96 opened a new pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

BruceWong96 opened a new pull request #18293:
URL: https://github.com/apache/flink/pull/18293


   Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.
   
   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   When we synchronize data from mysql to HBase, we find that when deleting data from mysql, HBase cannot delete all versions, which leads to incorrect semantics. So we want to add a parameter to control deleting the latest version or deleting all versions.
   
   
   ## Brief change log
   
   - *Add “sink.delete.mode” in HBase sql connector property.*
   
   


-- 
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: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] flinkbot edited a comment on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ead78b4fb9331e7b89163879492f804dbb1df185",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29074",
       "triggerID" : "ead78b4fb9331e7b89163879492f804dbb1df185",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ead78b4fb9331e7b89163879492f804dbb1df185 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29074) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] BruceWong96 edited a comment on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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


   > Thanks for the contribution. The change should be working for your case and the code itself looks overall ok. It looks like you want to fix the HBase bug by adding work-around into the connector and I have following concerns:
   > 
   > 1. Extra customized config will be introduced to users which turns out that an internal bug effects users' behaviour.
   > 2. The HBaseConnectorOptions has been extended for specific process logic, beyond the neutral HBase Lookup Options, HBase Configuration Options, and Flink Operator Options. This smells like the start of the hacking.
   > 3. HBase should be the right one to control the versions. With the change of this PR, there are two roles who can do the same job, a SRP violation. It should be used very carefully to avoid data lost in the production. I could already imagine the situation where user would complain the unexpected data lost. I understood that the default deleteMode is trying to reduce such incident, thanks for considering about that, but it is now possible for e.g. human mistake on the SQL level to make the data lost happen and, once it happens, it is expensive in the production env.
   > 4. This change does not cover multiple CF scenario, since the scope of version has been changed/enlarged from CF to table. Modifying the deleteMode for one CF might end up with the data lost of another CF. if not modify it, it will still have the deletion issue for the related CF. This could be solved by splitting the table, which turns out again an internal bug effects users' behaviour. There will be extra effort to maintain two maybe even more tables that conceptually belong together and keep the data synched.
   > 5. Shotgun surgery - too many classes have been touched for building the work-around of simple functionality.
   > 6. Classes defined for common case got involved into specific deletion case, i.e. HBaseWriteOptions, HBaseMutationConverter, etc.
   > 
   > Looking forward to your thoughts.
   
   Thank you for your reply
   1. Users need to understand the usage of the custom configuration before using it.
   2. In change log mode, op= 'd' means deleting data, even before this PR.
   3. In change log mode, Flink SQL calls HBase Client to modify data, which does not violate the single responsibility principle. Flink SQL can also delete data before this PR. If the user selects' sink.delete.mode '=' all-versions', the data is not accidentally lost but deleted normally. Before the PR, only the last version is deleted.
   4. After the test, we found that the deleted CF was the CF specified in the Flink SQL DML statement, without affecting other CF. The specific test results can be found in JIRA.
   5. I think it is not a good way to avoid data loss without providing a correct way to delete data.
   
   What we need is that the HBase Connector can meet the requirements of adding, deleting, modifying and querying in the change log mode. It seems that the deletion is not perfect, which leads to incorrect data.
   
   Looking forward to your thoughts.


-- 
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: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] flinkbot edited a comment on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] flinkbot edited a comment on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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






-- 
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: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] BruceWong96 commented on a change in pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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



##########
File path: flink-connectors/flink-connector-hbase-base/src/main/java/org/apache/flink/connector/hbase/table/HBaseConnectorOptions.java
##########
@@ -87,6 +90,17 @@
                                     + "Can be set to '0' to disable it. Note, both 'sink.buffer-flush.max-size' and 'sink.buffer-flush.max-rows' "
                                     + "can be set to '0' with the flush interval set allowing for complete async processing of buffered actions.");
 
+    public static final ConfigOption<String> SINK_DELETE_MODE =
+            ConfigOptions.key("sink.delete.mode")
+                    .stringType()

Review comment:
       Thanks for your review. Because the available values contain '-' characters, the enum type is similar to 'XXX_XXX', so it needs to be converted. Please take a look [JsonFormatOptionsUtil.getTimestampFormat()](https://github.com/apache/flink/blob/master/flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonFormatOptionsUtil.java#L61).




-- 
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: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] BruceWong96 commented on a change in pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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



##########
File path: flink-connectors/flink-connector-hbase-base/src/main/java/org/apache/flink/connector/hbase/table/HBaseConnectorOptions.java
##########
@@ -87,6 +90,17 @@
                                     + "Can be set to '0' to disable it. Note, both 'sink.buffer-flush.max-size' and 'sink.buffer-flush.max-rows' "
                                     + "can be set to '0' with the flush interval set allowing for complete async processing of buffered actions.");
 
+    public static final ConfigOption<String> SINK_DELETE_MODE =
+            ConfigOptions.key("sink.delete.mode")
+                    .stringType()

Review comment:
       > Wouldn't it be better to use `enumType` here since the option is an enum? Then we can also improve the docs on the option by documenting the enum itself (which should be PublicEvolving), and avoid duplicating the entire thing as string constants.
   
   Thanks for your review. Because the available values contain '-' characters, the enum type is similar to 'XXX_XXX', so it needs to be converted. Please take a look JsonFormatOptionsUtil.getTimestampFormat().




-- 
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: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] Airblader commented on a change in pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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



##########
File path: flink-connectors/flink-connector-hbase-base/src/main/java/org/apache/flink/connector/hbase/table/HBaseConnectorOptions.java
##########
@@ -87,6 +90,17 @@
                                     + "Can be set to '0' to disable it. Note, both 'sink.buffer-flush.max-size' and 'sink.buffer-flush.max-rows' "
                                     + "can be set to '0' with the flush interval set allowing for complete async processing of buffered actions.");
 
+    public static final ConfigOption<String> SINK_DELETE_MODE =
+            ConfigOptions.key("sink.delete.mode")
+                    .stringType()

Review comment:
       Wouldn't it be better to use `enumType` here since the option is an enum? Then we can also improve the docs on the option by documenting the enum itself (which should be PublicEvolving), and avoid duplicating the entire thing as string constants.




-- 
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: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] flinkbot edited a comment on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ead78b4fb9331e7b89163879492f804dbb1df185",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29074",
       "triggerID" : "ead78b4fb9331e7b89163879492f804dbb1df185",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d7004a1d41618e403920420e06b2218ccadf8b56",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1007174456",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "",
       "status" : "CANCELED",
       "url" : "TBD",
       "triggerID" : "1007174456",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "d7004a1d41618e403920420e06b2218ccadf8b56",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d7004a1d41618e403920420e06b2218ccadf8b56",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   *  Unknown: [CANCELED](TBD) 
   * d7004a1d41618e403920420e06b2218ccadf8b56 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] BruceWong96 commented on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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


   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] flinkbot commented on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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


   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 ead78b4fb9331e7b89163879492f804dbb1df185 (Fri Jan 07 03:43:34 UTC 2022)
   
   **Warnings:**
    * **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-25560).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
   
   
   <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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] BruceWong96 edited a comment on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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






-- 
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: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] flinkbot edited a comment on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ead78b4fb9331e7b89163879492f804dbb1df185",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29074",
       "triggerID" : "ead78b4fb9331e7b89163879492f804dbb1df185",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d7004a1d41618e403920420e06b2218ccadf8b56",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29080",
       "triggerID" : "1007174456",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "d7004a1d41618e403920420e06b2218ccadf8b56",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29080",
       "triggerID" : "d7004a1d41618e403920420e06b2218ccadf8b56",
       "triggerType" : "PUSH"
     }, {
       "hash" : "",
       "status" : "DELETED",
       "url" : "TBD",
       "triggerID" : "1007174456",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * d7004a1d41618e403920420e06b2218ccadf8b56 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29080) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] flinkbot edited a comment on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ead78b4fb9331e7b89163879492f804dbb1df185",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29074",
       "triggerID" : "ead78b4fb9331e7b89163879492f804dbb1df185",
       "triggerType" : "PUSH"
     }, {
       "hash" : "",
       "status" : "CANCELED",
       "url" : "TBD",
       "triggerID" : "1007174456",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "d7004a1d41618e403920420e06b2218ccadf8b56",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29080",
       "triggerID" : "1007174456",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "d7004a1d41618e403920420e06b2218ccadf8b56",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29080",
       "triggerID" : "d7004a1d41618e403920420e06b2218ccadf8b56",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   *  Unknown: [CANCELED](TBD) 
   * d7004a1d41618e403920420e06b2218ccadf8b56 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=29080) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] BruceWong96 commented on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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


   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] BruceWong96 commented on a change in pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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



##########
File path: flink-connectors/flink-connector-hbase-base/src/main/java/org/apache/flink/connector/hbase/table/HBaseConnectorOptions.java
##########
@@ -87,6 +90,17 @@
                                     + "Can be set to '0' to disable it. Note, both 'sink.buffer-flush.max-size' and 'sink.buffer-flush.max-rows' "
                                     + "can be set to '0' with the flush interval set allowing for complete async processing of buffered actions.");
 
+    public static final ConfigOption<String> SINK_DELETE_MODE =
+            ConfigOptions.key("sink.delete.mode")
+                    .stringType()

Review comment:
       Thanks for your review. Because the available values contain '-' characters, the enum type is similar to 'XXX_XXX', so it needs to be converted. Please take a look [JsonFormatOptionsUtil.getTimestampFormat()](https://github.com/apache/flink/blob/master/flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonFormatOptionsUtil.java#L61)




-- 
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: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] flinkbot commented on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ead78b4fb9331e7b89163879492f804dbb1df185",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ead78b4fb9331e7b89163879492f804dbb1df185",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ead78b4fb9331e7b89163879492f804dbb1df185 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] BruceWong96 commented on pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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


   > Thanks for the contribution. The change should be working for your case and the code itself looks overall ok. It looks like you want to fix the HBase bug by adding work-around into the connector and I have following concerns:
   > 
   > 1. Extra customized config will be introduced to users which turns out that an internal bug effects users' behaviour.
   > 2. The HBaseConnectorOptions has been extended for specific process logic, beyond the neutral HBase Lookup Options, HBase Configuration Options, and Flink Operator Options. This smells like the start of the hacking.
   > 3. HBase should be the right one to control the versions. With the change of this PR, there are two roles who can do the same job, a SRP violation. It should be used very carefully to avoid data lost in the production. I could already imagine the situation where user would complain the unexpected data lost. I understood that the default deleteMode is trying to reduce such incident, thanks for considering about that, but it is now possible for e.g. human mistake on the SQL level to make the data lost happen and, once it happens, it is expensive in the production env.
   > 4. This change does not cover multiple CF scenario, since the scope of version has been changed/enlarged from CF to table. Modifying the deleteMode for one CF might end up with the data lost of another CF. if not modify it, it will still have the deletion issue for the related CF. This could be solved by splitting the table, which turns out again an internal bug effects users' behaviour. There will be extra effort to maintain two maybe even more tables that conceptually belong together and keep the data synched.
   > 5. Shotgun surgery - too many classes have been touched for building the work-around of simple functionality.
   > 6. Classes defined for common case got involved into specific deletion case, i.e. HBaseWriteOptions, HBaseMutationConverter, etc.
   > 
   > Looking forward to your thoughts.
   
   Thank you for your reply
   1. Understand the usage of the custom configuration before using it.
   2. In change log mode, op= 'd' means deleting data, even before this PR.
   3. In change log mode, Flink SQL calls HBase Client to modify data, which does not violate the single responsibility principle. Flink SQL can also delete data before this PR. If the user selects' sink.delete.mode '=' all-versions', the data is not accidentally lost but deleted normally. Before the PR, only the last version is deleted.
   4. After the test, we found that the deleted CF was the CF specified in the Flink SQL DML statement, without affecting other CF. The specific test results can be found in JIRA.
   5. I think it is not a good way to avoid data loss without providing a correct way to delete data.
   What we need is that the HBase Connector can meet the requirements of adding, deleting, modifying and querying in the change log mode. It seems that the deletion is not perfect, which leads to incorrect data.
   Looking forward to your thoughts.


-- 
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: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] Airblader commented on a change in pull request #18293: [FLINK-25560][Connectors/HBase] Add "sink.delete.mode" in HBase sql connector for retracting the latest version or all versions in changelog mode.

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



##########
File path: flink-connectors/flink-connector-hbase-base/src/main/java/org/apache/flink/connector/hbase/table/HBaseConnectorOptions.java
##########
@@ -87,6 +90,17 @@
                                     + "Can be set to '0' to disable it. Note, both 'sink.buffer-flush.max-size' and 'sink.buffer-flush.max-rows' "
                                     + "can be set to '0' with the flush interval set allowing for complete async processing of buffered actions.");
 
+    public static final ConfigOption<String> SINK_DELETE_MODE =
+            ConfigOptions.key("sink.delete.mode")
+                    .stringType()

Review comment:
       Wouldn't it be better to use `enumType` here since the option is an enum? Then we can also improve the docs on the option by documenting the enum itself (which should be PublicEvolving), and avoid duplicating the entire thing as string constants.




-- 
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: issues-unsubscribe@flink.apache.org

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