-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: container-type level version compatibility check
Signed-off-by: Keran Yang <[email protected]>
- Loading branch information
Showing
5 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
src/main/java/io/numaproj/numaflow/info/ContainerType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package io.numaproj.numaflow.info; | ||
|
||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
/** | ||
* the string content matches the corresponding server info file name. | ||
* DO NOT change it unless the server info file name is changed. | ||
*/ | ||
public enum ContainerType { | ||
Sourcer("sourcer"), | ||
Sourcetransformer("sourcetransformer"), | ||
Sinker("sinker"), | ||
Mapper("mapper"), | ||
Reducer("reducer"), | ||
Reducestreamer("reducestreamer"), | ||
Sessionreducer("sessionreducer"), | ||
Sideinput("sideinput"), | ||
Fbsinker("fb-sinker"), | ||
Unknown("unknown"); | ||
|
||
private final String name; | ||
|
||
ContainerType(String name) { | ||
this.name = name; | ||
} | ||
|
||
@JsonValue | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
public static ContainerType fromString(String text) { | ||
for (ContainerType b : ContainerType.values()) { | ||
if (b.name.equalsIgnoreCase(text)) { | ||
return b; | ||
} | ||
} | ||
return Unknown; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters