高级设置参数

  • 高级设置参数

    高级设置参数

  • 常用作业参数 | 属性 | | 默认值 | 说明 | 支持版本 | | —- | —- | —- | —- | —- | | ndi.show-argument | boolean | FALSE | 日志中打印作业配置。 | 1.0.0+ | | ndi.spark.spark-argument.executor-memory | | 调度节点Spark client使用的值,具体值请咨询技术支持 | 作业运行时,单个节点使用的内存,单位为g。 | 1.0.0+ | | ndi.spark.spark-conf.spark.sql.hive.convertMetastoreParquet | boolean值 | TRUE | 值为false时,将使用读写hive表时使用hive的serde。官方参考文档 | 1.0.0+ | | ndi.enableColumnQuote | boolean值 | | 默认false。部分表在创建时列名使用了数据库关键字或特殊符号,在作业运行过程中,会报语法错误。如果表中使用了数据库关键字可以将该值设置为true,会根据来源库类型给列名添加引号 | 1.8.3+ | | ndi.spark.spark-conf.spark.sql.parquet.compression.codec | none, uncompressed, snappy, gzip, lzo, brotli, lz4, zstd | snappy | 写入parquet文件时使用的压缩编码。
    当Hive表为parquet时生效。
    Hive表属性中指定的压缩编码具有更高的优先级。官方参考文档 | 1.0.0+ | | ndi.spark.spark-conf.spark.sql.parquet.writeLegacyFormat | boolean值 | FALSE | 写入parquet文件使用的格式。
    当设置为true时,会兼容hive和impala使用的parquet格式。
    当值为false时,可能会导致写入hive后,在查询时报错。官方参考文档 | 1.0.0+ | | ndi.spark.spark-conf.spark.task.maxFailures | | 4 | Task重启次数超过spark.task.maxFailures,则taskSet会失败,即一个stage失败。stage失败导致整个Job就失败了,spark会取消该stage对应的job包含的所有 task,并返回用户任务执行失败。 | 1.0.0+ | | ndi.spark.spark-conf.spark.stage.maxConsecutiveAttempts | | 4 | 在一个stage被中止之前,允许的连续stage重试的次数。 | 1.0.0+ | | ndi.spark.spark-conf.spark.yarn.max.executor.failures | | | 作业重试次数。不支持幂等写入的数据源会在重试时会导致数据重复。 | 1.0.0+ | | ndi.spark.spark-conf.spark.yarn.maxAppAttempts | int值 | yarn.resourcemanager.am.max-attempts的值 | 默认为yarn.resourcemanager.am.max-attempts的值,如果要设置,需小于它的值。
    yarn.resourcemanager.am.max-attempts:默认为2。 | 1.0.0+ | | ndi.spark.spark-conf.spark.hadoop.hive.exec.max.dynamic.partitions | | | hive动态分区的最大分区数。默认值为hive-site.xml中的配置。 | 1.8.0+ | | ndi.analyzeTableStatistics | boolean值 | FALSE | 是否计算hive的统计信息写入到metastore。 | 1.8.3+ | | ndi.spark.spark-conf.XXX | | | XXX为Spark_2.3.2支持的配置项。 | 1.0.0+ | | ndi.spark.spark-argument.YYY | | | YYY为spark-submit脚本支持的argument。ddb的读写任务会使用该参数上传认证文件,如果需要在ddb任务使用该files时,请联系技术支持。 | |

  • 数据来源端参数 | 数据源类型 | 属性 | | 默认值 | 说明 | 支持版本 | | —- | —- | —- | —- | —- | —- | | 关系型数据库
    (MySQL, DDB(DBI), DDB(QS), Oracle, 达梦, PostgreSQL, SQLServer, HANA, TiDB, DB2) | source.urlSuffix | 数据源支持的jdbc属性值 | | jdbc属性后缀。任务运行时该属性会追加在登记的jdbc url上。 | 1.0.0+ | | | source.enableColumnQuote | true, false | false | 是否开启列引用。表的字段名使用关键字时会导致任务报错,开启此选项,会在字段名上添加引号。 | 1.8.0+ | | | source.partitionSize | | 1024m | 分区大小。默认1024m,用于计算分区数和是否切分时使用。
    当information_schema.tables表中的DATA_LENGTH字段的值大于partitionSize的bytes值时,自动开启切分。 | 1.0.0+ | | | source.mustSplit | true, false | false | 是否开启切分。设置并行度大于1时,自动开启切分。 | 1.0.0+ | | | source.splitNum | int值 | snappy | 切分数,默认为切分字段的最大值和最小值的差值除以splitSize的值。 | 1.0.0+ | | | source.splitSize | long值 | 1000000 | 切分步长(默认1000000)。 | 1.0.0+ | | | source.maxSplitNum | int值 | 10000 | 最大切分数(默认10000)。 | 1.0.0+ | | | source.forbiddenSplit | true, false | false | 是否禁用切分。 | 1.8.3+ | | | source.fetchSize | int值 | 1000 | JDBC默认每执行一次检索,会从游标中提取的记录数。 | 1.0.0+ | | Doris | source.doris.request.retries | | 3 | 向Doris发送请求的重试次数 | 1.8.0+ | | | source.doris.request.connect.timeout.ms | | 30000 | 向Doris发送请求的连接超时时间。 | | | | source.doris.request.read.timeout.ms | | 30000 | 向Doris发送请求的读取超时时间。 | | | | source.doris.request.query.timeout.s | | 3600 | 查询Doris的超时时间,默认值为1小时,-1表示无超时限制。 | | | | source.doris.request.tablet.size | | integer.MAX_VALUE | 一个RDD Partition对应的Doris Tablet个数。
    此数值设置越小,则会生成越多的Partition。从而提升Spark侧的并行度,但同时会对Doris造成更大的压力。 | | | | source.doris.batch.size | | 1024 | 一次从BE读取数据的最大行数。增大此数值可减少Spark与Doris之间建立连接的次数。
    从而减轻网络延迟所带来的的额外时间开销。 | | | | source.doris.exec.mem.limit | | 2147483648 | 单个查询的内存限制。默认为 2GB,单位为字节。 | | | | source.doris.deserialize.arrow.async | | false | 是否支持异步转换Arrow格式到spark-doris-connector迭代所需的RowBatch。 | | | | source.doris.deserialize.queue.size | | 64 | 异步转换Arrow格式的内部处理队列,当doris.deserialize.arrow.async为true时生效。 | | | MongoDB | source.spark.mongodb.input.batchSize | | | 每次检索时,会从游标中读取的行数。 | 1.5.0+ | | | 更多参数 | | | 更多参数请参考官方文档
    。 | 1.5.0+ | | Elasticsearch | source.es.read.field.as.array.include | | | array类型的字段名,多个字段之间使用英文逗号分隔。 | 1.5.0+ | | | 更多参数 | | | 更多参数请参考官方文档
    。 | 1.5.0+ |

  • 数据去向端参数 | 数据源类型 | 属性 | | 默认值 | 说明 | 支持版本 | | —- | —- | —- | —- | —- | —- | | 关系型数据库
    (MySQL, DDB(DBI), DDB(QS), Oracle, 达梦, PostgreSQL, SQLServer, HANA, TiDB, DB2) | target.urlSuffix | 数据源支持的jdbc属性值 | | jdbc属性后缀。任务运行时该属性会追加在登记的jdbc url上。 | 1.0.0+ | | | target.batchSize | int值 | 1000 | 批量写入的条数。 | 1.0.0+ | | Doris | target.batchSize | int值 | 1000 | 批量写入的条数。 | 1.7.5+ | | HBase | target.conf.hadoop.hbase.fs.tmp.dir | 具有写权限的HDFS目录 | “/user/“ + System.getProperty(“user.name”) + “/hbase-staging” | bulkload使用的临时目录。 | 1.5.0+ | | | target.fileNumber | | | buldload写入时的重分区个数。 | 1.5.0+ | | FTP | target.fileMerge | true,false | true | 是否对文件进行合并。 | 1.8.3+ | | | target.fileMergeNum | int值 | 1 | 合并后的文件数量。 | 1.8.3+ | | Vertica | target.handlingOptions.i | | | 支持Vertica官方Copy Parameters文档中Handling Options和Parser-Specific Options包含的参数,i为属性添加的顺序,从0开始递增。
    示例:target.handlingOptions.0=NO ESCAPE | | | | target.columnOptions.i | | | 支持Vertica官方Copy Parameters文档中Column OPTION包含的参数,可以指定列的属性,i为属性添加的顺序,从0开始递增。
    示例:target.columnOptions.0=id NULL ‘xxx’ | |