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

   ### Change Logs
   
   `ReflectionUtils.hasConstructor` throws warn log if the constructor does not 
exist, even in cases where it's expected, e.g., for `DataHubSyncTool` (see 
below), confusing users.  This PR improves the logging so that by default the 
debug-level logs are used.
   
   ```
   23/05/16 10:58:54 WARN ReflectionUtils: Unable to instantiate class 
org.apache.hudi.sync.datahub.DataHubSyncTool
   java.lang.NoSuchMethodException: 
org.apache.hudi.sync.datahub.DataHubSyncTool.<init>(java.util.Properties, 
org.apache.hadoop.conf.Configuration)
       at java.lang.Class.getConstructor0(Class.java:3082)
       at java.lang.Class.getConstructor(Class.java:1825)
       at 
org.apache.hudi.common.util.ReflectionUtils.hasConstructor(ReflectionUtils.java:95)
       at 
org.apache.hudi.sync.common.util.SyncUtilHelpers.instantiateMetaSyncTool(SyncUtilHelpers.java:83)
       at 
org.apache.hudi.sync.common.util.SyncUtilHelpers.runHoodieMetaSync(SyncUtilHelpers.java:58)
       at 
org.apache.hudi.utilities.deltastreamer.DeltaSync.runMetaSync(DeltaSync.java:808)
       at 
org.apache.hudi.utilities.deltastreamer.DeltaSync.writeToSink(DeltaSync.java:723)
       at 
org.apache.hudi.utilities.deltastreamer.DeltaSync.syncOnce(DeltaSync.java:395)
       at 
org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.lambda$sync$2(HoodieDeltaStreamer.java:215)
       at org.apache.hudi.common.util.Option.ifPresent(Option.java:97)
       at 
org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.sync(HoodieDeltaStreamer.java:213)
       at 
org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.main(HoodieDeltaStreamer.java:592)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at 
org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
       at 
org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:955)
       at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180)
       at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203)
       at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90)
       at 
org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1043)
       at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1052)
       at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
   ```
   ### Impact
   
   Improves logging to be user-friendly.
   
   ### Risk level
   
   none
   
   ### Documentation Update
   
   N/A
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to