Browse Source

merge from dev-1.3.0

pull/3/MERGE
lenboo 4 years ago
parent
commit
73cae7f046
  1. 70
      NOTICE
  2. 2
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
  3. 20
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
  4. 2
      dolphinscheduler-common/src/main/resources/common.properties
  5. 4
      dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/HadoopUtilsTest.java
  6. 2
      dolphinscheduler-server/src/main/resources/config/install_config.conf
  7. 5
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/_source/createUdf.vue
  8. 6
      dolphinscheduler-ui/src/js/module/components/fileUpdate/udfUpdate.vue
  9. 2
      dolphinscheduler-ui/src/lib/external/email.js
  10. 3658
      dolphinscheduler-ui/src/sass/common/_animation.scss
  11. 1
      dolphinscheduler-ui/src/sass/common/index.scss
  12. 2
      pom.xml

70
NOTICE

@ -3,3 +3,73 @@ Copyright 2019-2020 The Apache Software Foundation
This product includes software developed at
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.

2
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 hdfsFileName = HadoopUtils.getHdfsFileName(resource.getType(), tenantCode, resource.getAlias());
String hdfsFileName = HadoopUtils.getHdfsFileName(resource.getType(), tenantCode, resource.getFullName());
String localFileName = FileUtils.getDownloadFilename(resource.getAlias());
logger.info("resource hdfs path is {} ", hdfsFileName);

20
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
* @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
* otherwise:
@ -193,21 +193,21 @@ public class HadoopUtils implements Closeable {
* if rmHaIds not empty: resourcemanager HA enabled
*/
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
appUrl = getAppAddress(appAddress, rmHaIds);
yarnEnabled = true;
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);
}
@ -407,7 +407,7 @@ public class HadoopUtils implements Closeable {
* @param applicationId application id
* @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)) {
return null;
}

2
dolphinscheduler-common/src/main/resources/common.properties

@ -54,7 +54,7 @@ fs.s3a.access.key=A3DXS30FO22544RE
# if resource.storage.type=S3,s3 secret key
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
# 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.

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

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

2
dolphinscheduler-server/src/main/resources/config/install_config.conf

@ -87,7 +87,7 @@ s3Endpoint="http://192.168.xx.xx:9010"
s3AccessKey="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"
# 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
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/_source/createUdf.vue

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

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

@ -13,7 +13,7 @@
* 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.
*/
*/
<template>
<div class="update-udf-model">
<div class="update-udf-box">
@ -26,7 +26,7 @@
v-model="udfName"
:disabled="progress !== 0"
style="width: 535px"
:placeholder="$t('Please enter resource name')"
:placeholder="$t('Please enter name')"
autocomplete="off">
</x-input>
<div class="p1" style="position: absolute;">
@ -96,7 +96,7 @@
_verifyName () {
return new Promise((resolve, reject) => {
this.store.dispatch('resource/resourceVerifyName', {
fullName: '/'+this.udfName,
fullName: '/'+this.currentDir+'/'+this.udfName,
type: 'UDF'
}).then(res => {
resolve()

2
dolphinscheduler-ui/src/lib/external/email.js vendored

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

3658
dolphinscheduler-ui/src/sass/common/_animation.scss

File diff suppressed because it is too large Load Diff

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

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

2
pom.xml

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

Loading…
Cancel
Save