Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
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
zhaowei
dlink
Commits
4cdc327d
Commit
4cdc327d
authored
Jun 01, 2022
by
wenmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Fix-556][adimin,gateway] Fix flinkLibPath in K8S configuration is null
parent
9c06fc27
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
16 deletions
+17
-16
ClusterConfigurationServiceImpl.java
...m/dlink/service/impl/ClusterConfigurationServiceImpl.java
+4
-6
ClusterConfig.java
...src/main/java/com/dlink/gateway/config/ClusterConfig.java
+13
-5
KubernetesGateway.java
.../java/com/dlink/gateway/kubernetes/KubernetesGateway.java
+0
-5
No files found.
dlink-admin/src/main/java/com/dlink/service/impl/ClusterConfigurationServiceImpl.java
View file @
4cdc327d
...
@@ -50,18 +50,16 @@ public class ClusterConfigurationServiceImpl extends SuperServiceImpl<ClusterCon
...
@@ -50,18 +50,16 @@ public class ClusterConfigurationServiceImpl extends SuperServiceImpl<ClusterCon
GatewayConfig
gatewayConfig
=
new
GatewayConfig
();
GatewayConfig
gatewayConfig
=
new
GatewayConfig
();
if
(
config
.
containsKey
(
"hadoopConfigPath"
))
{
if
(
config
.
containsKey
(
"hadoopConfigPath"
))
{
gatewayConfig
.
setClusterConfig
(
ClusterConfig
.
build
(
config
.
get
(
"flinkConfigPath"
).
toString
(),
gatewayConfig
.
setClusterConfig
(
ClusterConfig
.
build
(
config
.
get
(
"flinkConfigPath"
).
toString
(),
config
.
get
(
"flinkLibPath"
).
toString
(),
config
.
get
(
"flinkLibPath"
).
toString
(),
config
.
get
(
"hadoopConfigPath"
).
toString
()));
config
.
get
(
"hadoopConfigPath"
).
toString
()));
}
else
{
}
else
{
gatewayConfig
.
setClusterConfig
(
ClusterConfig
.
build
(
config
.
get
(
"flinkConfigPath"
).
toString
(),
gatewayConfig
.
setClusterConfig
(
ClusterConfig
.
build
(
config
.
get
(
"flinkConfigPath"
).
toString
()));
config
.
get
(
"flinkLibPath"
).
toString
(),
""
));
}
}
if
(
config
.
containsKey
(
"flinkConfig"
))
{
if
(
config
.
containsKey
(
"flinkConfig"
))
{
gatewayConfig
.
setFlinkConfig
(
FlinkConfig
.
build
((
Map
<
String
,
String
>)
config
.
get
(
"flinkConfig"
)));
gatewayConfig
.
setFlinkConfig
(
FlinkConfig
.
build
((
Map
<
String
,
String
>)
config
.
get
(
"flinkConfig"
)));
}
}
if
(
Asserts
.
isEqualsIgnoreCase
(
clusterConfiguration
.
getType
(),
"Yarn"
))
{
if
(
Asserts
.
isEqualsIgnoreCase
(
clusterConfiguration
.
getType
(),
"Yarn"
))
{
gatewayConfig
.
setType
(
GatewayType
.
YARN_
PER_JOB
);
gatewayConfig
.
setType
(
GatewayType
.
YARN_
APPLICATION
);
}
else
if
(
Asserts
.
isEqualsIgnoreCase
(
clusterConfiguration
.
getType
(),
"Kubernetes"
))
{
}
else
if
(
Asserts
.
isEqualsIgnoreCase
(
clusterConfiguration
.
getType
(),
"Kubernetes"
))
{
gatewayConfig
.
setType
(
GatewayType
.
KUBERNETES_APPLICATION
);
gatewayConfig
.
setType
(
GatewayType
.
KUBERNETES_APPLICATION
);
Map
kubernetesConfig
=
(
Map
)
config
.
get
(
"kubernetesConfig"
);
Map
kubernetesConfig
=
(
Map
)
config
.
get
(
"kubernetesConfig"
);
...
...
dlink-gateway/src/main/java/com/dlink/gateway/config/ClusterConfig.java
View file @
4cdc327d
...
@@ -20,12 +20,20 @@ public class ClusterConfig {
...
@@ -20,12 +20,20 @@ public class ClusterConfig {
public
ClusterConfig
()
{
public
ClusterConfig
()
{
}
}
public
ClusterConfig
(
String
flinkConfigPath
)
{
this
.
flinkConfigPath
=
flinkConfigPath
;
}
public
ClusterConfig
(
String
flinkConfigPath
,
String
flinkLibPath
,
String
yarnConfigPath
)
{
public
ClusterConfig
(
String
flinkConfigPath
,
String
flinkLibPath
,
String
yarnConfigPath
)
{
this
.
flinkConfigPath
=
flinkConfigPath
;
this
.
flinkConfigPath
=
flinkConfigPath
;
this
.
flinkLibPath
=
flinkLibPath
;
this
.
flinkLibPath
=
flinkLibPath
;
this
.
yarnConfigPath
=
yarnConfigPath
;
this
.
yarnConfigPath
=
yarnConfigPath
;
}
}
public
static
ClusterConfig
build
(
String
flinkConfigPath
)
{
return
new
ClusterConfig
(
flinkConfigPath
);
}
public
static
ClusterConfig
build
(
String
flinkConfigPath
,
String
flinkLibPath
,
String
yarnConfigPath
)
{
public
static
ClusterConfig
build
(
String
flinkConfigPath
,
String
flinkLibPath
,
String
yarnConfigPath
)
{
return
new
ClusterConfig
(
flinkConfigPath
,
flinkLibPath
,
yarnConfigPath
);
return
new
ClusterConfig
(
flinkConfigPath
,
flinkLibPath
,
yarnConfigPath
);
}
}
...
@@ -33,10 +41,10 @@ public class ClusterConfig {
...
@@ -33,10 +41,10 @@ public class ClusterConfig {
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"ClusterConfig{"
+
return
"ClusterConfig{"
+
"flinkConfigPath='"
+
flinkConfigPath
+
'\''
+
"flinkConfigPath='"
+
flinkConfigPath
+
'\''
+
", flinkLibPath='"
+
flinkLibPath
+
'\''
+
", flinkLibPath='"
+
flinkLibPath
+
'\''
+
", yarnConfigPath='"
+
yarnConfigPath
+
'\''
+
", yarnConfigPath='"
+
yarnConfigPath
+
'\''
+
", appId='"
+
appId
+
'\''
+
", appId='"
+
appId
+
'\''
+
'}'
;
'}'
;
}
}
}
}
dlink-gateway/src/main/java/com/dlink/gateway/kubernetes/KubernetesGateway.java
View file @
4cdc327d
...
@@ -131,11 +131,6 @@ public abstract class KubernetesGateway extends AbstractGateway {
...
@@ -131,11 +131,6 @@ public abstract class KubernetesGateway extends AbstractGateway {
if
(
Asserts
.
isNull
(
config
.
getFlinkConfig
().
getJobId
()))
{
if
(
Asserts
.
isNull
(
config
.
getFlinkConfig
().
getJobId
()))
{
throw
new
GatewayException
(
"No job id was specified. Please specify a job to which you would like to savepont."
);
throw
new
GatewayException
(
"No job id was specified. Please specify a job to which you would like to savepont."
);
}
}
if
(
Asserts
.
isNotNullString
(
config
.
getClusterConfig
().
getYarnConfigPath
()))
{
configuration
=
GlobalConfiguration
.
loadConfiguration
(
config
.
getClusterConfig
().
getYarnConfigPath
());
}
else
{
configuration
=
new
Configuration
();
}
SavePointResult
result
=
SavePointResult
.
build
(
getType
());
SavePointResult
result
=
SavePointResult
.
build
(
getType
());
configuration
.
set
(
KubernetesConfigOptions
.
CLUSTER_ID
,
config
.
getClusterConfig
().
getAppId
());
configuration
.
set
(
KubernetesConfigOptions
.
CLUSTER_ID
,
config
.
getClusterConfig
().
getAppId
());
KubernetesClusterClientFactory
clusterClientFactory
=
new
KubernetesClusterClientFactory
();
KubernetesClusterClientFactory
clusterClientFactory
=
new
KubernetesClusterClientFactory
();
...
...
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