Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BIGTOP-4190: Remove nop stack and mock real stack on dev mode #48

Merged
merged 3 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions bigtop-manager-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@
<artifactId>bigtop-manager-stack-bigtop</artifactId>
</dependency>

<dependency>
<groupId>org.apache.bigtop</groupId>
<artifactId>bigtop-manager-stack-nop</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
public class Environments {

/**
* Indicates whether the application is running in development mode, which is disabled by default.
* In development mode, only NOP stacks are available and no real shell commands will be executed on the agent side.
* Indicates whether the application is running in development mode.
* In development mode, most tasks run on agent side will be proxied and return success by default.
* This should help developers test framework functions without depending on the existence of big data components.
*/
public static Boolean isDevMode() {
String devMode = System.getenv("DEV_MODE");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package org.apache.bigtop.manager.server.utils;

import org.apache.bigtop.manager.common.enums.Command;
import org.apache.bigtop.manager.common.utils.Environments;
import org.apache.bigtop.manager.common.utils.JsonUtils;
import org.apache.bigtop.manager.server.exception.ApiException;
import org.apache.bigtop.manager.server.exception.ServerException;
Expand Down Expand Up @@ -77,8 +76,6 @@ public class StackUtils {

private static final String DEPENDENCY_FILE_NAME = "order.json";

private static final String NOP_STACK = "nop";

private static final Map<String, Map<String, List<String>>> STACK_DEPENDENCY_MAP = new HashMap<>();

private static final Map<String, Map<String, List<TypeConfigDTO>>> STACK_CONFIG_MAP = new HashMap<>();
Expand Down Expand Up @@ -202,13 +199,6 @@ public static Map<StackDTO, List<ServiceDTO>> stackList() {

for (File stackFolder : stackFolders) {
String stackName = stackFolder.getName();

// If in dev mode, only parse nop stack
// If not in dev mode, skip nop stack
if (Environments.isDevMode() != stackName.equals(NOP_STACK)) {
continue;
}

File[] versionFolders = Optional.ofNullable(stackFolder.listFiles()).orElse(new File[0]);

for (File versionFolder : versionFolders) {
Expand Down

This file was deleted.

Loading
Loading