You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/07/24 01:48:13 UTC

[GitHub] [hudi] simonsssu opened a new pull request, #6200: [HUDI-3510] Add sync validate procedure

simonsssu opened a new pull request, #6200:
URL: https://github.com/apache/hudi/pull/6200

   ## *Tips*
   - *Thank you very much for contributing to Apache Hudi.*
   - *Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.*
   
   ## What is the purpose of the pull request
   
   *(For example: This pull request adds quick-start document.)*
   
   ## Brief change log
   
   *(for example:)*
     - *Modify AnnotationLocation checkstyle rule in checkstyle.xml*
   
   ## Verify this pull request
   
   *(Please pick either of the following options)*
   
   This pull request is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   *(example:)*
   
     - *Added integration tests for end-to-end.*
     - *Added HoodieClientWriteTest to verify the change.*
     - *Manually verified the change by running a job locally.*
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
   


-- 
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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #6200: [HUDI-3510] Add sync validate procedure

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on PR #6200:
URL: https://github.com/apache/hudi/pull/6200#issuecomment-1193337289

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ff58a8bebc2682536791274a3b2895f590645106",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10277",
       "triggerID" : "ff58a8bebc2682536791274a3b2895f590645106",
       "triggerType" : "PUSH"
     }, {
       "hash" : "dd1e2d2ae53c9ecb8333ae73b0a6d63f55393b86",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10283",
       "triggerID" : "dd1e2d2ae53c9ecb8333ae73b0a6d63f55393b86",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * dd1e2d2ae53c9ecb8333ae73b0a6d63f55393b86 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10283) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #6200: [HUDI-3510] Add sync validate procedure

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on PR #6200:
URL: https://github.com/apache/hudi/pull/6200#issuecomment-1193226799

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ff58a8bebc2682536791274a3b2895f590645106",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10277",
       "triggerID" : "ff58a8bebc2682536791274a3b2895f590645106",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ff58a8bebc2682536791274a3b2895f590645106 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10277) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #6200: [HUDI-3510] Add sync validate procedure

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on PR #6200:
URL: https://github.com/apache/hudi/pull/6200#issuecomment-1193234842

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ff58a8bebc2682536791274a3b2895f590645106",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10277",
       "triggerID" : "ff58a8bebc2682536791274a3b2895f590645106",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ff58a8bebc2682536791274a3b2895f590645106 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10277) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] XuQianJin-Stars commented on a diff in pull request #6200: [HUDI-3510] Add sync validate procedure

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars commented on code in PR #6200:
URL: https://github.com/apache/hudi/pull/6200#discussion_r928186977


##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/ValidateHoodieSyncProcedure.scala:
##########
@@ -0,0 +1,208 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.hudi.command.procedures
+
+import org.apache.hudi.common.model.HoodieCommitMetadata
+import org.apache.hudi.common.table.HoodieTableMetaClient
+import org.apache.hudi.common.table.timeline.{HoodieInstant, HoodieTimeline}
+import org.apache.spark.internal.Logging
+import org.apache.spark.sql.Row
+import org.apache.spark.sql.types.{DataTypes, Metadata, StructField, StructType}
+import org.joda.time.DateTime
+
+import java.io.IOException
+import java.sql.{Connection, DriverManager, ResultSet, SQLException}
+import java.util.function.Supplier
+
+import scala.collection.JavaConverters._
+
+class ValidateHoodieSyncProcedure extends BaseProcedure with ProcedureBuilder with Logging {
+
+  private val PARAMETERS = Array[ProcedureParameter](
+    ProcedureParameter.required(0, "srcTable", DataTypes.StringType, None),
+    ProcedureParameter.required(1, "dstTable", DataTypes.StringType, None),

Review Comment:
    `PARAMETERS` unify according to this [Call Procedure code style](https://github.com/apache/hudi/pull/6186).



-- 
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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #6200: [HUDI-3510] Add sync validate procedure

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on PR #6200:
URL: https://github.com/apache/hudi/pull/6200#issuecomment-1193314062

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ff58a8bebc2682536791274a3b2895f590645106",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10277",
       "triggerID" : "ff58a8bebc2682536791274a3b2895f590645106",
       "triggerType" : "PUSH"
     }, {
       "hash" : "dd1e2d2ae53c9ecb8333ae73b0a6d63f55393b86",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10283",
       "triggerID" : "dd1e2d2ae53c9ecb8333ae73b0a6d63f55393b86",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ff58a8bebc2682536791274a3b2895f590645106 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10277) 
   * dd1e2d2ae53c9ecb8333ae73b0a6d63f55393b86 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10283) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #6200: [HUDI-3510] Add sync validate procedure

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on PR #6200:
URL: https://github.com/apache/hudi/pull/6200#issuecomment-1193313275

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ff58a8bebc2682536791274a3b2895f590645106",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10277",
       "triggerID" : "ff58a8bebc2682536791274a3b2895f590645106",
       "triggerType" : "PUSH"
     }, {
       "hash" : "dd1e2d2ae53c9ecb8333ae73b0a6d63f55393b86",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "dd1e2d2ae53c9ecb8333ae73b0a6d63f55393b86",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ff58a8bebc2682536791274a3b2895f590645106 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10277) 
   * dd1e2d2ae53c9ecb8333ae73b0a6d63f55393b86 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #6200: [HUDI-3510] Add sync validate procedure

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on PR #6200:
URL: https://github.com/apache/hudi/pull/6200#issuecomment-1193226421

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

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


[GitHub] [hudi] XuQianJin-Stars merged pull request #6200: [HUDI-3510] Add sync validate procedure

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars merged PR #6200:
URL: https://github.com/apache/hudi/pull/6200


-- 
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: commits-unsubscribe@hudi.apache.org

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