You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "yihua (via GitHub)" <gi...@apache.org> on 2024/04/25 07:47:41 UTC

[PR] [HUDI-7666] Fix serializable implementation of StorageConfiguration class [hudi]

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

   ### Change Logs
   
   This PR fixes the bug that subclasses implementing `StorageConfiguration` cannot be properly (de)serialized in Spark.  The root cause is that the `#writeObject(ObjectOutputStream out)` and `#readObject(ObjectInputStream in)` for `Serializable` have to be `private`; they cannot be `public` or `protected`.  A new test is added, which fails without the fix and passes with the fix.
   
   ### Impact
   
   Bug fix.
   
   ### Risk level
   
   none
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


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


Re: [PR] [HUDI-7666] Fix serializable implementation of StorageConfiguration class [hudi]

Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on code in PR #11091:
URL: https://github.com/apache/hudi/pull/11091#discussion_r1579717332


##########
hudi-hadoop-common/src/main/java/org/apache/hudi/storage/hadoop/HadoopStorageConfiguration.java:
##########
@@ -66,18 +67,6 @@ public Configuration newCopy() {
     return new Configuration(configuration);
   }
 
-  @Override
-  public void writeObject(ObjectOutputStream out) throws IOException {
-    out.defaultWriteObject();
-    configuration.write(out);
-  }

Review Comment:
   We’ll remove `SerializableConfiguration`.



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


Re: [PR] [HUDI-7666] Fix serializable implementation of StorageConfiguration class [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11091:
URL: https://github.com/apache/hudi/pull/11091#issuecomment-2076668538

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


Re: [PR] [HUDI-7666] Fix serializable implementation of StorageConfiguration class [hudi]

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


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


Re: [PR] [HUDI-7666] Fix serializable implementation of StorageConfiguration class [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11091:
URL: https://github.com/apache/hudi/pull/11091#issuecomment-2076655352

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "eb6613bba0f7ce8a34f2bde66cc1b91bf946ad24",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "eb6613bba0f7ce8a34f2bde66cc1b91bf946ad24",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * eb6613bba0f7ce8a34f2bde66cc1b91bf946ad24 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


Re: [PR] [HUDI-7666] Fix serializable implementation of StorageConfiguration class [hudi]

Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on code in PR #11091:
URL: https://github.com/apache/hudi/pull/11091#discussion_r1579890188


##########
hudi-hadoop-common/src/main/java/org/apache/hudi/storage/hadoop/HadoopStorageConfiguration.java:
##########
@@ -66,18 +67,6 @@ public Configuration newCopy() {
     return new Configuration(configuration);
   }
 
-  @Override
-  public void writeObject(ObjectOutputStream out) throws IOException {
-    out.defaultWriteObject();
-    configuration.write(out);
-  }

Review Comment:
   i.e., `HadoopStorageConfiguration` replaces `SerializableConfiguration ` eventually.



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


Re: [PR] [HUDI-7666] Fix serializable implementation of StorageConfiguration class [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11091:
URL: https://github.com/apache/hudi/pull/11091#issuecomment-2076777682

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


Re: [PR] [HUDI-7666] Fix serializable implementation of StorageConfiguration class [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #11091:
URL: https://github.com/apache/hudi/pull/11091#discussion_r1579214790


##########
hudi-hadoop-common/src/main/java/org/apache/hudi/storage/hadoop/HadoopStorageConfiguration.java:
##########
@@ -66,18 +67,6 @@ public Configuration newCopy() {
     return new Configuration(configuration);
   }
 
-  @Override
-  public void writeObject(ObjectOutputStream out) throws IOException {
-    out.defaultWriteObject();
-    configuration.write(out);
-  }

Review Comment:
   We already have a `SerializableConfiguration`, does these two have similiar functionalities?



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