forked from apache/linkis
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cross-cluster rule configuration
- Loading branch information
Showing
58 changed files
with
5,110 additions
and
302 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
...nfiguration/src/main/java/org/apache/linkis/configuration/conf/AcrossClusterRuleKeys.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,43 @@ | ||
/* | ||
* 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.linkis.configuration.conf; | ||
|
||
public class AcrossClusterRuleKeys { | ||
|
||
public static final String KEY_QUEUE_SUFFIX = "suffix"; | ||
|
||
public static final String KEY_ACROSS_CLUSTER_QUEUE_SUFFIX = "bdap2bdp"; | ||
|
||
public static final String KEY_START_TIME = "startTime"; | ||
|
||
public static final String KEY_END_TIME = "endTime"; | ||
|
||
public static final String KEY_CPU_THRESHOLD = "CPUThreshold"; | ||
|
||
public static final String KEY_MEMORY_THRESHOLD = "MemoryThreshold"; | ||
|
||
public static final String KEY_CPU_PERCENTAGE_THRESHOLD = "CPUPercentageThreshold"; | ||
|
||
public static final String KEY_MEMORY_PERCENTAGE_THRESHOLD = "MemoryPercentageThreshold"; | ||
|
||
public static final String KEY_QUEUE_RULE = "queueRule"; | ||
|
||
public static final String KEY_TIME_RULE = "timeRule"; | ||
|
||
public static final String KEY_THRESHOLD_RULE = "thresholdRule"; | ||
} |
43 changes: 43 additions & 0 deletions
43
...figuration/src/main/java/org/apache/linkis/configuration/dao/AcrossClusterRuleMapper.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,43 @@ | ||
/* | ||
* 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.linkis.configuration.dao; | ||
|
||
import org.apache.linkis.configuration.entity.AcrossClusterRule; | ||
|
||
import org.apache.ibatis.annotations.Param; | ||
|
||
import java.util.List; | ||
|
||
public interface AcrossClusterRuleMapper { | ||
|
||
AcrossClusterRule getAcrossClusterRule(@Param("id") Long id); | ||
|
||
void deleteAcrossClusterRule( | ||
@Param("creator") String creator, @Param("username") String username); | ||
|
||
void updateAcrossClusterRule(@Param("acrossClusterRule") AcrossClusterRule acrossClusterRule); | ||
|
||
void insertAcrossClusterRule(@Param("acrossClusterRule") AcrossClusterRule acrossClusterRule); | ||
|
||
List<AcrossClusterRule> queryAcrossClusterRuleList( | ||
@Param("username") String username, | ||
@Param("creator") String creator, | ||
@Param("clusterName") String clusterName); | ||
|
||
void validAcrossClusterRule(@Param("isValid") String isValid, @Param("id") Long id); | ||
} |
40 changes: 40 additions & 0 deletions
40
...ration/src/main/java/org/apache/linkis/configuration/dao/ConfigKeyLimitForUserMapper.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 @@ | ||
/* | ||
* 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.linkis.configuration.dao; | ||
|
||
import org.apache.linkis.configuration.entity.ConfigKeyLimitForUser; | ||
import org.apache.linkis.configuration.entity.ConfigKeyLimitVo; | ||
|
||
import org.apache.ibatis.annotations.Param; | ||
|
||
import java.util.List; | ||
|
||
/** for table linkis_ps_configuration_key_limit_for_user @Description */ | ||
public interface ConfigKeyLimitForUserMapper { | ||
|
||
int batchInsertList(List<ConfigKeyLimitForUser> list); | ||
|
||
int updateByPrimaryKey(ConfigKeyLimitForUser configKeyLimitForUser); | ||
|
||
int batchInsertOrUpdateList(List<ConfigKeyLimitForUser> list); | ||
|
||
List<ConfigKeyLimitVo> selectByLabelAndKeyIds( | ||
@Param("label") String label, @Param("keyIdList") List<Long> keyIdList); | ||
|
||
ConfigKeyLimitVo selectByLabelAndKeyId(@Param("label") String label, @Param("keyId") Long keyId); | ||
} |
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
49 changes: 49 additions & 0 deletions
49
...figuration/src/main/java/org/apache/linkis/configuration/dao/TemplateConfigKeyMapper.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,49 @@ | ||
/* | ||
* 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.linkis.configuration.dao; | ||
|
||
import org.apache.linkis.configuration.entity.TemplateConfigKey; | ||
import org.apache.linkis.configuration.entity.TemplateConfigKeyVO; | ||
|
||
import org.apache.ibatis.annotations.Param; | ||
|
||
import java.util.List; | ||
|
||
/** The dao interface class of the linkis_ps_configuration_template_config_key table @Description */ | ||
public interface TemplateConfigKeyMapper { | ||
|
||
int batchInsertList(List<TemplateConfigKey> list); | ||
|
||
List<TemplateConfigKey> selectListByTemplateUuid(@Param("templateUuid") String templateUuid); | ||
|
||
int deleteByTemplateUuidAndKeyIdList( | ||
@Param("templateUuid") String templateUuid, @Param("keyIdList") List<Long> KeyIdList); | ||
|
||
int batchInsertOrUpdateList(List<TemplateConfigKey> list); | ||
|
||
List<TemplateConfigKey> selectListByTemplateUuidList( | ||
@Param("templateUuidList") List<String> templateUuidList); | ||
|
||
List<TemplateConfigKeyVO> selectInfoListByTemplateUuid( | ||
@Param("templateUuid") String templateUuid); | ||
|
||
List<TemplateConfigKeyVO> selectInfoListByTemplateName( | ||
@Param("templateName") String templateName); | ||
|
||
List<String> selectEngineTypeByTemplateUuid(@Param("templateUuid") String templateUuid); | ||
} |
37 changes: 37 additions & 0 deletions
37
.../linkis-configuration/src/main/java/org/apache/linkis/configuration/dao/UserIpMapper.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,37 @@ | ||
/* | ||
* 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.linkis.configuration.dao; | ||
|
||
import org.apache.linkis.configuration.entity.UserIpVo; | ||
|
||
import org.apache.ibatis.annotations.Param; | ||
|
||
import java.util.List; | ||
|
||
public interface UserIpMapper { | ||
|
||
List<UserIpVo> queryUserIPList(@Param("user") String user, @Param("creator") String creator); | ||
|
||
void deleteUserIP(Integer id); | ||
|
||
void updateUserIP(UserIpVo userIpVo); | ||
|
||
void createUserIP(UserIpVo userIpVo); | ||
|
||
UserIpVo queryUserIP(@Param("user") String user, @Param("creator") String creator); | ||
} |
40 changes: 40 additions & 0 deletions
40
...kis-configuration/src/main/java/org/apache/linkis/configuration/dao/UserTenantMapper.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 @@ | ||
/* | ||
* 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.linkis.configuration.dao; | ||
|
||
import org.apache.linkis.configuration.entity.TenantVo; | ||
|
||
import org.apache.ibatis.annotations.Param; | ||
|
||
import java.util.List; | ||
|
||
public interface UserTenantMapper { | ||
|
||
List<TenantVo> queryTenantList( | ||
@Param("user") String user, | ||
@Param("creator") String creator, | ||
@Param("tenant_value") String tenant); | ||
|
||
void deleteTenant(@Param("id") Integer id); | ||
|
||
void updateTenant(TenantVo tenantVo); | ||
|
||
void createTenant(TenantVo tenantVo); | ||
|
||
TenantVo queryTenant(@Param("user") String user, @Param("creator") String creator); | ||
} |
Oops, something went wrong.