Browse Source

merge from dev-1.3.0

lenboo 4 years ago
parent
commit
73cae7f046

+ 70 - 0
NOTICE

@@ -3,3 +3,73 @@ Copyright 2019-2020 The Apache Software Foundation
 
 
 This product includes software developed at
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 The Apache Software Foundation (http://www.apache.org/).
+
+mybatis-3
+iBATIS
+   This product includes software developed by
+   The Apache Software Foundation (http://www.apache.org/).
+
+   Copyright 2010 The Apache Software Foundation
+
+   Licensed 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.
+
+OGNL
+//--------------------------------------------------------------------------
+//  Copyright (c) 2004, Drew Davidson and Luke Blanshard
+//  All rights reserved.
+//
+//  Redistribution and use in source and binary forms, with or without
+//  modification, are permitted provided that the following conditions are
+//  met:
+//
+//  Redistributions of source code must retain the above copyright notice,
+//  this list of conditions and the following disclaimer.
+//  Redistributions in binary form must reproduce the above copyright
+//  notice, this list of conditions and the following disclaimer in the
+//  documentation and/or other materials provided with the distribution.
+//  Neither the name of the Drew Davidson nor the names of its contributors
+//  may be used to endorse or promote products derived from this software
+//  without specific prior written permission.
+//
+//  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+//  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+//  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+//  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+//  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+//  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+//  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+//  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+//  THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+//  DAMAGE.
+//--------------------------------------------------------------------------
+
+Refactored SqlBuilder class (SQL, AbstractSQL)
+
+   This product includes software developed by
+   Adam Gent (https://gist.github.com/3650165)
+
+   Copyright 2010 Adam Gent
+
+   Licensed 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.

+ 1 - 1
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java

@@ -1019,7 +1019,7 @@ public class ResourcesService extends BaseService {
 
 
         String tenantCode = tenant.getTenantCode();
         String tenantCode = tenant.getTenantCode();
 
 
-        String hdfsFileName = HadoopUtils.getHdfsFileName(resource.getType(), tenantCode, resource.getAlias());
+        String hdfsFileName = HadoopUtils.getHdfsFileName(resource.getType(), tenantCode, resource.getFullName());
 
 
         String localFileName = FileUtils.getDownloadFilename(resource.getAlias());
         String localFileName = FileUtils.getDownloadFilename(resource.getAlias());
         logger.info("resource hdfs path is {} ", hdfsFileName);
         logger.info("resource hdfs path is {} ", hdfsFileName);

+ 10 - 10
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java

@@ -185,7 +185,7 @@ public class HadoopUtils implements Closeable {
      * @param applicationId application id
      * @param applicationId application id
      * @return url of application
      * @return url of application
      */
      */
-    public String getApplicationUrl(String applicationId) {
+    public String getApplicationUrl(String applicationId) throws Exception {
         /**
         /**
          * if rmHaIds contains xx, it signs not use resourcemanager
          * if rmHaIds contains xx, it signs not use resourcemanager
          * otherwise:
          * otherwise:
@@ -193,21 +193,21 @@ public class HadoopUtils implements Closeable {
          *  if rmHaIds not empty: resourcemanager HA enabled
          *  if rmHaIds not empty: resourcemanager HA enabled
          */
          */
         String appUrl = "";
         String appUrl = "";
-        //not use resourcemanager
-        if (rmHaIds.contains(Constants.YARN_RESOURCEMANAGER_HA_XX)) {
 
 
-            yarnEnabled = false;
-            logger.warn("should not step here");
-        } else if (!StringUtils.isEmpty(rmHaIds)) {
+        if (StringUtils.isEmpty(rmHaIds)){
+            //single resourcemanager enabled
+            appUrl = appAddress;
+            yarnEnabled = true;
+        } else {
             //resourcemanager HA enabled
             //resourcemanager HA enabled
             appUrl = getAppAddress(appAddress, rmHaIds);
             appUrl = getAppAddress(appAddress, rmHaIds);
             yarnEnabled = true;
             yarnEnabled = true;
             logger.info("application url : {}", appUrl);
             logger.info("application url : {}", appUrl);
-        } else {
-            //single resourcemanager enabled
-            yarnEnabled = true;
         }
         }
 
 
+        if(StringUtils.isBlank(appUrl)){
+            throw new Exception("application url is blank");
+        }
         return String.format(appUrl, applicationId);
         return String.format(appUrl, applicationId);
     }
     }
 
 
@@ -407,7 +407,7 @@ public class HadoopUtils implements Closeable {
      * @param applicationId application id
      * @param applicationId application id
      * @return the return may be null or there may be other parse exceptions
      * @return the return may be null or there may be other parse exceptions
      */
      */
-    public ExecutionStatus getApplicationStatus(String applicationId) {
+    public ExecutionStatus getApplicationStatus(String applicationId) throws Exception{
         if (StringUtils.isEmpty(applicationId)) {
         if (StringUtils.isEmpty(applicationId)) {
             return null;
             return null;
         }
         }

+ 1 - 1
dolphinscheduler-common/src/main/resources/common.properties

@@ -54,7 +54,7 @@ fs.s3a.access.key=A3DXS30FO22544RE
 # if resource.storage.type=S3,s3 secret key
 # if resource.storage.type=S3,s3 secret key
 fs.s3a.secret.key=OloCLq3n+8+sdPHUhJ21XrSxTC+JK
 fs.s3a.secret.key=OloCLq3n+8+sdPHUhJ21XrSxTC+JK
 
 
-# if not use hadoop resourcemanager, please keep default value; if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty
+# if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty
 yarn.resourcemanager.ha.rm.ids=192.168.xx.xx,192.168.xx.xx
 yarn.resourcemanager.ha.rm.ids=192.168.xx.xx,192.168.xx.xx
 
 
 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname.
 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname.

+ 2 - 2
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/HadoopUtilsTest.java

@@ -142,7 +142,7 @@ public class HadoopUtilsTest {
     @Test
     @Test
     public void isYarnEnabled() {
     public void isYarnEnabled() {
         boolean result = hadoopUtils.isYarnEnabled();
         boolean result = hadoopUtils.isYarnEnabled();
-        Assert.assertEquals(false, result);
+        Assert.assertEquals(true, result);
     }
     }
 
 
     @Test
     @Test
@@ -185,7 +185,7 @@ public class HadoopUtilsTest {
     }
     }
 
 
     @Test
     @Test
-    public void getApplicationUrl(){
+    public void getApplicationUrl() throws Exception {
         String application_1516778421218_0042 = hadoopUtils.getApplicationUrl("application_1529051418016_0167");
         String application_1516778421218_0042 = hadoopUtils.getApplicationUrl("application_1529051418016_0167");
         logger.info(application_1516778421218_0042);
         logger.info(application_1516778421218_0042);
     }
     }

+ 1 - 1
dolphinscheduler-server/src/main/resources/config/install_config.conf

@@ -87,7 +87,7 @@ s3Endpoint="http://192.168.xx.xx:9010"
 s3AccessKey="xxxxxxxxxx"
 s3AccessKey="xxxxxxxxxx"
 s3SecretKey="xxxxxxxxxx"
 s3SecretKey="xxxxxxxxxx"
 
 
-# if not use hadoop resourcemanager, please keep default value; if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty
+# if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty
 yarnHaIps="192.168.xx.xx,192.168.xx.xx"
 yarnHaIps="192.168.xx.xx,192.168.xx.xx"
 
 
 # if resourcemanager HA enable or not use resourcemanager, please skip this value setting; If resourcemanager is single, you only need to replace yarnIp1 to actual resourcemanager hostname.
 # if resourcemanager HA enable or not use resourcemanager, please skip this value setting; If resourcemanager is single, you only need to replace yarnIp1 to actual resourcemanager hostname.

+ 5 - 0
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/_source/createUdf.vue

@@ -216,6 +216,11 @@
             this.diGuiTree(item)
             this.diGuiTree(item)
             
             
             this.diGuiTree(this.filterJarFile(item1))
             this.diGuiTree(this.filterJarFile(item1))
+            item1 = item1.filter( item => {
+              if(item.dirctory) {
+                return item
+              }
+            });
             this.udfResourceList = item
             this.udfResourceList = item
             this.udfResourceDirList = item1
             this.udfResourceDirList = item1
             resolve()
             resolve()

+ 3 - 3
dolphinscheduler-ui/src/js/module/components/fileUpdate/udfUpdate.vue

@@ -13,7 +13,7 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
- */
+ */ 
 <template>
 <template>
   <div class="update-udf-model">
   <div class="update-udf-model">
     <div class="update-udf-box">
     <div class="update-udf-box">
@@ -26,7 +26,7 @@
                     v-model="udfName"
                     v-model="udfName"
                     :disabled="progress !== 0"
                     :disabled="progress !== 0"
                     style="width: 535px"
                     style="width: 535px"
-                    :placeholder="$t('Please enter resource name')"
+                    :placeholder="$t('Please enter name')"
                     autocomplete="off">
                     autocomplete="off">
             </x-input>
             </x-input>
             <div class="p1" style="position: absolute;">
             <div class="p1" style="position: absolute;">
@@ -96,7 +96,7 @@
       _verifyName () {
       _verifyName () {
         return new Promise((resolve, reject) => {
         return new Promise((resolve, reject) => {
           this.store.dispatch('resource/resourceVerifyName', {
           this.store.dispatch('resource/resourceVerifyName', {
-            fullName: '/'+this.udfName,
+            fullName: '/'+this.currentDir+'/'+this.udfName,
             type: 'UDF'
             type: 'UDF'
           }).then(res => {
           }).then(res => {
             resolve()
             resolve()

+ 1 - 1
dolphinscheduler-ui/src/lib/external/email.js

@@ -14,4 +14,4 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-export default ['test@analysys.com.cn']
+export default ['xx@xx.com']

File diff suppressed because it is too large
+ 0 - 3658
dolphinscheduler-ui/src/sass/common/_animation.scss


+ 0 - 1
dolphinscheduler-ui/src/sass/common/index.scss

@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-@import "animation";
 @import "scrollbar";
 @import "scrollbar";
 @import "table";
 @import "table";
 
 

+ 0 - 2
pom.xml

@@ -910,8 +910,6 @@
                         <exclude>**/node/**</exclude>
                         <exclude>**/node/**</exclude>
                         <exclude>**/dist/**</exclude>
                         <exclude>**/dist/**</exclude>
                         <exclude>**/licenses/**</exclude>
                         <exclude>**/licenses/**</exclude>
-                        <exclude>**/src/sass/common/_animation.scss</exclude>
-                        <exclude>**/src/sass/common/_normalize.scss</exclude>
                         <exclude>.github/**</exclude>
                         <exclude>.github/**</exclude>
                         <exclude>sql/soft_version</exclude>
                         <exclude>sql/soft_version</exclude>
                         <exclude>**/common/utils/ScriptRunner.java</exclude>
                         <exclude>**/common/utils/ScriptRunner.java</exclude>