Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
jz-dmp-service
Commits
5bf4ed26
Commit
5bf4ed26
authored
Feb 09, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
27d738ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
23 deletions
+39
-23
OfflineSynchController.java
...es/controller/DataIntegration/OfflineSynchController.java
+4
-0
OfflineSynchServiceImpl.java
.../jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
+3
-1
lxTaskJson.json
src/main/resources/templates/lxTaskJson.json
+32
-22
No files found.
src/main/java/com/jz/dmp/modules/controller/DataIntegration/OfflineSynchController.java
View file @
5bf4ed26
package
com
.
jz
.
dmp
.
modules
.
controller
.
DataIntegration
;
package
com
.
jz
.
dmp
.
modules
.
controller
.
DataIntegration
;
import
com.amazonaws.services.xray.model.Http
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.page.BasePageBean
;
import
com.jz.common.page.BasePageBean
;
...
@@ -12,11 +13,13 @@ import io.swagger.annotations.ApiImplicitParam;
...
@@ -12,11 +13,13 @@ import io.swagger.annotations.ApiImplicitParam;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.HttpRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -293,4 +296,5 @@ public class OfflineSynchController {
...
@@ -293,4 +296,5 @@ public class OfflineSynchController {
JsonResult
list
=
offlineSynchService
.
addNewSynchTask
(
newSynchTaskReq
);
JsonResult
list
=
offlineSynchService
.
addNewSynchTask
(
newSynchTaskReq
);
return
list
;
return
list
;
}
}
}
}
src/main/java/com/jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
View file @
5bf4ed26
...
@@ -36,6 +36,7 @@ import org.springframework.data.redis.core.RedisTemplate;
...
@@ -36,6 +36,7 @@ import org.springframework.data.redis.core.RedisTemplate;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
springfox.documentation.spring.web.json.Json
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.File
;
import
java.io.File
;
...
@@ -674,7 +675,8 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -674,7 +675,8 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
}
}
}
}
//保存时提交XML
//保存时提交XML
return
dmpDevelopTaskService
.
submitSyncing
(
task
);
//dmpDevelopTaskService.submitSyncing(task);
return
JsonResult
.
ok
();
}
}
/**
/**
...
...
src/main/resources/templates/lxTaskJson.json
View file @
5bf4ed26
...
@@ -83,47 +83,47 @@
...
@@ -83,47 +83,47 @@
"params"
:
{
"params"
:
{
"version"
:
"1.0"
,
//版本
"version"
:
"1.0"
,
//版本
"treeId"
:
669
,
"treeId"
:
669
,
//
"parentId"
:
"509"
,
"mode"
:
"0"
,
"projectId"
:
"31"
,
"projectId"
:
"31"
,
"taskId"
:
""
,
//任务id
"taskId"
:
""
,
//任务id
"taskName"
:
"dmp_demo_dmp_azkaban_exector_server_config"
,
//任务名称
"taskName"
:
"dmp_demo_dmp_azkaban_exector_server_config"
,
//任务名称
"scripts"
:
{
"scripts"
:
{
"setting"
:
{
"setting"
:
{
"extract"
:
"incremental"
,
//增量/全量
//
"extract"
:
"incremental"
,
//增量/全量
"extractExpression"
:
"where 1=1"
,
//增量表达式
//
"extractExpression"
:
"where 1=1"
,
//增量表达式
,数据过滤
"targetInsertMergeOverwrite"
:
"insert"
,
//插入合并重写
//
"targetInsertMergeOverwrite"
:
"insert"
,
//插入合并重写
"ftColumn"
:
"分桶字段"
,
"ftColumn"
:
"分桶字段"
,
"ftCount"
:
"分桶个数"
,
"ftCount"
:
"分桶个数"
,
"separateMax"
:
"分桶字段最大值"
,
"separateMax"
:
"分桶字段最大值"
,
"separateMin"
:
"分桶字段最小值"
,
"separateMin"
:
"分桶字段最小值"
,
//
"primaryKey"
:
"主键"
,
//
"partition"
:
"分区"
,
"postImportStatement"
:
"导入后语句"
,
"preImportStatement"
:
"导入前语句"
,
"errorLimitRecord"
:
"错误记录数超过"
,
"errorLimitRecord"
:
"错误记录数超过"
,
"maxConcurrency"
:
"最大并发数"
,
"maxConcurrency"
:
"最大并发数"
,
//
"syncRate"
:
"同步速率"
,
"executorMemory"
:
"1"
,
//分配任务内存
"executorMemory"
:
"1"
,
//分配任务内存
"executorCores"
:
"1"
,
//单executor的cpu数
"driverMemory"
:
""
,
//分配任务内存
"totalExecutorCores"
:
"1"
,
//总executor的cpu数
"executorCore"
:
"1"
,
//单executor的cpu数
"driverCore"
:
"1"
,
//单executor的cpu数
"fieldMapping"
:
""
//字段映射关系
"fieldMapping"
:
""
//字段映射关系
},
},
"reader"
:
{
"reader"
:
{
"dbConnection"
:
"mysql_dmp_demo_test"
,
//来源名称
"dbConnection"
:
"mysql_dmp_demo_test"
,
//来源名称
"
fileType"
:
""
,
//文件类型
"
registerTableName"
:
"dmp_azkaban_exector_server_config"
,
"sourceHdfsPath"
:
""
,
//HDFS存储目录
"sourceHdfsPath"
:
""
,
//HDFS存储目录
"sourceHdfsFile"
:
""
,
"sourceHdfsFile"
:
""
,
"sourceFtpDir"
:
""
,
//文件所在目录
"sourceFtpDir"
:
""
,
//文件所在目录
"sourceFtpFile"
:
""
,
//文件名
"fileType"
:
""
,
//文件类型
"sourceSkipFtpFile"
:
""
,
//没有数据文件是否跳过
"sourceCsvDelimiter"
:
""
,
//分隔符
"sourceCsvDelimiter"
:
""
,
//分隔符
"sourceCsvHeader"
:
""
,
//是否含有表头
"sourceCsvCharset"
:
""
,
//字符集编码
"sourceCsvCharset"
:
""
,
//字符集编码
"sourceCsvHeader"
:
""
,
//是否含有表头
"null值"
:
""
,
"compressedFormat"
:
""
,
//压缩格式
"sourceFtpFile"
:
""
,
//文件名
"sourceSkipFtpFile"
:
""
,
//没有数据文件是否跳过
"sourceCsvQuote"
:
""
,
"sourceCsvQuote"
:
""
,
"sourceFtpLoadDate"
:
""
,
//加载数据日期
"sourceFtpLoadDate"
:
""
,
//加载数据日期
"registerTableName"
:
"dmp_azkaban_exector_server_config"
,
"dayByDay"
:
"false"
,
//day_by_day
"dayByDay"
:
"false"
,
//day_by_day
"syncopationKey"
:
""
,
//切分键
"extractExpression"
:
"1=1 and id=1"
,
//增量表达式
,数据过滤
"readHiveMethod "
:
""
,
//读取hive方法
"querySql"
:
""
,
//hive数据查询sql
"column"
:
[
"column"
:
[
{
{
"name"
:
"host"
,
"name"
:
"host"
,
...
@@ -146,12 +146,22 @@
...
@@ -146,12 +146,22 @@
"writer"
:
{
"writer"
:
{
"targetDbConnection"
:
"mysql_dmp_demo"
,
"targetDbConnection"
:
"mysql_dmp_demo"
,
"targetTable"
:
"dmp_azkaban_exector_server_config"
,
"targetTable"
:
"dmp_azkaban_exector_server_config"
,
"targetFtpDir"
:
""
,
"targetFtpDir"
:
""
,
//文件所在目录
"targetFtpFile"
:
""
,
"targetFtpFile"
:
""
,
//文件名称
"targetCsvDelimiter"
:
""
,
"targetCsvDelimiter"
:
""
,
//列分隔符
"targetCsvCharset"
:
""
,
//字符集编码
"fileType"
:
""
,
//文件类型
"datatimeFormat"
:
""
,
//时间格式
"null值"
:
""
,
//表示有null值得字符串
"prefixConflict"
:
""
,
//前缀冲突
"markCompletionFile"
:
""
,
//标记完成文件
"targetCsvHeader"
:
""
,
"targetCsvHeader"
:
""
,
"targetCsvCharset"
:
""
,
"postImportStatement"
:
""
,
//导入后语句
"targetInsertMergeOverwrite"
:
"insert"
,
"preImportStatement"
:
""
,
//导入前语句
"primaryKeyConflict"
:
""
,
//主键冲突
"partitionConflict"
:
""
,
//分区冲突
"writeMode"
:
""
,
//hive写入模式
"targetInsertMergeOverwrite"
:
"insert"
,
//数据插入方式
"column"
:
[
"column"
:
[
{
{
"name"
:
"host"
,
"name"
:
"host"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment