Skip to content

Commit 7b72c7a

Browse files
Davidhua1996jefftlin
authored andcommitted
Init the component of stream material container.
1 parent 77094b3 commit 7b72c7a

7 files changed

Lines changed: 85 additions & 0 deletions

File tree

streamis-jobmanager/streamis-job-launcher/streamis-job-launcher-service/src/main/scala/com/webank/wedatasphere/streamis/jobmanager/launcher/conf/JobConfKeyConstants.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,9 @@ object JobConfKeyConstants {
8989
* Alert level
9090
*/
9191
val ALERT_LEVEL: CommonVars[String] = CommonVars("wds.streamis.job.config.key.alert.level", "wds.linkis.flink.alert.level")
92+
93+
/**
94+
* Material model
95+
*/
96+
val MATERIAL_MODEL: CommonVars[String] = CommonVars("wds.streamis.job.config.key.material.model", "wds.streamis.job.material.model")
9297
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.webank.wedatasphere.streamis.jobmanager.manager.dao;
2+
3+
/**
4+
* Mapper of stream file(material)
5+
*/
6+
public interface StreamFileMapper {
7+
8+
}

streamis-jobmanager/streamis-job-manager/streamis-job-manager-service/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,17 @@
3131
<properties>
3232
<maven.compiler.source>8</maven.compiler.source>
3333
<maven.compiler.target>8</maven.compiler.target>
34+
<junit.version>4.12</junit.version>
3435
</properties>
3536

3637
<dependencies>
38+
<!--Junit-->
39+
<dependency>
40+
<groupId>junit</groupId>
41+
<artifactId>junit</artifactId>
42+
<version>${junit.version}</version>
43+
<scope>test</scope>
44+
</dependency>
3745
<dependency>
3846
<groupId>com.webank.wedatasphere.streamis</groupId>
3947
<artifactId>streamis-job-manager-base</artifactId>

streamis-jobmanager/streamis-job-manager/streamis-job-manager-service/src/main/scala/com/webank/wedatasphere/streamis/jobmanager/manager/conf/JobConf.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ object JobConf {
3939
*/
4040
val STREAMIS_JOB_LOG_COLLECT_PATH: CommonVars[String] = CommonVars("wds.streamis.job.log.collect.path", "/api/rest_j/v1/streamis/streamJobManager/log/collect/events")
4141

42+
/**
43+
* Enable to use material container
44+
*/
45+
val STREAMIS_JOB_MATERIAL_CONTAINER_ENABLE: CommonVars[Boolean] = CommonVars("wds.streamis.job.material.container.enable", false)
46+
4247
val FLINK_JOB_STATUS_NOT_STARTED: CommonVars[Int] = CommonVars("wds.streamis.job.status.not-started", 0,"Not Started")
4348

4449
val FLINK_JOB_STATUS_COMPLETED: CommonVars[Int] = CommonVars("wds.streamis.job.status.completed", 1,"Completed")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package com.webank.wedatasphere.streamis.jobmanager.manager.material
2+
3+
import com.webank.wedatasphere.streamis.jobmanager.manager.entity.StreamisFile
4+
import java.util
5+
/**
6+
* Define the stream file container
7+
*/
8+
trait StreamFileContainer {
9+
/**
10+
* Container name
11+
* @return
12+
*/
13+
def getContainerName: String
14+
15+
/**
16+
* Get stream files
17+
* @return
18+
*/
19+
def getStreamFiles: util.List[StreamisFile]
20+
21+
/**
22+
* Get stream files by match function
23+
* @param matchFunc match function
24+
* @return
25+
*/
26+
def getStreamFiles(matchFunc: StreamisFile => Boolean): util.List[StreamisFile]
27+
28+
/**
29+
* Get stream file by basename, model name and suffix
30+
* @param name name
31+
* @param model model
32+
* @param suffix suffix
33+
* @return
34+
*/
35+
def getStreamFile(name: String, model: String, suffix: String): StreamisFile
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.webank.wedatasphere.streamis.jobmanager.manager.material
2+
3+
import org.apache.linkis.common.conf.CommonVars
4+
5+
trait StreamFileLocalContainer extends StreamFileContainer {
6+
7+
}
8+
9+
object StreamFileLocalContainer{
10+
11+
val STORE_PATH: CommonVars[String] = CommonVars("wds.streamis.job.material.container.local.store-path", "material")
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.webank.wedatasphere.streamis.jobmanager.manager.material
2+
3+
import org.junit.Test
4+
5+
6+
class StreamFileContainerTest {
7+
@Test
8+
def scanAndLoadTheFile(): Unit = {
9+
print("hello")
10+
}
11+
}

0 commit comments

Comments
 (0)