|
|
@@ -64,7 +64,8 @@ class _BaseDatax:
|
|
|
host: Optional[str],
|
|
|
use_random: bool,
|
|
|
parallel: bool,
|
|
|
- skip_datax: bool):
|
|
|
+ skip_datax: bool,
|
|
|
+ skip_check: bool):
|
|
|
is_rel_user = _is_release_user(self.release_user)
|
|
|
is_in_rel_dir = _is_in_release_dir(self.base_dir, self.release_root_dir, self.project_name)
|
|
|
|
|
|
@@ -91,6 +92,7 @@ class _BaseDatax:
|
|
|
base_dir=self.base_dir, python3_path=self.python3_path,
|
|
|
datax_home=self.datax_home,
|
|
|
skip_datax=skip_datax,
|
|
|
+ skip_check=skip_check,
|
|
|
stdout=fh, stderr=fh,
|
|
|
)
|
|
|
print('[datax] ini={j} done rc={rc}'.format(j=job_name, rc=rc))
|
|
|
@@ -102,6 +104,7 @@ class _BaseDatax:
|
|
|
base_dir=self.base_dir, python3_path=self.python3_path,
|
|
|
datax_home=self.datax_home,
|
|
|
skip_datax=skip_datax,
|
|
|
+ skip_check=skip_check,
|
|
|
tee_to=fh,
|
|
|
)
|
|
|
print('[datax] ini={j} done rc={rc}'.format(j=job_name, rc=rc))
|
|
|
@@ -125,6 +128,7 @@ class DataxImport(_BaseDatax):
|
|
|
parallel: bool = False,
|
|
|
skip_partition: bool = False,
|
|
|
skip_datax: bool = False,
|
|
|
+ skip_check: bool = False,
|
|
|
extra_partition_tables: Optional[List[str]] = None) -> int:
|
|
|
"""
|
|
|
Returns: 失败任务数(0 = 全部成功)
|
|
|
@@ -148,13 +152,13 @@ class DataxImport(_BaseDatax):
|
|
|
tbl=tbl, dt=dt))
|
|
|
partition.execute_ddls(ddls)
|
|
|
|
|
|
- run_one = self._make_run_one(start_date, stop_date, host, use_random, parallel, skip_datax)
|
|
|
+ run_one = self._make_run_one(start_date, stop_date, host, use_random, parallel, skip_datax, skip_check)
|
|
|
_success, failed = batch.run_batch(ini_list, run_one, parallel=parallel)
|
|
|
return failed
|
|
|
|
|
|
|
|
|
class DataxExport(_BaseDatax):
|
|
|
- """源=HDFS 导出(无分区预建;源路径存在性 check 沿用老脚本 check_data_exists 行为,暂未搬迁)。"""
|
|
|
+ """源=HDFS 导出(无分区预建)。HDFS 源存在性 check 默认开启,missing/empty → 失败;-skip-check 关闭后走老 silent skip。"""
|
|
|
|
|
|
def __init__(self, **kwargs):
|
|
|
super().__init__(log_module='datax', **kwargs)
|
|
|
@@ -167,7 +171,8 @@ class DataxExport(_BaseDatax):
|
|
|
host: Optional[str] = None,
|
|
|
use_random: bool = False,
|
|
|
parallel: bool = False,
|
|
|
- skip_datax: bool = False) -> int:
|
|
|
+ skip_datax: bool = False,
|
|
|
+ skip_check: bool = False) -> int:
|
|
|
"""
|
|
|
Returns: 失败任务数(0 = 全部成功)
|
|
|
"""
|
|
|
@@ -176,6 +181,6 @@ class DataxExport(_BaseDatax):
|
|
|
ini_list = batch.expand_ini_inputs(resolved_inis, resolved_dirs)
|
|
|
if not ini_list:
|
|
|
return 0
|
|
|
- run_one = self._make_run_one(start_date, stop_date, host, use_random, parallel, skip_datax)
|
|
|
+ run_one = self._make_run_one(start_date, stop_date, host, use_random, parallel, skip_datax, skip_check)
|
|
|
_success, failed = batch.run_batch(ini_list, run_one, parallel=parallel)
|
|
|
return failed
|