diff --git a/web/lerna.json b/web/lerna.json new file mode 100644 index 0000000000..7e9ca0719f --- /dev/null +++ b/web/lerna.json @@ -0,0 +1,12 @@ +{ + "packages": [ + "packages/*" + ], + "command": { + "bootstrap": { + "hoist": true + } + }, + "npmClient": "npm", + "version": "1.1.6" +} diff --git "a/web/packages/dss/public/streamis/Streamis\346\265\201\345\274\217\345\272\224\347\224\250ZIP\345\214\205\344\270\212\344\274\240\346\240\274\345\274\217.txt" "b/web/packages/dss/public/streamis/Streamis\346\265\201\345\274\217\345\272\224\347\224\250ZIP\345\214\205\344\270\212\344\274\240\346\240\274\345\274\217.txt" new file mode 100644 index 0000000000..098bf44370 --- /dev/null +++ "b/web/packages/dss/public/streamis/Streamis\346\265\201\345\274\217\345\272\224\347\224\250ZIP\345\214\205\344\270\212\344\274\240\346\240\274\345\274\217.txt" @@ -0,0 +1,64 @@ +流式应用物料包是指的按照Streamis打包规范,将元数据信息(流式应用描述信息),流式应用代码,流式应用使用到的物料等内容打包成zip包。其具体格式如下: + +xxx.zip + ├── meta.json + ├── test.sql + ├── test.jar + ├── file3 + +其中,meta.json格式为: +{ + "projectName": "", # 项目名 + "jobName": "", # 作业名 + "jobType": "flink.sql", # 目前只支持flink.sql、flink.jar + "tags": "", # 应用标签 + "description": "" # 作业描述, + "jobContent": { + # 不同的jobType,其内容各不相同,具体请往下看 + } +} + +如果jobType为"flink.sql",则jobContent为: +{ + "type": "" # file, bml or sql + "sql": "select 1", + "file": "test.sql", + "resourceId": "", + "version": "" +} +其中,如果type为"file",则只识别file字段;如果type为"sql",则只识别sql字段;如果type为"bml",则只识别resourceId和version字段。 + + +如果jobType为"flink.jar",则jobContent为: + +{ + "main.class.jar": "", # string。main class的jar,如:test.jar + "main.class": "", # main class,如 com.webank.Test + "args": "", # main class 的入参,即main函数的args,请以空格为分隔符 + "hdfs.jars"; [], # 依赖的HDFS jars,如:hdfs:///user/enjoyyin/test1.jar + "dependency.jars": [], # 依赖的jars,如:test2.jar + "resources": [] # 依赖的资源文件,如:test.properties +} + + +也支持直接requestBody为JSON的方式创建新Job,或者是更新Job版本,requestBody格式跟meta.json一模一样,只是相关的文件是工程级别的文件。 + + +上传文件: +/api/rest_j/v1/streamis/project/files/upload +{ + "fileName": "", + "version": "", + "projectName": "", + "updateWhenExists": false +} +mutildata带上文件字节流 + +/api/rest_j/v1/streamis/project/files/list +/api/rest_j/v1/streamis/project/files/delete + +/api/rest_j/v1/streamis/job/upload +带上zip + +/api/rest_j/v1/streamis/job/createOrUpdate +requestBody为zip的meta.json \ No newline at end of file diff --git a/web/packages/dss/public/streamis/flinkJar.zip b/web/packages/dss/public/streamis/flinkJar.zip new file mode 100644 index 0000000000..80b64c836c Binary files /dev/null and b/web/packages/dss/public/streamis/flinkJar.zip differ