Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[INLONG-4220][Manager] Add StreamResourceProcessForm (#4234)
- Loading branch information
Showing
70 changed files
with
1,261 additions
and
422 deletions.
There are no files selected for viewing
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
@@ -0,0 +1,56 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.inlong.manager.common.pojo.workflow.form; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import org.apache.inlong.manager.common.enums.GroupOperateType; | ||
import org.apache.inlong.manager.common.exceptions.FormValidateException; | ||
import org.apache.inlong.manager.common.pojo.group.InlongGroupInfo; | ||
import org.apache.inlong.manager.common.pojo.stream.InlongStreamInfo; | ||
|
||
/** | ||
* Form of create inlong stream resource | ||
*/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = false) | ||
public class StreamResourceProcessForm extends BaseProcessForm { | ||
|
||
public static final String FORM_NAME = "StreamResourceProcessForm"; | ||
|
||
private InlongGroupInfo groupInfo; | ||
|
||
private InlongStreamInfo streamInfo; | ||
|
||
private GroupOperateType groupOperateType = GroupOperateType.INIT; | ||
|
||
@Override | ||
public void validate() throws FormValidateException { | ||
|
||
} | ||
|
||
@Override | ||
public String getFormName() { | ||
return FORM_NAME; | ||
} | ||
|
||
@Override | ||
public String getInlongGroupId() { | ||
return groupInfo.getInlongGroupId(); | ||
} | ||
} |
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
@@ -0,0 +1,60 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.inlong.manager.service.core.impl; | ||
|
||
import com.google.common.util.concurrent.ThreadFactoryBuilder; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.apache.inlong.manager.service.core.InlongGroupService; | ||
import org.apache.inlong.manager.service.core.InlongStreamService; | ||
import org.apache.inlong.manager.service.workflow.WorkflowService; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.util.concurrent.ExecutorService; | ||
import java.util.concurrent.LinkedBlockingQueue; | ||
import java.util.concurrent.ThreadPoolExecutor; | ||
import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy; | ||
import java.util.concurrent.TimeUnit; | ||
|
||
/** | ||
* Operation related to inlong stream process | ||
*/ | ||
@Service | ||
@Slf4j | ||
public class InlongStreamProcessOperation { | ||
|
||
private final ExecutorService executorService = new ThreadPoolExecutor( | ||
20, | ||
40, | ||
0L, | ||
TimeUnit.MILLISECONDS, | ||
new LinkedBlockingQueue<>(), | ||
new ThreadFactoryBuilder().setNameFormat("inlong-stream-process-%s").build(), | ||
new CallerRunsPolicy()); | ||
|
||
@Autowired | ||
private InlongGroupService groupService; | ||
|
||
@Autowired | ||
private InlongStreamService streamService; | ||
|
||
@Autowired | ||
private WorkflowService workflowService; | ||
|
||
|
||
} |
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
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
Oops, something went wrong.