Commit 19bfe50e authored by gongzijian's avatar gongzijian
Browse files

Merge remote-tracking branch 'upstream/dev-20190415' into dev-20190415

parents 05ba84e6 d6c707d0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ install.sh : 一键部署脚本
    
    `sudo chown -R deployUser:deployUser escheduler-backend`

- 修改conf/env/目录下的`escheduler_env.py` `.escheduler_env.sh` 两个文件中的环境变量
- 修改conf/env/目录下的 `.escheduler_env.sh` 环境变量

- 修改部署参数(根据自己服务器及业务情况):

@@ -136,7 +136,7 @@ install.sh : 一键部署脚本

### 2.2 编译源码来部署

将源码包release版本1.0.1下载后,解压进入根目录
将源码包release版本1.0.2下载后,解压进入根目录

* 执行编译命令:

+20 −22
Original line number Diff line number Diff line
@@ -34,26 +34,19 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HttpClientTest {

    private static final Logger logger = LoggerFactory.getLogger(HttpClientTest.class);

    public static void main(String[] args) throws Exception {
//        doGETParamPathVariableAndChinese();
//        doGETParam();
//        doPOSTParam();

        String md5 = EncryptionUtils.getMd5(String.valueOf(System.currentTimeMillis()) + "张三");
        System.out.println(md5);
        System.out.println(md5.length());
    }

    public static void doPOSTParam()throws Exception{
        // create Httpclient
    @Test
    public  void doPOSTParam()throws Exception{
        // create HttpClient
        CloseableHttpClient httpclient = HttpClients.createDefault();
        // 创建http POST请求

        // create http post request
        HttpPost httpPost = new HttpPost("http://127.0.0.1:12345/escheduler/projects/create");
        httpPost.setHeader("token", "123");
        // set parameters
@@ -83,10 +76,11 @@ public class HttpClientTest {
    }

    /**
     *
     * do get param path variables chinese
     * @throws Exception
     */
    public static void doGETParamPathVariableAndChinese()throws Exception{
    @Test
    public  void doGETParamPathVariableAndChinese()throws Exception{
        // create HttpClient
        CloseableHttpClient httpclient = HttpClients.createDefault();

@@ -94,12 +88,12 @@ public class HttpClientTest {
       // parameters.add(new BasicNameValuePair("pageSize", "10"));

        // define the parameters of the request
        URI uri = new URIBuilder("http://127.0.0.1:12345/escheduler/projects/%E5%85%A8%E9%83%A8%E6%B5%81%E7%A8%8B%E6%B5%8B%E8%AF%95/process/list")
        URI uri = new URIBuilder("http://192.168.220.247:12345/escheduler/projects/%E5%85%A8%E9%83%A8%E6%B5%81%E7%A8%8B%E6%B5%8B%E8%AF%95/process/list")
                .build();

        // create http GET request
        HttpGet httpGet = new HttpGet(uri);
        httpGet.setHeader("token","123");
        httpGet.setHeader("token","10f5625a2a1cbf9aa710653796c5d764");
        //response object
        CloseableHttpResponse response = null;
        try {
@@ -122,23 +116,27 @@ public class HttpClientTest {

    /**
     *
     * do get param
     * @throws Exception
     */
    public static void doGETParam()throws Exception{
    @Test
    public  void doGETParam()throws Exception{
        // create HttpClient
        CloseableHttpClient httpclient = HttpClients.createDefault();

        List<NameValuePair> parameters = new ArrayList<NameValuePair>();
        parameters.add(new BasicNameValuePair("processInstanceId", "41415"));
        parameters.add(new BasicNameValuePair("startDate", "2018-04-22 19:30:08"));
        parameters.add(new BasicNameValuePair("endDate", "2028-04-22 19:30:08"));
        parameters.add(new BasicNameValuePair("projectId", "0"));

        // define the parameters of the request
        URI uri = new URIBuilder("http://127.0.0.1:12345/escheduler/projects/%E5%85%A8%E9%83%A8%E6%B5%81%E7%A8%8B%E6%B5%8B%E8%AF%95/instance/view-variables")
        URI uri = new URIBuilder("http://192.168.220.247:12345/escheduler/projects/analysis/queue-count")
                 .setParameters(parameters)
                .build();

        // create http GET request
        HttpGet httpGet = new HttpGet(uri);
        httpGet.setHeader("token","123");
        httpGet.setHeader("token","2aef24c052c212fab9eec78848c2258b");
        //response object
        CloseableHttpResponse response = null;
        try {
+0 −4
Original line number Diff line number Diff line
@@ -123,9 +123,6 @@ execPath="/tmp/escheduler/exec"
# SHELL环境变量路径
shellEnvPath="$installPath/conf/env/.escheduler_env.sh"

# Python换将变量路径
pythonEnvPath="$installPath/conf/env/escheduler_env.py"

# 资源文件的后缀
resSuffixs="txt,log,sh,conf,cfg,py,java,sql,hql,xml"

@@ -249,7 +246,6 @@ sed -i ${txt} "s#process.exec.basepath.*#process.exec.basepath=${execPath}#g" co
sed -i ${txt} "s#data.store2hdfs.basepath.*#data.store2hdfs.basepath=${hdfsPath}#g" conf/common/common.properties
sed -i ${txt} "s#hdfs.startup.state.*#hdfs.startup.state=${hdfsStartupSate}#g" conf/common/common.properties
sed -i ${txt} "s#escheduler.env.path.*#escheduler.env.path=${shellEnvPath}#g" conf/common/common.properties
sed -i ${txt} "s#escheduler.env.py.*#escheduler.env.py=${pythonEnvPath}#g" conf/common/common.properties
sed -i ${txt} "s#resource.view.suffixs.*#resource.view.suffixs=${resSuffixs}#g" conf/common/common.properties
sed -i ${txt} "s#development.state.*#development.state=${devState}#g" conf/common/common.properties

+0 −21
Original line number Diff line number Diff line
@@ -182,27 +182,6 @@ delimiter ;
CALL ac_escheduler_T_t_escheduler_schedules_C_worker_group_id;
DROP PROCEDURE ac_escheduler_T_t_escheduler_schedules_C_worker_group_id;

-- ac_escheduler_T_t_escheduler_process_instance_C_worker_group_id
drop PROCEDURE if EXISTS ac_escheduler_T_t_escheduler_process_instance_C_worker_group_id;
delimiter d//
CREATE PROCEDURE ac_escheduler_T_t_escheduler_process_instance_C_worker_group_id()
   BEGIN
       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
           WHERE TABLE_NAME='t_escheduler_process_instance'
           AND TABLE_SCHEMA=(SELECT DATABASE())
           AND COLUMN_NAME='worker_group_id')
   THEN
         ALTER TABLE t_escheduler_process_instance ADD COLUMN `worker_group_id` int(11) NULL DEFAULT -1 COMMENT '任务指定运行的worker分组' AFTER `process_instance_priority`;
       END IF;
 END;

d//

delimiter ;
CALL ac_escheduler_T_t_escheduler_process_instance_C_worker_group_id;
DROP PROCEDURE ac_escheduler_T_t_escheduler_process_instance_C_worker_group_id;

-- ac_escheduler_T_t_escheduler_process_instance_C_timeout
drop PROCEDURE if EXISTS ac_escheduler_T_t_escheduler_process_instance_C_timeout;
delimiter d//
+1 −1

File changed.

Contains only whitespace changes.