Browse Source
* update english documents * refactor zk client * update documents * update zkclient * update zkclient * update documents * add architecture-design * change i18n * update i18n * update english documents * add architecture-design * update english documents * update en-US documents * add architecture-design * update demo site * add mybatis plus model * modify mybatisplus * modify mybatisplus * change interface by mybatispluspull/2/head
bao liang
5 years ago
committed by
lgcareer
235 changed files with 3270 additions and 10607 deletions
@ -1,77 +0,0 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
||||
package cn.escheduler.api.service; |
||||
|
||||
import cn.escheduler.api.enums.Status; |
||||
import cn.escheduler.api.utils.Constants; |
||||
import cn.escheduler.dao.mapper.MasterServerMapper; |
||||
import cn.escheduler.dao.mapper.WorkerServerMapper; |
||||
import cn.escheduler.common.model.MasterServer; |
||||
import cn.escheduler.dao.model.User; |
||||
import cn.escheduler.dao.model.WorkerServer; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* server service |
||||
*/ |
||||
@Service |
||||
public class ServerService extends BaseService{ |
||||
|
||||
|
||||
@Autowired |
||||
MasterServerMapper masterServerMapper; |
||||
|
||||
@Autowired |
||||
WorkerServerMapper workerServerMapper; |
||||
|
||||
/** |
||||
* query master list |
||||
* |
||||
* @param loginUser |
||||
* @return |
||||
*/ |
||||
public Map<String,Object> queryMaster(User loginUser) { |
||||
|
||||
Map<String, Object> result = new HashMap<>(5); |
||||
|
||||
List<MasterServer> masterList = masterServerMapper.queryAllMaster(); |
||||
result.put(Constants.DATA_LIST, masterList); |
||||
putMsg(result,Status.SUCCESS); |
||||
|
||||
return result; |
||||
} |
||||
|
||||
/** |
||||
* query worker list |
||||
* |
||||
* @param loginUser |
||||
* @return |
||||
*/ |
||||
public Map<String,Object> queryWorker(User loginUser) { |
||||
Map<String, Object> result = new HashMap<>(); |
||||
|
||||
List<WorkerServer> workerList = workerServerMapper.queryAllWorker(); |
||||
result.put(Constants.DATA_LIST, workerList); |
||||
putMsg(result,Status.SUCCESS); |
||||
return result; |
||||
} |
||||
} |
@ -0,0 +1,185 @@
|
||||
<factorypath> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/fastjson/1.2.29/fastjson-1.2.29.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.4.1/httpclient-4.4.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.1/httpcore-4.4.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.6/commons-codec-1.6.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-configuration/commons-configuration/1.10/commons-configuration-1.10.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.9.8/jackson-annotations-2.9.8.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.9.8/jackson-databind-2.9.8.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.9.8/jackson-core-2.9.8.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/curator/curator-client/2.12.0/curator-client-2.12.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/zookeeper/zookeeper/3.4.8/zookeeper-3.4.8.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jline/jline/0.9.94/jline-0.9.94.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/20.0/guava-20.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-common/2.7.3/hadoop-common-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-annotations/2.7.3/hadoop-annotations-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/2.4/commons-io-2.4.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-core/1.9/jersey-core-1.9.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-json/1.9/jersey-json-1.9.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/xml/bind/jaxb-impl/2.2.3-1/jaxb-impl-2.2.3-1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/jackson/jackson-jaxrs/1.8.3/jackson-jaxrs-1.8.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/jackson/jackson-xc/1.8.3/jackson-xc-1.8.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-server/1.9/jersey-server-1.9.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/asm/asm/3.1/asm-3.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/dev/jets3t/jets3t/0.9.0/jets3t-0.9.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/jamesmurty/utils/java-xmlbuilder/0.4/java-xmlbuilder-0.4.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-auth/2.7.3/hadoop-auth-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/directory/server/apacheds-kerberos-codec/2.0.0-M15/apacheds-kerberos-codec-2.0.0-M15.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/directory/server/apacheds-i18n/2.0.0-M15/apacheds-i18n-2.0.0-M15.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/directory/api/api-asn1-api/1.0.0-M20/api-asn1-api-1.0.0-M20.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/directory/api/api-util/1.0.0-M20/api-util-1.0.0-M20.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/jcraft/jsch/0.1.42/jsch-0.1.42.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/curator/curator-recipes/2.12.0/curator-recipes-2.12.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/htrace/htrace-core/3.1.0-incubating/htrace-core-3.1.0-incubating.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/tukaani/xz/1.0/xz-1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-client/2.7.3/hadoop-client-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-mapreduce-client-app/2.7.3/hadoop-mapreduce-client-app-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-mapreduce-client-common/2.7.3/hadoop-mapreduce-client-common-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-yarn-client/2.7.3/hadoop-yarn-client-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-yarn-server-common/2.7.3/hadoop-yarn-server-common-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-yarn-api/2.7.3/hadoop-yarn-api-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-mapreduce-client-core/2.7.3/hadoop-mapreduce-client-core-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-yarn-common/2.7.3/hadoop-yarn-common-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-client/1.9/jersey-client-1.9.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-mapreduce-client-jobclient/2.7.3/hadoop-mapreduce-client-jobclient-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-hdfs/2.7.3/hadoop-hdfs-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-daemon/commons-daemon/1.0.13/commons-daemon-1.0.13.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/log4j/log4j/1.2.17/log4j-1.2.17.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-aws/2.7.3/hadoop-aws-2.7.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/amazonaws/aws-java-sdk/1.7.4/aws-java-sdk-1.7.4.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/joda-time/joda-time/2.10.1/joda-time-2.10.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/postgresql/postgresql/42.1.4/postgresql-42.1.4.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-jdbc/2.1.0/hive-jdbc-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-common/2.1.0/hive-common-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-storage-api/2.1.0/hive-storage-api-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-orc/2.1.0/hive-orc-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/iq80/snappy/snappy/0.2/snappy-0.2.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-1.2-api/2.11.2/log4j-1.2-api-2.11.2.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.11.2/log4j-api-2.11.2.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-core/2.11.2/log4j-core-2.11.2.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-web/2.11.2/log4j-web-2.11.2.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-service/2.1.0/hive-service-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-llap-server/2.1.0/hive-llap-server-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-llap-common/2.1.0/hive-llap-common-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-llap-client/2.1.0/hive-llap-client-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-llap-tez/2.1.0/hive-llap-tez-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/slider/slider-core/0.90.2-incubating/slider-core-0.90.2-incubating.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/beust/jcommander/1.30/jcommander-1.30.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-yarn-registry/2.7.1/hadoop-yarn-registry-2.7.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/inject/extensions/guice-servlet/3.0/guice-servlet-3.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hbase/hbase-hadoop2-compat/1.1.1/hbase-hadoop2-compat-1.1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-math/2.2/commons-math-2.2.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hbase/hbase-server/1.1.1/hbase-server-1.1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hbase/hbase-procedure/1.1.1/hbase-procedure-1.1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hbase/hbase-common/1.1.1/hbase-common-1.1.1-tests.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hbase/hbase-prefix-tree/1.1.1/hbase-prefix-tree-1.1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/mortbay/jetty/jetty-sslengine/6.1.26/jetty-sslengine-6.1.26.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/mortbay/jetty/jsp-2.1/6.1.14/jsp-2.1-6.1.14.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/mortbay/jetty/jsp-api-2.1/6.1.14/jsp-api-2.1-6.1.14.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/lmax/disruptor/3.3.0/disruptor-3.3.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hbase/hbase-common/1.1.1/hbase-common-1.1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hbase/hbase-hadoop-compat/1.1.1/hbase-hadoop-compat-1.1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/sf/jpam/jpam/1.1/jpam-1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/tomcat/jasper-compiler/5.5.23/jasper-compiler-5.5.23.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/ant/ant/1.6.5/ant-1.6.5.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/thrift/libfb303/0.9.3/libfb303-0.9.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jamon/jamon-runtime/2.3.1/jamon-runtime-2.3.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-serde/2.1.0/hive-serde-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/sf/opencsv/opencsv/2.3/opencsv-2.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/parquet/parquet-hadoop-bundle/1.8.1/parquet-hadoop-bundle-1.8.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-metastore/2.1.0/hive-metastore-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javolution/javolution/5.5.1/javolution-5.5.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hbase/hbase-client/1.1.1/hbase-client-1.1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hbase/hbase-annotations/1.1.1/hbase-annotations-1.1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="EXTJAR" id="/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre/../lib/tools.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hbase/hbase-protocol/1.1.1/hbase-protocol-1.1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jruby/jcodings/jcodings/1.0.8/jcodings-1.0.8.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jruby/joni/joni/2.1.2/joni-2.1.2.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/stephenc/findbugs/findbugs-annotations/1.3.9-1/findbugs-annotations-1.3.9-1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/jolbox/bonecp/0.8.0.RELEASE/bonecp-0.8.0.RELEASE.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/derby/derby/10.14.2.0/derby-10.14.2.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/datanucleus/datanucleus-api-jdo/4.2.1/datanucleus-api-jdo-4.2.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/datanucleus/datanucleus-core/4.1.6/datanucleus-core-4.1.6.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/datanucleus/datanucleus-rdbms/4.1.7/datanucleus-rdbms-4.1.7.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-pool/commons-pool/1.6/commons-pool-1.6.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-dbcp/commons-dbcp/1.4/commons-dbcp-1.4.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/jdo/jdo-api/3.0.1/jdo-api-3.0.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/datanucleus/javax.jdo/3.2.0-m3/javax.jdo-3.2.0-m3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/transaction/transaction-api/1.1/transaction-api-1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/antlr-runtime/3.4/antlr-runtime-3.4.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/co/cask/tephra/tephra-api/0.6.0/tephra-api-0.6.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/co/cask/tephra/tephra-core/0.6.0/tephra-core-0.6.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/inject/guice/3.0/guice-3.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/inject/extensions/guice-assistedinject/3.0/guice-assistedinject-3.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/it/unimi/dsi/fastutil/6.5.6/fastutil-6.5.6.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/twill/twill-common/0.6.0-incubating/twill-common-0.6.0-incubating.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/twill/twill-core/0.6.0-incubating/twill-core-0.6.0-incubating.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/twill/twill-api/0.6.0-incubating/twill-api-0.6.0-incubating.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/twill/twill-discovery-api/0.6.0-incubating/twill-discovery-api-0.6.0-incubating.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/twill/twill-discovery-core/0.6.0-incubating/twill-discovery-core-0.6.0-incubating.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/twill/twill-zookeeper/0.6.0-incubating/twill-zookeeper-0.6.0-incubating.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/co/cask/tephra/tephra-hbase-compat-1.0/0.6.0/tephra-hbase-compat-1.0-0.6.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-shims/2.1.0/hive-shims-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/shims/hive-shims-common/2.1.0/hive-shims-common-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/shims/hive-shims-0.23/2.1.0/hive-shims-0.23-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-yarn-server-resourcemanager/2.6.0/hadoop-yarn-server-resourcemanager-2.6.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/contribs/jersey-guice/1.9/jersey-guice-1.9.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-yarn-server-applicationhistoryservice/2.6.0/hadoop-yarn-server-applicationhistoryservice-2.6.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/fusesource/leveldbjni/leveldbjni-all/1.8/leveldbjni-all-1.8.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hadoop/hadoop-yarn-server-web-proxy/2.6.0/hadoop-yarn-server-web-proxy-2.6.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/shims/hive-shims-scheduler/2.1.0/hive-shims-scheduler-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/hive/hive-service-rpc/2.1.0/hive-service-rpc-2.1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/thrift/libthrift/0.9.3/libthrift-0.9.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/curator/curator-framework/2.12.0/curator-framework-2.12.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/mybatis/3.5.1/mybatis-3.5.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/oshi/oshi-core/3.5.0/oshi-core-3.5.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/dev/jna/jna-platform/4.5.2/jna-platform-4.5.2.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/dev/jna/jna/4.5.2/jna-4.5.2.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/threeten/threetenbp/1.3.6/threetenbp-1.3.6.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/ru/yandex/clickhouse/clickhouse-jdbc/0.1.52/clickhouse-jdbc-0.1.52.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpmime/4.5.7/httpmime-4.5.7.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/jpountz/lz4/lz4/1.3.0/lz4-1.3.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/microsoft/sqlserver/mssql-jdbc/6.1.0.jre8/mssql-jdbc-6.1.0.jre8.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/microsoft/azure/azure-keyvault/0.9.3/azure-keyvault-0.9.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/microsoft/azure/azure-core/0.9.3/azure-core-0.9.3.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/mail/mail/1.4.5/mail-1.4.5.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/inject/javax.inject/1/javax.inject-1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/microsoft/azure/adal4j/1.0.0/adal4j-1.0.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/oauth2-oidc-sdk/4.5/oauth2-oidc-sdk-4.5.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/minidev/json-smart/1.1.1/json-smart-1.1.1.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/lang-tag/1.4/lang-tag-1.4.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/nimbus-jose-jwt/3.1.2/nimbus-jose-jwt-3.1.2.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.51/bcprov-jdk15on-1.51.jar" enabled="true" runInBatchMode="false"/> |
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar" enabled="true" runInBatchMode="false"/> |
||||
</factorypath> |
@ -1,164 +0,0 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
||||
package cn.escheduler.dao; |
||||
|
||||
import cn.escheduler.common.model.MasterServer; |
||||
import cn.escheduler.dao.mapper.MasterServerMapper; |
||||
import cn.escheduler.dao.mapper.WorkerServerMapper; |
||||
import cn.escheduler.dao.model.WorkerServer; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
import java.util.Date; |
||||
|
||||
import static cn.escheduler.dao.datasource.ConnectionFactory.getMapper; |
||||
|
||||
/** |
||||
* server dao |
||||
*/ |
||||
@Component |
||||
public class ServerDao extends AbstractBaseDao { |
||||
|
||||
@Autowired |
||||
MasterServerMapper masterServerMapper; |
||||
|
||||
|
||||
@Autowired |
||||
WorkerServerMapper workerServerMapper; |
||||
|
||||
@Override |
||||
protected void init() { |
||||
masterServerMapper = getMapper(MasterServerMapper.class); |
||||
workerServerMapper = getMapper(WorkerServerMapper.class); |
||||
} |
||||
|
||||
/** |
||||
* register master |
||||
* |
||||
* @param host |
||||
* @param port |
||||
* @param zkDirectory |
||||
* @param resInfo |
||||
* @param createTime |
||||
* @param lastHeartbeatTime |
||||
* @return |
||||
*/ |
||||
public int registerMaster(String host, int port , String zkDirectory , String resInfo , |
||||
Date createTime , Date lastHeartbeatTime) { |
||||
|
||||
MasterServer masterServer = new MasterServer(); |
||||
|
||||
masterServer.setHost(host); |
||||
masterServer.setPort(port); |
||||
masterServer.setZkDirectory(zkDirectory); |
||||
masterServer.setResInfo(resInfo); |
||||
masterServer.setCreateTime(createTime); |
||||
masterServer.setLastHeartbeatTime(lastHeartbeatTime); |
||||
|
||||
return masterServerMapper.insert(masterServer); |
||||
} |
||||
|
||||
/** |
||||
* update master |
||||
* |
||||
* @param host |
||||
* @param port |
||||
* @param resInfo |
||||
* @param lastHeartbeatTime |
||||
* @return |
||||
*/ |
||||
public int updateMaster(String host, int port , String resInfo , Date lastHeartbeatTime) { |
||||
|
||||
MasterServer masterServer = new MasterServer(); |
||||
|
||||
masterServer.setHost(host); |
||||
masterServer.setPort(port); |
||||
masterServer.setResInfo(resInfo); |
||||
masterServer.setLastHeartbeatTime(lastHeartbeatTime); |
||||
|
||||
return masterServerMapper.update(masterServer); |
||||
} |
||||
|
||||
/** |
||||
* delete master |
||||
* |
||||
* @param host |
||||
* @return |
||||
*/ |
||||
public int deleteMaster(String host) { |
||||
return masterServerMapper.deleteWorkerByHost(host); |
||||
} |
||||
|
||||
/** |
||||
* register master |
||||
* @param host |
||||
* @param port |
||||
* @param zkDirectory |
||||
* @param resInfo |
||||
* @param createTime |
||||
* @param lastHeartbeatTime |
||||
* @return |
||||
*/ |
||||
public int registerWorker(String host, int port , String zkDirectory , String resInfo , |
||||
Date createTime , Date lastHeartbeatTime) { |
||||
|
||||
WorkerServer workerServer = new WorkerServer(); |
||||
|
||||
workerServer.setHost(host); |
||||
workerServer.setPort(port); |
||||
workerServer.setZkDirectory(zkDirectory); |
||||
workerServer.setResInfo(resInfo); |
||||
workerServer.setCreateTime(createTime); |
||||
workerServer.setLastHeartbeatTime(lastHeartbeatTime); |
||||
|
||||
return workerServerMapper.insert(workerServer); |
||||
} |
||||
|
||||
/** |
||||
* |
||||
* update worker |
||||
* @param host |
||||
* @param port |
||||
* @param resInfo |
||||
* @param lastHeartbeatTime |
||||
* @return |
||||
*/ |
||||
public int updateWorker(String host, int port , String resInfo , Date lastHeartbeatTime) { |
||||
|
||||
WorkerServer workerServer = new WorkerServer(); |
||||
|
||||
workerServer.setHost(host); |
||||
workerServer.setPort(port); |
||||
workerServer.setResInfo(resInfo); |
||||
workerServer.setLastHeartbeatTime(lastHeartbeatTime); |
||||
|
||||
return workerServerMapper.update(workerServer); |
||||
} |
||||
|
||||
|
||||
|
||||
/** |
||||
* delete worker by host |
||||
* |
||||
* @param host |
||||
* @return |
||||
*/ |
||||
public int deleteWorker(String host) { |
||||
return workerServerMapper.deleteWorkerByHost(host); |
||||
} |
||||
|
||||
} |
@ -1,63 +1,63 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
||||
package cn.escheduler.dao.datasource; |
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource; |
||||
import org.apache.ibatis.session.SqlSessionFactory; |
||||
import org.mybatis.spring.SqlSessionFactoryBean; |
||||
import org.mybatis.spring.annotation.MapperScan; |
||||
import org.springframework.context.annotation.Bean; |
||||
import org.springframework.context.annotation.Configuration; |
||||
import org.springframework.context.annotation.Primary; |
||||
import org.springframework.context.annotation.PropertySource; |
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager; |
||||
import org.springframework.transaction.PlatformTransactionManager; |
||||
|
||||
import java.sql.SQLException; |
||||
|
||||
/** |
||||
* data base configuration |
||||
*/ |
||||
@Configuration |
||||
@PropertySource({"classpath:dao/data_source.properties"}) |
||||
@MapperScan(basePackages = "cn.escheduler.dao.mapper", sqlSessionFactoryRef = "SqlSessionFactory") |
||||
public class DatabaseConfiguration { |
||||
|
||||
/** |
||||
* register data source |
||||
*/ |
||||
@Primary |
||||
@Bean(name = "DataSource", initMethod = "init", destroyMethod = "close") |
||||
public DruidDataSource dataSource() { |
||||
return ConnectionFactory.getDataSource(); |
||||
} |
||||
|
||||
@Primary |
||||
@Bean(name = "SqlSessionFactory") |
||||
public SqlSessionFactory sqlSessionFactory() throws Exception { |
||||
SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); |
||||
sqlSessionFactoryBean.setDataSource(dataSource()); |
||||
|
||||
return sqlSessionFactoryBean.getObject(); |
||||
} |
||||
|
||||
@Primary |
||||
@Bean(name = "TransactionManager") |
||||
public PlatformTransactionManager transactionManager() throws SQLException { |
||||
return new DataSourceTransactionManager(dataSource()); |
||||
} |
||||
} |
||||
///*
|
||||
// * 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.
|
||||
// */
|
||||
//package cn.escheduler.dao.datasource;
|
||||
//
|
||||
//import com.alibaba.druid.pool.DruidDataSource;
|
||||
//import org.apache.ibatis.session.SqlSessionFactory;
|
||||
//import org.mybatis.spring.SqlSessionFactoryBean;
|
||||
//import org.mybatis.spring.annotation.MapperScan;
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//import org.springframework.context.annotation.Primary;
|
||||
//import org.springframework.context.annotation.PropertySource;
|
||||
//import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
//import org.springframework.transaction.PlatformTransactionManager;
|
||||
//
|
||||
//import java.sql.SQLException;
|
||||
//
|
||||
///**
|
||||
// * data base configuration
|
||||
// */
|
||||
//@Configuration
|
||||
//@PropertySource({"classpath:application.yml"})
|
||||
//@MapperScan(basePackages = "cn.escheduler.dao.mapper", sqlSessionFactoryRef = "SqlSessionFactory")
|
||||
//public class DatabaseConfiguration {
|
||||
//
|
||||
// /**
|
||||
// * register data source
|
||||
// */
|
||||
// @Primary
|
||||
// @Bean(name = "DataSource", initMethod = "init", destroyMethod = "close")
|
||||
// public DruidDataSource dataSource() {
|
||||
// return ConnectionFactory.getDataSource();
|
||||
// }
|
||||
//
|
||||
// @Primary
|
||||
// @Bean(name = "SqlSessionFactory")
|
||||
// public SqlSessionFactory sqlSessionFactory() throws Exception {
|
||||
// SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
|
||||
// sqlSessionFactoryBean.setDataSource(dataSource());
|
||||
//
|
||||
// return sqlSessionFactoryBean.getObject();
|
||||
// }
|
||||
//
|
||||
// @Primary
|
||||
// @Bean(name = "TransactionManager")
|
||||
// public PlatformTransactionManager transactionManager() throws SQLException {
|
||||
// return new DataSourceTransactionManager(dataSource());
|
||||
// }
|
||||
//}
|
||||
|
@ -0,0 +1,58 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
||||
package cn.escheduler.dao.entity; |
||||
|
||||
|
||||
import cn.escheduler.common.enums.CommandType; |
||||
|
||||
public class CommandCount { |
||||
|
||||
|
||||
/** |
||||
* execution state |
||||
*/ |
||||
private CommandType commandType; |
||||
|
||||
/** |
||||
* count for state |
||||
*/ |
||||
private int count; |
||||
|
||||
|
||||
@Override |
||||
public String toString(){ |
||||
return "command count:" + |
||||
" commandType: "+ commandType.toString() + |
||||
" count: "+ count; |
||||
} |
||||
|
||||
public CommandType getCommandType() { |
||||
return commandType; |
||||
} |
||||
|
||||
public void setCommandType(CommandType commandType) { |
||||
this.commandType = commandType; |
||||
} |
||||
|
||||
public int getCount() { |
||||
return count; |
||||
} |
||||
|
||||
public void setCount(int count) { |
||||
this.count = count; |
||||
} |
||||
} |
@ -0,0 +1,141 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
||||
package cn.escheduler.dao.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
|
||||
@Data |
||||
@TableName("t_escheduler_relation_project_user") |
||||
public class ProjectUser { |
||||
/** |
||||
* id |
||||
*/ |
||||
@TableId(value="id", type=IdType.AUTO) |
||||
private int id; |
||||
|
||||
@TableField("user_id") |
||||
private int userId; |
||||
|
||||
@TableField("project_id") |
||||
private int projectId; |
||||
|
||||
/** |
||||
* project name |
||||
*/ |
||||
@TableField(exist = false) |
||||
private String projectName; |
||||
|
||||
/** |
||||
* user name |
||||
*/ |
||||
@TableField(exist = false) |
||||
private String userName; |
||||
|
||||
/** |
||||
* permission |
||||
*/ |
||||
private int perm; |
||||
|
||||
@TableField("create_time") |
||||
private Date createTime; |
||||
|
||||
@TableField("update_time") |
||||
private Date updateTime; |
||||
|
||||
public int getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(int id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public int getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(int userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public int getProjectId() { |
||||
return projectId; |
||||
} |
||||
|
||||
public void setProjectId(int projectId) { |
||||
this.projectId = projectId; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public Date getUpdateTime() { |
||||
return updateTime; |
||||
} |
||||
|
||||
public void setUpdateTime(Date updateTime) { |
||||
this.updateTime = updateTime; |
||||
} |
||||
|
||||
public String getProjectName() { |
||||
return projectName; |
||||
} |
||||
|
||||
public void setProjectName(String projectName) { |
||||
this.projectName = projectName; |
||||
} |
||||
|
||||
public String getUserName() { |
||||
return userName; |
||||
} |
||||
|
||||
public void setUserName(String userName) { |
||||
this.userName = userName; |
||||
} |
||||
|
||||
public int getPerm() { |
||||
return perm; |
||||
} |
||||
|
||||
public void setPerm(int perm) { |
||||
this.perm = perm; |
||||
} |
||||
@Override |
||||
public String toString() { |
||||
return "ProjectUser{" + |
||||
"id=" + id + |
||||
", projectId=" + projectId + |
||||
", projectName='" + projectName + '\'' + |
||||
", userId=" + userId + |
||||
", userName='" + userName + '\'' + |
||||
", perm=" + perm + |
||||
", createTime=" + createTime + |
||||
", updateTime=" + updateTime + |
||||
'}'; |
||||
} |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue