Skip to content

Commit

Permalink
BIGTOP-4322: Add SeaTunnel to extra stack
Browse files Browse the repository at this point in the history
  • Loading branch information
wuchunfu committed Jan 16, 2025
1 parent 1ab9238 commit 48d151f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,9 @@

<components>
<component>
<name>seatunnel_master</name>
<display-name>SeaTunnel Master</display-name>
<category>master</category>
<cardinality>1+</cardinality>
</component>

<component>
<name>seatunnel_worker</name>
<display-name>SeaTunnel Worker</display-name>
<category>worker</category>
<name>seatunnel_server</name>
<display-name>SeaTunnel Server</display-name>
<category>server</category>
<cardinality>1+</cardinality>
</component>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
{
"SEATUNNEL_WORKER-START": [
"SEATUNNEL_MASTER-START"
],
"SEATUNNEL_MASTER-STOP": [
"SEATUNNEL_WORKER-STOP"
]
}
{}
Original file line number Diff line number Diff line change
Expand Up @@ -19,57 +19,14 @@
package org.apache.bigtop.manager.stack.extra.param;

import org.apache.bigtop.manager.common.message.entity.payload.CommandPayload;
import org.apache.bigtop.manager.common.utils.Environments;
import org.apache.bigtop.manager.stack.core.spi.param.BaseParams;

import org.apache.commons.lang3.SystemUtils;

import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.io.File;

@Slf4j
@NoArgsConstructor
public abstract class ExtraParams extends BaseParams {

protected ExtraParams(CommandPayload commandPayload) {
super(commandPayload);
}

/**
* Extra stack do not belong to any cluster, so we need to override this and provide a group name
*
* @return group name
*/
@Override
public String group() {
return "extra";
}

/**
* Extra stack do not belong to any cluster, we cannot use stack home of cluster
*
* @return group name
*/
@Override
public String stackHome() {
// Parent path of agent dir, which is bigtop-manager-agent/../
String parentPath;
if (Environments.isDevMode()) {
return SystemUtils.getUserDir().getParentFile().getPath();
} else {
parentPath = new File(ExtraParams.class
.getProtectionDomain()
.getCodeSource()
.getLocation()
.getPath())
.getParentFile()
.getParentFile()
.getParentFile()
.getPath();
}

return parentPath + "/extras";
}
}

0 comments on commit 48d151f

Please sign in to comment.