Skip to content

Commit

Permalink
fix hadoop
Browse files Browse the repository at this point in the history
  • Loading branch information
timyuer committed Sep 11, 2024
1 parent 96c4e27 commit 3729c08
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public PageVO<JobVO> list(Long clusterId) {
jobPOList = jobDao.findAllByClusterId(clusterId);
}
PageInfo<JobPO> pageInfo = new PageInfo<>(jobPOList);
List<JobPO> allByIdsJoin = jobDao.findAllByIdsJoin(jobPOList.stream().map(JobPO::getId).toList());
List<JobPO> allByIdsJoin =
jobDao.findAllByIdsJoin(jobPOList.stream().map(JobPO::getId).toList());
pageInfo.setList(allByIdsJoin);

return PageVO.of(pageInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public Map<String, Object> coreSite() {
Map<String, Object> coreSite = LocalSettings.configurations(serviceName(), "core-site");
List<String> namenodeList = LocalSettings.hosts("namenode");
if (!namenodeList.isEmpty()) {
coreSite.put("fs.defaultFS", ((String) coreSite.get("fs.defaultFS")).replace("localhost", namenodeList.get(0)));
coreSite.put(
"fs.defaultFS", ((String) coreSite.get("fs.defaultFS")).replace("localhost", namenodeList.get(0)));
}
return coreSite;
}
Expand All @@ -100,9 +101,15 @@ public Map<String, Object> hdfsSite() {
Map<String, Object> hdfsSite = LocalSettings.configurations(serviceName(), "hdfs-site");
List<String> namenodeList = LocalSettings.hosts("namenode");
if (!namenodeList.isEmpty()) {
hdfsSite.put("dfs.namenode.rpc-address", ((String) hdfsSite.get("dfs.namenode.rpc-address")).replace("0.0.0.0", namenodeList.get(0)));
hdfsSite.put("dfs.datanode.https.address", ((String) hdfsSite.get("dfs.datanode.https.address")).replace("0.0.0.0", namenodeList.get(0)));
hdfsSite.put("dfs.namenode.https-address", ((String) hdfsSite.get("dfs.namenode.https-address")).replace("0.0.0.0", namenodeList.get(0)));
hdfsSite.put(
"dfs.namenode.rpc-address",
((String) hdfsSite.get("dfs.namenode.rpc-address")).replace("0.0.0.0", namenodeList.get(0)));
hdfsSite.put(
"dfs.datanode.https.address",
((String) hdfsSite.get("dfs.datanode.https.address")).replace("0.0.0.0", namenodeList.get(0)));
hdfsSite.put(
"dfs.namenode.https-address",
((String) hdfsSite.get("dfs.namenode.https-address")).replace("0.0.0.0", namenodeList.get(0)));
}

dfsDataDir = (String) hdfsSite.get("dfs.datanode.data.dir");
Expand Down

0 comments on commit 3729c08

Please sign in to comment.