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/04/03 04:09:21 UTC

[GitHub] [hudi] yihua opened a new pull request #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

yihua opened a new pull request #5217:
URL: https://github.com/apache/hudi/pull/5217


   ## What is the purpose of the pull request
   
   This PR addresses one minor comment in #5186:
   > Can we reuse HoodieTableMetadataUtil#deleteMetadataTable or refactor existing/add another method in util?
   
   ## Brief change log
   
     - Reuses HoodieTableMetadataUtil#deleteMetadataTable when deleting metadata table in `HoodieTable`
   
   ## Verify this pull request
   
   This pull request is a trivial rework / code cleanup without any test coverage.
   
   ## 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] zhangyue19921010 commented on a change in pull request #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

Posted by GitBox <gi...@apache.org>.
zhangyue19921010 commented on a change in pull request #5217:
URL: https://github.com/apache/hudi/pull/5217#discussion_r841173234



##########
File path: hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java
##########
@@ -210,12 +212,15 @@
    * @param context  instance of {@link HoodieEngineContext}.
    */
   public static void deleteMetadataTable(String basePath, HoodieEngineContext context) {
-    final String metadataTablePath = HoodieTableMetadata.getMetadataTableBasePath(basePath);
-    FileSystem fs = FSUtils.getFs(metadataTablePath, context.getHadoopConf().get());
+    final String metadataTablePathStr = HoodieTableMetadata.getMetadataTableBasePath(basePath);
+    FileSystem fs = FSUtils.getFs(metadataTablePathStr, context.getHadoopConf().get());
     try {
-      fs.delete(new Path(metadataTablePath), true);
+      Path metadataTablePath = new Path(metadataTablePathStr);
+      if (fs.exists(metadataTablePath)) {
+        fs.delete(metadataTablePath, true);

Review comment:
       nit: do we need to add a log info here, logging when and where we deleted the whole MDT.
   Maybe it's useful for users to debug.




-- 
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 removed a comment on pull request #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #5217:
URL: https://github.com/apache/hudi/pull/5217#issuecomment-1086773233


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775",
       "triggerID" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56cc4b88b8cdcd5661976e0c564702e586919577 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775) 
   
   <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 #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775",
       "triggerID" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56cc4b88b8cdcd5661976e0c564702e586919577 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775) 
   
   <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 #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775",
       "triggerID" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56cc4b88b8cdcd5661976e0c564702e586919577 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775) 
   
   <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 removed a comment on pull request #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #5217:
URL: https://github.com/apache/hudi/pull/5217#issuecomment-1086788964


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56cc4b88b8cdcd5661976e0c564702e586919577 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 #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775",
       "triggerID" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56cc4b88b8cdcd5661976e0c564702e586919577 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775) 
   
   <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 removed a comment on pull request #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #5217:
URL: https://github.com/apache/hudi/pull/5217#issuecomment-1086780121


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775",
       "triggerID" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56cc4b88b8cdcd5661976e0c564702e586919577 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775) 
   
   <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 #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775",
       "triggerID" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56cc4b88b8cdcd5661976e0c564702e586919577 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775) 
   
   <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 #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56cc4b88b8cdcd5661976e0c564702e586919577 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 removed a comment on pull request #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #5217:
URL: https://github.com/apache/hudi/pull/5217#issuecomment-1086772902


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56cc4b88b8cdcd5661976e0c564702e586919577 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 #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56cc4b88b8cdcd5661976e0c564702e586919577 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 removed a comment on pull request #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #5217:
URL: https://github.com/apache/hudi/pull/5217#issuecomment-1086789343


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775",
       "triggerID" : "56cc4b88b8cdcd5661976e0c564702e586919577",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56cc4b88b8cdcd5661976e0c564702e586919577 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=7775) 
   
   <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] codope merged pull request #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

Posted by GitBox <gi...@apache.org>.
codope merged pull request #5217:
URL: https://github.com/apache/hudi/pull/5217


   


-- 
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] zhangyue19921010 commented on a change in pull request #5217: [MINOR] Reuse deleteMetadataTable for disabling metadata table

Posted by GitBox <gi...@apache.org>.
zhangyue19921010 commented on a change in pull request #5217:
URL: https://github.com/apache/hudi/pull/5217#discussion_r841173234



##########
File path: hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java
##########
@@ -210,12 +212,15 @@
    * @param context  instance of {@link HoodieEngineContext}.
    */
   public static void deleteMetadataTable(String basePath, HoodieEngineContext context) {
-    final String metadataTablePath = HoodieTableMetadata.getMetadataTableBasePath(basePath);
-    FileSystem fs = FSUtils.getFs(metadataTablePath, context.getHadoopConf().get());
+    final String metadataTablePathStr = HoodieTableMetadata.getMetadataTableBasePath(basePath);
+    FileSystem fs = FSUtils.getFs(metadataTablePathStr, context.getHadoopConf().get());
     try {
-      fs.delete(new Path(metadataTablePath), true);
+      Path metadataTablePath = new Path(metadataTablePathStr);
+      if (fs.exists(metadataTablePath)) {
+        fs.delete(metadataTablePath, true);

Review comment:
       nit: do we need to add a log info here, logging when and where we deleted the whole MDT.




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