leesf commented on a change in pull request #995: [HUDI-253]: added validations 
for schema provider class
URL: https://github.com/apache/incubator-hudi/pull/995#discussion_r344445327
 
 

 ##########
 File path: 
hudi-utilities/src/test/java/org/apache/hudi/utilities/TestHoodieDeltaStreamer.java
 ##########
 @@ -428,7 +446,11 @@ public void 
testBulkInsertsAndUpsertsWithSQLBasedTransformerFor2StepPipeline() t
     TestHelpers.assertCommitMetadata("00000", datasetBasePath, dfs, 1);
 
     // with no change in upstream table, no change in downstream too when 
pulled.
-    new HoodieDeltaStreamer(downstreamCfg, jsc).sync();
+    try {
+      new HoodieDeltaStreamer(downstreamCfg, jsc).sync();
+    } catch (Exception e) {
+      log.error("expected error due to null schema provider!");
+    }
 
 Review comment:
   I think catch the exception here breaks the original intention of the 2 step 
pipeline, it should run normally with no new change pulled, also just catch 
exception here achieve the same goal that the exception will be thrown when 
schema provider is null with the following UT(testNullSchemaProvider). 
   I write the TestHoodieDeltaStreamer(mainly define a `DummySchemaProvider 
class ` to make the pipeline works normally and simplify the 
`makeConfigWithoutSchemaProvider` with `makeConfig` methods) in the 
[gist](https://gist.github.com/leesf/3da5439c242d0decae4b324838eb7f5d) which 
you would refer to. WDYT? @pratyakshsharma CC @vinothchandar 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to