Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
37655060
Unverified
Commit
37655060
authored
Dec 26, 2023
by
ZackYoung
Committed by
GitHub
Dec 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix_app_bug (#2800)
parent
b25694d0
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
73 additions
and
7 deletions
+73
-7
YarnClusterDescriptor.java
...ain/java/org/apache/flink/yarn/YarnClusterDescriptor.java
+3
-1
YarnClusterDescriptor.java
...ain/java/org/apache/flink/yarn/YarnClusterDescriptor.java
+4
-1
YarnClusterDescriptor.java
...ain/java/org/apache/flink/yarn/YarnClusterDescriptor.java
+3
-1
YarnClusterDescriptor.java
...ain/java/org/apache/flink/yarn/YarnClusterDescriptor.java
+3
-1
YarnClusterDescriptor.java
...ain/java/org/apache/flink/yarn/YarnClusterDescriptor.java
+3
-1
ClassPathUtils.java
...-common/src/main/java/org/dinky/utils/ClassPathUtils.java
+47
-0
AppBatchExecutor.java
...re/src/main/java/org/dinky/executor/AppBatchExecutor.java
+1
-1
Operations.java
dinky-core/src/main/java/org/dinky/trans/Operations.java
+8
-0
pom.xml
pom.xml
+1
-1
No files found.
dinky-client/dinky-client-1.14/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
View file @
37655060
...
@@ -26,6 +26,8 @@ import static org.apache.flink.util.Preconditions.checkArgument;
...
@@ -26,6 +26,8 @@ import static org.apache.flink.util.Preconditions.checkArgument;
import
static
org
.
apache
.
flink
.
util
.
Preconditions
.
checkNotNull
;
import
static
org
.
apache
.
flink
.
util
.
Preconditions
.
checkNotNull
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
LOCAL_RESOURCE_DESCRIPTOR_SEPARATOR
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
LOCAL_RESOURCE_DESCRIPTOR_SEPARATOR
;
import
org.dinky.utils.ClassPathUtils
;
import
org.apache.flink.annotation.VisibleForTesting
;
import
org.apache.flink.annotation.VisibleForTesting
;
import
org.apache.flink.api.common.cache.DistributedCache
;
import
org.apache.flink.api.common.cache.DistributedCache
;
import
org.apache.flink.api.java.tuple.Tuple2
;
import
org.apache.flink.api.java.tuple.Tuple2
;
...
@@ -854,7 +856,7 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
...
@@ -854,7 +856,7 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
}
}
// normalize classpath by sorting
// normalize classpath by sorting
C
ollection
s
.
sort
(
systemClassPaths
);
C
lassPathUtil
s
.
sort
(
systemClassPaths
);
Collections
.
sort
(
userClassPaths
);
Collections
.
sort
(
userClassPaths
);
// classpath assembler
// classpath assembler
...
...
dinky-client/dinky-client-1.15/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
View file @
37655060
...
@@ -28,6 +28,8 @@ import static org.apache.flink.util.Preconditions.checkArgument;
...
@@ -28,6 +28,8 @@ import static org.apache.flink.util.Preconditions.checkArgument;
import
static
org
.
apache
.
flink
.
util
.
Preconditions
.
checkNotNull
;
import
static
org
.
apache
.
flink
.
util
.
Preconditions
.
checkNotNull
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
LOCAL_RESOURCE_DESCRIPTOR_SEPARATOR
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
LOCAL_RESOURCE_DESCRIPTOR_SEPARATOR
;
import
org.dinky.utils.ClassPathUtils
;
import
org.apache.flink.annotation.VisibleForTesting
;
import
org.apache.flink.annotation.VisibleForTesting
;
import
org.apache.flink.api.common.cache.DistributedCache
;
import
org.apache.flink.api.common.cache.DistributedCache
;
import
org.apache.flink.api.java.tuple.Tuple2
;
import
org.apache.flink.api.java.tuple.Tuple2
;
...
@@ -878,7 +880,8 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
...
@@ -878,7 +880,8 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
}
}
// normalize classpath by sorting
// normalize classpath by sorting
Collections
.
sort
(
systemClassPaths
);
ClassPathUtils
.
sort
(
systemClassPaths
);
Collections
.
sort
(
userClassPaths
);
Collections
.
sort
(
userClassPaths
);
// classpath assembler
// classpath assembler
...
...
dinky-client/dinky-client-1.16/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
View file @
37655060
...
@@ -29,6 +29,8 @@ import static org.apache.flink.util.Preconditions.checkNotNull;
...
@@ -29,6 +29,8 @@ import static org.apache.flink.util.Preconditions.checkNotNull;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
ENV_FLINK_CLASSPATH
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
ENV_FLINK_CLASSPATH
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
LOCAL_RESOURCE_DESCRIPTOR_SEPARATOR
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
LOCAL_RESOURCE_DESCRIPTOR_SEPARATOR
;
import
org.dinky.utils.ClassPathUtils
;
import
org.apache.flink.annotation.VisibleForTesting
;
import
org.apache.flink.annotation.VisibleForTesting
;
import
org.apache.flink.api.common.cache.DistributedCache
;
import
org.apache.flink.api.common.cache.DistributedCache
;
import
org.apache.flink.api.java.tuple.Tuple2
;
import
org.apache.flink.api.java.tuple.Tuple2
;
...
@@ -894,7 +896,7 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
...
@@ -894,7 +896,7 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
}
}
// normalize classpath by sorting
// normalize classpath by sorting
C
ollection
s
.
sort
(
systemClassPaths
);
C
lassPathUtil
s
.
sort
(
systemClassPaths
);
Collections
.
sort
(
userClassPaths
);
Collections
.
sort
(
userClassPaths
);
// classpath assembler
// classpath assembler
...
...
dinky-client/dinky-client-1.17/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
View file @
37655060
...
@@ -29,6 +29,8 @@ import static org.apache.flink.util.Preconditions.checkNotNull;
...
@@ -29,6 +29,8 @@ import static org.apache.flink.util.Preconditions.checkNotNull;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
ENV_FLINK_CLASSPATH
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
ENV_FLINK_CLASSPATH
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
LOCAL_RESOURCE_DESCRIPTOR_SEPARATOR
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
LOCAL_RESOURCE_DESCRIPTOR_SEPARATOR
;
import
org.dinky.utils.ClassPathUtils
;
import
org.apache.flink.annotation.VisibleForTesting
;
import
org.apache.flink.annotation.VisibleForTesting
;
import
org.apache.flink.api.common.cache.DistributedCache
;
import
org.apache.flink.api.common.cache.DistributedCache
;
import
org.apache.flink.api.java.tuple.Tuple2
;
import
org.apache.flink.api.java.tuple.Tuple2
;
...
@@ -897,7 +899,7 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
...
@@ -897,7 +899,7 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
}
}
// normalize classpath by sorting
// normalize classpath by sorting
C
ollection
s
.
sort
(
systemClassPaths
);
C
lassPathUtil
s
.
sort
(
systemClassPaths
);
Collections
.
sort
(
userClassPaths
);
Collections
.
sort
(
userClassPaths
);
// classpath assembler
// classpath assembler
...
...
dinky-client/dinky-client-1.18/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
View file @
37655060
...
@@ -29,6 +29,8 @@ import static org.apache.flink.util.Preconditions.checkNotNull;
...
@@ -29,6 +29,8 @@ import static org.apache.flink.util.Preconditions.checkNotNull;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
ENV_FLINK_CLASSPATH
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
ENV_FLINK_CLASSPATH
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
LOCAL_RESOURCE_DESCRIPTOR_SEPARATOR
;
import
static
org
.
apache
.
flink
.
yarn
.
YarnConfigKeys
.
LOCAL_RESOURCE_DESCRIPTOR_SEPARATOR
;
import
org.dinky.utils.ClassPathUtils
;
import
org.apache.flink.annotation.VisibleForTesting
;
import
org.apache.flink.annotation.VisibleForTesting
;
import
org.apache.flink.api.common.cache.DistributedCache
;
import
org.apache.flink.api.common.cache.DistributedCache
;
import
org.apache.flink.api.java.tuple.Tuple2
;
import
org.apache.flink.api.java.tuple.Tuple2
;
...
@@ -905,7 +907,7 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
...
@@ -905,7 +907,7 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
}
}
// normalize classpath by sorting
// normalize classpath by sorting
C
ollection
s
.
sort
(
systemClassPaths
);
C
lassPathUtil
s
.
sort
(
systemClassPaths
);
Collections
.
sort
(
userClassPaths
);
Collections
.
sort
(
userClassPaths
);
// classpath assembler
// classpath assembler
...
...
dinky-common/src/main/java/org/dinky/utils/ClassPathUtils.java
0 → 100644
View file @
37655060
/*
*
* 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
org
.
dinky
.
utils
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.util.StrUtil
;
public
class
ClassPathUtils
{
public
static
void
sort
(
List
<
String
>
list
)
{
Collections
.
sort
(
list
);
List
<
Integer
>
indexList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
String
path
=
list
.
get
(
i
);
if
(
StrUtil
.
contains
(
path
,
"dinky"
))
{
indexList
.
add
(
i
);
}
}
if
(
CollUtil
.
isNotEmpty
(
indexList
))
{
for
(
Integer
i
:
indexList
)
{
int
index
=
i
;
String
path
=
list
.
remove
(
index
);
list
.
add
(
0
,
path
);
}
}
}
}
dinky-core/src/main/java/org/dinky/executor/AppBatchExecutor.java
View file @
37655060
...
@@ -37,7 +37,7 @@ public class AppBatchExecutor extends Executor {
...
@@ -37,7 +37,7 @@ public class AppBatchExecutor extends Executor {
Configuration
configuration
=
Configuration
.
fromMap
(
executorConfig
.
getConfig
());
Configuration
configuration
=
Configuration
.
fromMap
(
executorConfig
.
getConfig
());
this
.
environment
=
StreamExecutionEnvironment
.
getExecutionEnvironment
(
configuration
);
this
.
environment
=
StreamExecutionEnvironment
.
getExecutionEnvironment
(
configuration
);
}
else
{
}
else
{
this
.
environment
=
StreamExecutionEnvironment
.
createLocal
Environment
();
this
.
environment
=
StreamExecutionEnvironment
.
getExecution
Environment
();
}
}
init
(
classLoader
);
init
(
classLoader
);
}
}
...
...
dinky-core/src/main/java/org/dinky/trans/Operations.java
View file @
37655060
...
@@ -23,6 +23,7 @@ import org.dinky.parser.SqlType;
...
@@ -23,6 +23,7 @@ import org.dinky.parser.SqlType;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Objects
;
import
java.util.Set
;
import
java.util.Set
;
import
org.reflections.Reflections
;
import
org.reflections.Reflections
;
...
@@ -65,8 +66,15 @@ public class Operations {
...
@@ -65,8 +66,15 @@ public class Operations {
|
NoSuchMethodException
e
)
{
|
NoSuchMethodException
e
)
{
log
.
error
(
String
.
format
(
"getAllOperations error, class %s, err: %s"
,
t
,
e
));
log
.
error
(
String
.
format
(
"getAllOperations error, class %s, err: %s"
,
t
,
e
));
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
catch
(
NoClassDefFoundError
e
)
{
log
.
warn
(
"getAllOperations error, If you do not have this class, please add the corresponding dependency. Operation: {}."
,
t
,
e
);
return
null
;
}
}
})
})
.
filter
(
Objects:
:
nonNull
)
.
toArray
(
Operation
[]::
new
);
.
toArray
(
Operation
[]::
new
);
}
}
...
...
pom.xml
View file @
37655060
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
<maven-surefire-plugin.version>
3.0.0-M5
</maven-surefire-plugin.version>
<maven-surefire-plugin.version>
3.0.0-M5
</maven-surefire-plugin.version>
<maven.compiler.source>
${target.java.version}
</maven.compiler.source>
<maven.compiler.source>
${target.java.version}
</maven.compiler.source>
<maven.compiler.target>
${target.java.version}
</maven.compiler.target>
<maven.compiler.target>
${target.java.version}
</maven.compiler.target>
<maven.resource.version>
3.
2.0
</maven.resource.version>
<maven.resource.version>
3.
3.1
</maven.resource.version>
<mockito.version>
3.12.4
</mockito.version>
<mockito.version>
3.12.4
</mockito.version>
<mybatis-plus-boot-starter.version>
3.5.3.1
</mybatis-plus-boot-starter.version>
<mybatis-plus-boot-starter.version>
3.5.3.1
</mybatis-plus-boot-starter.version>
<mysql-connector-java.version>
8.0.28
</mysql-connector-java.version>
<mysql-connector-java.version>
8.0.28
</mysql-connector-java.version>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment