@@ -204,7 +204,7 @@ object DataSourceWriteOptions {
val partitionColumns = optParams . get ( SparkDataSourceUtils . PARTITIONING_COLUMNS_KEY )
. map ( SparkDataSourceUtils . decodePartitioningColumns )
. getOrElse ( Nil )
val keyGeneratorClass = optParams . getOrElse ( DataSourceWriteOptions . KEYGENERATOR_CLASS . key ( ) ,
val keyGeneratorClass = optParams . getOrElse ( DataSourceWriteOptions . KEYGENERATOR_CLASS_NAME . key ( ) ,
DataSourceWriteOptions . DEFAULT_KEYGENERATOR_CLASS_OPT_VAL )
val partitionPathField =
@@ -244,7 +244,7 @@ object DataSourceWriteOptions {
* Payload class used. Override this, if you like to roll your own merge logic, when upserting / inserting.
* This will render any value set for `PRECOMBINE_FIELD_OPT_VAL` in-effective
*/
val PAYLOAD_CLASS = HoodieWriteConfig . WRITE_PAYLOAD_CLASS
val PAYLOAD_CLASS_NAME = HoodieWriteConfig . WRITE_PAYLOAD_CLASS_NAME
/* *
* Record key field. Value to be used as the `recordKey` component of `HoodieKey`. Actual value
@@ -267,7 +267,7 @@ object DataSourceWriteOptions {
*/
val HIVE_STYLE_PARTITIONING = KeyGeneratorOptions . HIVE_STYLE_PARTITIONING
val KEYGENERATOR_CLASS = ConfigProperty . key ( "hoodie.datasource.write.keygenerator.class" )
val KEYGENERATOR_CLASS_NAME = ConfigProperty . key ( "hoodie.datasource.write.keygenerator.class" )
. defaultValue ( classOf [ SimpleKeyGenerator ] . getName )
. withDocumentation ( "Key generator class, that implements `org.apache.hudi.keygen.KeyGenerator`" )
@@ -328,7 +328,7 @@ object DataSourceWriteOptions {
. withDocumentation ( "Config to indicate whether to ignore any non exception error (e.g. writestatus error)"
+ " within a streaming microbatch" )
val META_SYNC_CLIENT_TOOL_CLASS : ConfigProperty [ String ] = ConfigProperty
val META_SYNC_CLIENT_TOOL_CLASS_NAME : ConfigProperty [ String ] = ConfigProperty
. key ( "hoodie.meta.sync.client.tool.class" )
. defaultValue ( classOf [ HiveSyncTool ] . getName )
. withDocumentation ( "Sync tool class name used to sync to metastore. Defaults to Hive." )
@@ -403,7 +403,7 @@ object DataSourceWriteOptions {
. defaultValue ( "false" )
. withDocumentation ( "" )
/* @deprecated We should u se {@link HIVE_SYNC_MODE} instead of this config from 0.9.0 */
/* * @deprecated U se {@link HIVE_SYNC_MODE} instead of this config from 0.9.0 */
@Deprecated
val HIVE_USE_JDBC : ConfigProperty [ String ] = ConfigProperty
. key ( "hoodie.datasource.hive_sync.use_jdbc" )
@@ -421,12 +421,12 @@ object DataSourceWriteOptions {
. defaultValue ( "false" )
. withDocumentation ( "" )
val HIVE_SKIP_RO_SUFFIX : ConfigProperty [ String ] = ConfigProperty
val HIVE_SKIP_RO_SUFFIX_FOR_READ_OPTIMIZED_TABLE : ConfigProperty [ String ] = ConfigProperty
. key ( "hoodie.datasource.hive_sync.skip_ro_suffix" )
. defaultValue ( "false" )
. withDocumentation ( "Skip the _ro suffix for Read optimized table, when registering" )
val HIVE_SUPPORT_TIMESTAMP : ConfigProperty [ String ] = ConfigProperty
val HIVE_SUPPORT_TIMESTAMP_TYPE : ConfigProperty [ String ] = ConfigProperty
. key ( "hoodie.datasource.hive_sync.support_timestamp" )
. defaultValue ( "false" )
. withDocumentation ( "‘ INT64’ with original type TIMESTAMP_MICROS is converted to hive ‘ timestamp’ type. " +
@@ -514,9 +514,12 @@ object DataSourceWriteOptions {
/* * @deprecated Use {@link STREAMING_IGNORE_FAILED_BATCH} and its methods instead */
@Deprecated
val DEFAULT_STREAMING_IGNORE_FAILED_BATCH_OPT_VAL = STREAMING_IGNORE_FAILED_BATCH . defaultValue ( )
/* * @deprecated Use {@link META_SYNC_CLIENT_TOOL_CLASS} and its methods instead */
/* * @deprecated Use {@link META_SYNC_CLIENT_TOOL_CLASS_NAME } and its methods instead */
@Deprecated
val DEFAULT_ META_SYNC_CLIENT_TOOL_CLASS = META_SYNC_CLIENT_TOOL_CLASS. defaultValue ( )
val META_SYNC_CLIENT_TOOL_CLASS = META_SYNC_CLIENT_TOOL_CLASS_NAME . key ( )
/* * @deprecated Use {@link META_SYNC_CLIENT_TOOL_CLASS_NAME} and its methods instead */
@Deprecated
val DEFAULT_META_SYNC_CLIENT_TOOL_CLASS = META_SYNC_CLIENT_TOOL_CLASS_NAME . defaultValue ( )
/* * @deprecated Use {@link HIVE_SYNC_ENABLED} and its methods instead */
@Deprecated
val HIVE_SYNC_ENABLED_OPT_KEY = HIVE_SYNC_ENABLED . key ( )
@@ -550,10 +553,10 @@ object DataSourceWriteOptions {
/* * @deprecated Use {@link KEYGENERATOR_CLASS} and its methods instead */
@Deprecated
val DEFAULT_KEYGENERATOR_CLASS_OPT_VAL = KEYGENERATOR_CLASS . defaultValue ( )
val DEFAULT_KEYGENERATOR_CLASS_OPT_VAL = KEYGENERATOR_CLASS_NAME . defaultValue ( )
/* * @deprecated Use {@link KEYGENERATOR_CLASS} and its methods instead */
@Deprecated
val KEYGENERATOR_CLASS_OPT_KEY = HoodieWriteConfig . KEYGENERATOR_CLASS . key ( )
val KEYGENERATOR_CLASS_OPT_KEY = HoodieWriteConfig . KEYGENERATOR_CLASS_NAME . key ( )
/* * @deprecated Use {@link ENABLE_ROW_WRITER} and its methods instead */
@Deprecated
val ENABLE_ROW_WRITER_OPT_KEY = ENABLE_ROW_WRITER . key ( )
@@ -622,12 +625,12 @@ object DataSourceWriteOptions {
@Deprecated
val DEFAULT_PRECOMBINE_FIELD_OPT_VAL = PRECOMBINE_FIELD . defaultValue ( )
/* * @deprecated Use {@link HoodieWriteConfig.WRITE_PAYLOAD_CLASS} and its methods instead */
/* * @deprecated Use {@link HoodieWriteConfig.WRITE_PAYLOAD_CLASS_NAME } and its methods instead */
@Deprecated
val PAYLOAD_CLASS_OPT_KEY = HoodieWriteConfig . WRITE_PAYLOAD_CLASS . key ( )
/* * @deprecated Use {@link HoodieWriteConfig.WRITE_PAYLOAD_CLASS} and its methods instead */
val PAYLOAD_CLASS_OPT_KEY = HoodieWriteConfig . WRITE_PAYLOAD_CLASS_NAME . key ( )
/* * @deprecated Use {@link HoodieWriteConfig.WRITE_PAYLOAD_CLASS_NAME } and its methods instead */
@Deprecated
val DEFAULT_PAYLOAD_OPT_VAL = PAYLOAD_CLASS . defaultValue ( )
val DEFAULT_PAYLOAD_OPT_VAL = PAYLOAD_CLASS_NAME . defaultValue ( )
/* * @deprecated Use {@link TABLE_TYPE} and its methods instead */
@Deprecated
@@ -638,7 +641,7 @@ object DataSourceWriteOptions {
/* * @deprecated Use {@link TABLE_TYPE} and its methods instead */
@Deprecated
val STORAGE_TYPE_OPT = "hoodie.datasource.write.storage.type"
val STORAGE_TYPE_OPT_KEY = "hoodie.datasource.write.storage.type"
@Deprecated
val COW_STORAGE_TYPE_OPT_VAL = HoodieTableType . COPY_ON_WRITE . name
@Deprecated
@@ -698,12 +701,18 @@ object DataSourceWriteOptions {
/* * @deprecated Use {@link HIVE_IGNORE_EXCEPTIONS} and its methods instead */
@Deprecated
val DEFAULT_HIVE_IGNORE_EXCEPTIONS_OPT_KEY = HIVE_IGNORE_EXCEPTIONS . defaultValue ( )
/* * @deprecated Use {@link HIVE_SKIP_RO_SUFFIX} and its methods instead */
/* * @deprecated Use {@link HIVE_SKIP_RO_SUFFIX_FOR_READ_OPTIMIZED_TABLE } and its methods instead */
@Deprecated
val DEFAULT_ HIVE_SKIP_RO_SUFFIX_VAL = HIVE_SKIP_RO_SUFFIX. defaultValue ( )
/* * @deprecated Use {@link HIVE_SUPPORT_TIMESTAMP } and its methods instead */
val HIVE_SKIP_RO_SUFFIX = HIVE_SKIP_RO_SUFFIX_FOR_READ_OPTIMIZED_TABLE . key ( )
/* * @deprecated Use {@link HIVE_SKIP_RO_SUFFIX_FOR_READ_OPTIMIZED_TABLE } and its methods instead */
@Deprecated
val DEFAULT_HIVE_SUPPORT_TIMESTAMP = HIVE_SUPPORT_TIMESTAMP . defaultValue ( )
val DEFAULT_HIVE_SKIP_RO_SUFFIX_VAL = HIVE_SKIP_RO_SUFFIX_FOR_READ_OPTIMIZED_TABLE . defaultValue ( )
/* * @deprecated Use {@link HIVE_SUPPORT_TIMESTAMP_TYPE} and its methods instead */
@Deprecated
val HIVE_SUPPORT_TIMESTAMP = HIVE_SUPPORT_TIMESTAMP_TYPE . key ( )
/* * @deprecated Use {@link HIVE_SUPPORT_TIMESTAMP_TYPE} and its methods instead */
@Deprecated
val DEFAULT_HIVE_SUPPORT_TIMESTAMP = HIVE_SUPPORT_TIMESTAMP_TYPE . defaultValue ( )
/* * @deprecated Use {@link ASYNC_COMPACT_ENABLE} and its methods instead */
@Deprecated
val ASYNC_COMPACT_ENABLE_OPT_KEY = ASYNC_COMPACT_ENABLE . key ( )
@@ -713,6 +722,8 @@ object DataSourceWriteOptions {
/* * @deprecated Use {@link KAFKA_AVRO_VALUE_DESERIALIZER_CLASS} and its methods instead */
@Deprecated
val KAFKA_AVRO_VALUE_DESERIALIZER = KAFKA_AVRO_VALUE_DESERIALIZER_CLASS . key ( )
@Deprecated
val SCHEMA_PROVIDER_CLASS_PROP = "hoodie.deltastreamer.schemaprovider.class"
}
object DataSourceOptionsHelper {
@@ -723,13 +734,13 @@ object DataSourceOptionsHelper {
val allConfigsWithAlternatives = List (
DataSourceReadOptions . QUERY_TYPE ,
DataSourceWriteOptions . TABLE_TYPE ,
HoodieTableConfig . HOODIE_ BASE_FILE_FORMAT_PROP ,
HoodieTableConfig . HOODIE_ LOG_FILE_FORMAT_PROP
HoodieTableConfig . BASE_FILE_FORMAT ,
HoodieTableConfig . LOG_FILE_FORMAT
)
// put all the deprecated configs here
val allDeprecatedConfigs : Set [ String ] = Set (
ConsistencyGuardConfig . CONSISTENCY_CHECK_ENABLED_PROP . key
ConsistencyGuardConfig . ENABLE . key
)
// maps the deprecated config name to its latest name