Unverified Commit 4c90f04b authored by Tboy's avatar Tboy Committed by GitHub
Browse files

Merge pull request #2380 from qiaozhanwei/dev

refactor-worker merge to dev
parents 9dfc93e0 ff535e76
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ jobs:
        run: sh ./dockerfile/hooks/check
      - name: Prepare e2e env
        run: |
          sudo apt-get install -y libxss1 libappindicator1 libindicator7 xvfb unzip
          sudo apt-get install -y libxss1 libappindicator1 libindicator7 xvfb unzip libgbm1
          wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
          sudo dpkg -i google-chrome*.deb
          sudo apt-get install -f -y
+1 −0
Original line number Diff line number Diff line
@@ -147,3 +147,4 @@ dolphinscheduler-ui/dist/js/login/index.291b8e3.js.map
dolphinscheduler-ui/dist/lib/external/
/dolphinscheduler-dao/src/main/resources/dao/data_source.properties

!/zookeeper_data/
+12 −21
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ CREATE TABLE t_ds_alert (
  content text ,
  alert_type int DEFAULT NULL ,
  alert_status int DEFAULT '0' ,
  log text ,
  ·log· text ,
  alertgroup_id int DEFAULT NULL ,
  receivers text ,
  receivers_cc text ,
@@ -283,18 +283,6 @@ CREATE TABLE t_ds_error_command (
-- Table structure for table t_ds_master_server
--

DROP TABLE IF EXISTS t_ds_master_server;
CREATE TABLE t_ds_master_server (
  id int NOT NULL  ,
  host varchar(45) DEFAULT NULL ,
  port int DEFAULT NULL ,
  zk_directory varchar(64) DEFAULT NULL ,
  res_info varchar(256) DEFAULT NULL ,
  create_time timestamp DEFAULT NULL ,
  last_heartbeat_time timestamp DEFAULT NULL ,
  PRIMARY KEY (id)
) ;

--
-- Table structure for table t_ds_process_definition
--
@@ -319,6 +307,8 @@ CREATE TABLE t_ds_process_definition (
  timeout int DEFAULT '0' ,
  tenant_id int NOT NULL DEFAULT '-1' ,
  update_time timestamp DEFAULT NULL ,
  modify_by varchar(36) DEFAULT '' ,
  resource_ids varchar(64),
  PRIMARY KEY (id)
) ;

@@ -359,7 +349,7 @@ CREATE TABLE t_ds_process_instance (
  history_cmd text ,
  dependence_schedule_times text ,
  process_instance_priority int DEFAULT NULL ,
  worker_group_id int DEFAULT '-1' ,
  worker_group varchar(64) ,
  timeout int DEFAULT '0' ,
  tenant_id int NOT NULL DEFAULT '-1' ,
  PRIMARY KEY (id)
@@ -505,9 +495,12 @@ CREATE TABLE t_ds_resources (
  size bigint DEFAULT NULL ,
  create_time timestamp DEFAULT NULL ,
  update_time timestamp DEFAULT NULL ,
  pid int,
  full_name varchar(64),
  is_directory int,
  PRIMARY KEY (id)
) ;
;


--
-- Table structure for table t_ds_schedules
@@ -526,7 +519,7 @@ CREATE TABLE t_ds_schedules (
  warning_type int NOT NULL ,
  warning_group_id int DEFAULT NULL ,
  process_instance_priority int DEFAULT NULL ,
  worker_group_id int DEFAULT '-1' ,
  worker_group varchar(64),
  create_time timestamp NOT NULL ,
  update_time timestamp NOT NULL ,
  PRIMARY KEY (id)
@@ -572,7 +565,8 @@ CREATE TABLE t_ds_task_instance (
  retry_interval int DEFAULT NULL ,
  max_retry_times int DEFAULT NULL ,
  task_instance_priority int DEFAULT NULL ,
  worker_group_id int DEFAULT '-1' ,
   worker_group varchar(64),
  executor_id int DEFAULT NULL ,
  PRIMARY KEY (id)
) ;

@@ -691,9 +685,6 @@ ALTER TABLE t_ds_command ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_command_id_se
DROP SEQUENCE IF EXISTS t_ds_datasource_id_sequence;
CREATE SEQUENCE  t_ds_datasource_id_sequence;
ALTER TABLE t_ds_datasource ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_datasource_id_sequence');
DROP SEQUENCE IF EXISTS t_ds_master_server_id_sequence;
CREATE SEQUENCE  t_ds_master_server_id_sequence;
ALTER TABLE t_ds_master_server ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_master_server_id_sequence');
DROP SEQUENCE IF EXISTS t_ds_process_definition_id_sequence;
CREATE SEQUENCE  t_ds_process_definition_id_sequence;
ALTER TABLE t_ds_process_definition ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_process_definition_id_sequence');
@@ -768,4 +759,4 @@ INSERT INTO t_ds_relation_user_alertgroup(alertgroup_id,user_id,create_time,upda
INSERT INTO t_ds_queue(queue_name,queue,create_time,update_time) VALUES ('default', 'default','2018-11-29 10:22:33', '2018-11-29 10:22:33');

-- Records of t_ds_queue,default queue name : default
INSERT INTO t_ds_version(version) VALUES ('1.2.0');
 No newline at end of file
INSERT INTO t_ds_version(version) VALUES ('2.0.0');
 No newline at end of file
+79 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8" ?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!-- Logback configuration. See http://logback.qos.ch/manual/index.html -->
<configuration scan="true" scanPeriod="120 seconds">
    <property name="log.base" value="logs"/>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>
                [%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n
            </pattern>
            <charset>UTF-8</charset>
        </encoder>
    </appender>
    <appender name="TASKLOGFILE" class="ch.qos.logback.classic.sift.SiftingAppender">
        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
            <level>INFO</level>
        </filter>
        <filter class="org.apache.dolphinscheduler.server.log.TaskLogFilter"></filter>
        <Discriminator class="org.apache.dolphinscheduler.server.log.TaskLogDiscriminator">
            <key>taskAppId</key>
            <logBase>${log.base}</logBase>
        </Discriminator>
        <sift>
            <appender name="FILE-${taskAppId}" class="ch.qos.logback.core.FileAppender">
                <file>${log.base}/${taskAppId}.log</file>
                <encoder>
                    <pattern>
                        [%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n
                    </pattern>
                    <charset>UTF-8</charset>
                </encoder>
                <append>true</append>
            </appender>
        </sift>
    </appender>

    <appender name="WORKERLOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log.base}/dolphinscheduler-worker.log</file>
        <filter class="org.apache.dolphinscheduler.server.log.WorkerLogFilter">
            <level>INFO</level>
        </filter>

        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${log.base}/dolphinscheduler-worker.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern>
            <maxHistory>168</maxHistory>
            <maxFileSize>200MB</maxFileSize>
        </rollingPolicy>
             
        <encoder>
            <pattern>
                [%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n
            </pattern>
            <charset>UTF-8</charset>
        </encoder>
          
    </appender>


    <root level="INFO">
        <appender-ref ref="TASKLOGFILE"/>
        <appender-ref ref="WORKERLOGFILE"/>
    </root>
</configuration>
 No newline at end of file
+3 −3
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public class MailUtils {

    public static final Boolean MAIL_USE_SSL = PropertyUtils.getBoolean(Constants.MAIL_SMTP_SSL_ENABLE);

    public static final String XLS_FILE_PATH = PropertyUtils.getString(Constants.XLS_FILE_PATH);
    public static final String xlsFilePath = PropertyUtils.getString(Constants.XLS_FILE_PATH,"/tmp/xls");

    public static final String STARTTLS_ENABLE = PropertyUtils.getString(Constants.MAIL_SMTP_STARTTLS_ENABLE);

@@ -261,8 +261,8 @@ public class MailUtils {
        // set attach file
        MimeBodyPart part2 = new MimeBodyPart();
        // make excel file
        ExcelUtils.genExcelFile(content,title, XLS_FILE_PATH);
        File file = new File(XLS_FILE_PATH + Constants.SINGLE_SLASH +  title + Constants.EXCEL_SUFFIX_XLS);
        ExcelUtils.genExcelFile(content,title, xlsFilePath);
        File file = new File(xlsFilePath + Constants.SINGLE_SLASH +  title + Constants.EXCEL_SUFFIX_XLS);
        part2.attachFile(file);
        part2.setFileName(MimeUtility.encodeText(title + Constants.EXCEL_SUFFIX_XLS,Constants.UTF_8,"B"));
        // add components to collection
Loading