nsivabalan commented on code in PR #10014:
URL: https://github.com/apache/hudi/pull/10014#discussion_r1399548286
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala:
##########
@@ -263,14 +263,14 @@ class HoodieSparkSqlWriterInternal {
}
}
+ val keyGenerator = HoodieSparkKeyGeneratorFactory.createKeyGenerator(new
TypedProperties(hoodieConfig.getProps))
Review Comment:
we can't instantiate key gen in driver due to auto record key generation.
##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/util/SparkKeyGenUtils.scala:
##########
@@ -34,26 +34,26 @@ object SparkKeyGenUtils {
* @return partition columns
*/
def getPartitionColumns(props: TypedProperties): String = {
- val keyGeneratorClass = getKeyGeneratorClassName(props)
- getPartitionColumns(keyGeneratorClass, props)
+ val keyGenerator = HoodieSparkKeyGeneratorFactory.createKeyGenerator(props)
Review Comment:
we can't do this. For auto key geneator, the key gen has to be invoked from
within executor. can we avoid instantiating key gen class here
--
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]