You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by GitBox <gi...@apache.org> on 2022/10/14 09:52:33 UTC

[GitHub] [incubator-linkis] binbinCheng opened a new pull request, #3654: [NodeManagerMapper]The sql annotation form is optimized to XML

binbinCheng opened a new pull request, #3654:
URL: https://github.com/apache/incubator-linkis/pull/3654

   [NodeManagerMapper]The sql annotation form is optimized to XML
   
   Related issues: #3653 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] casionone commented on a diff in pull request #3654: [NodeManagerMapper]The sql annotation form is optimized to XML

Posted by GitBox <gi...@apache.org>.
casionone commented on code in PR #3654:
URL: https://github.com/apache/incubator-linkis/pull/3654#discussion_r996674372


##########
linkis-computation-governance/linkis-manager/linkis-manager-persistence/src/main/java/org/apache/linkis/manager/dao/impl/NodeManagerMapper.xml:
##########
@@ -29,7 +29,82 @@
         update linkis_cg_manager_label_service_instance set service_instance = #{instance} where service_instance = #{tickedId}
     </update>
 
+    <insert id="addNodeInstance" useGeneratedKeys="true" keyColumn="id" keyProperty="id"
+            parameterType="org.apache.linkis.manager.common.entity.persistence.PersistenceNode">
+        insert into linkis_cg_manager_service_instance(instance,name,owner,mark,update_time,create_time,updator,creator)
+        values(#{instance},#{name},#{owner},#{mark},#{updateTime},#{createTime},#{updator},#{creator})
+    </insert>
 
+    <update id="updateNodeInstance">

Review Comment:
   add parameterType 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] codecov[bot] commented on pull request #3654: [NodeManagerMapper]The sql annotation form is optimized to XML

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #3654:
URL: https://github.com/apache/incubator-linkis/pull/3654#issuecomment-1278835711

   # [Codecov](https://codecov.io/gh/apache/incubator-linkis/pull/3654?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#3654](https://codecov.io/gh/apache/incubator-linkis/pull/3654?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (01de605) into [dev-1.3.1](https://codecov.io/gh/apache/incubator-linkis/commit/8cc7422072aca1cdff6ed73aa39fd5e1eeb4df2d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8cc7422) will **decrease** coverage by `0.00%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@               Coverage Diff               @@
   ##             dev-1.3.1    #3654      +/-   ##
   ===============================================
   - Coverage        14.29%   14.28%   -0.01%     
   + Complexity        1523     1522       -1     
   ===============================================
     Files             1032     1032              
     Lines            38197    38197              
     Branches          5375     5375              
   ===============================================
   - Hits              5461     5458       -3     
   - Misses           32004    32007       +3     
     Partials           732      732              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-linkis/pull/3654?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...linkis/jobhistory/restful/api/QueryRestfulApi.java](https://codecov.io/gh/apache/incubator-linkis/pull/3654/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLXB1YmxpYy1lbmhhbmNlbWVudHMvbGlua2lzLWpvYmhpc3Rvcnkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2xpbmtpcy9qb2JoaXN0b3J5L3Jlc3RmdWwvYXBpL1F1ZXJ5UmVzdGZ1bEFwaS5qYXZh) | `28.67% <0.00%> (-3.50%)` | :arrow_down: |
   | [...apache/linkis/scheduler/queue/LoopArrayQueue.scala](https://codecov.io/gh/apache/incubator-linkis/pull/3654/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWNvbW1vbnMvbGlua2lzLXNjaGVkdWxlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2xpbmtpcy9zY2hlZHVsZXIvcXVldWUvTG9vcEFycmF5UXVldWUuc2NhbGE=) | `33.63% <0.00%> (+0.90%)` | :arrow_up: |
   | [...a/org/apache/linkis/scheduler/queue/Consumer.scala](https://codecov.io/gh/apache/incubator-linkis/pull/3654/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWNvbW1vbnMvbGlua2lzLXNjaGVkdWxlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2xpbmtpcy9zY2hlZHVsZXIvcXVldWUvQ29uc3VtZXIuc2NhbGE=) | `100.00% <0.00%> (+14.28%)` | :arrow_up: |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] jacktao007 commented on a diff in pull request #3654: [NodeManagerMapper]The sql annotation form is optimized to XML

Posted by GitBox <gi...@apache.org>.
jacktao007 commented on code in PR #3654:
URL: https://github.com/apache/incubator-linkis/pull/3654#discussion_r997090474


##########
linkis-computation-governance/linkis-manager/linkis-manager-persistence/src/main/java/org/apache/linkis/manager/dao/impl/NodeManagerMapper.xml:
##########
@@ -29,7 +29,82 @@
         update linkis_cg_manager_label_service_instance set service_instance = #{instance} where service_instance = #{tickedId}
     </update>
 
+    <insert id="addNodeInstance" useGeneratedKeys="true" keyColumn="id" keyProperty="id"
+            parameterType="org.apache.linkis.manager.common.entity.persistence.PersistenceNode">
+        insert into linkis_cg_manager_service_instance(instance,name,owner,mark,update_time,create_time,updator,creator)
+        values(#{instance},#{name},#{owner},#{mark},#{updateTime},#{createTime},#{updator},#{creator})
+    </insert>
 
+    <update id="updateNodeInstance">
+        update linkis_cg_manager_service_instance set instance = #{persistenceNode.instance}, owner = #{persistenceNode.owner},mark = #{persistenceNode.mark},name = #{persistenceNode.name},
+        update_time = #{persistenceNode.updateTime},updator = #{persistenceNode.updator},creator = #{persistenceNode.creator} where instance = #{instance}
+    </update>
+
+    <delete id="removeNodeInstance">
+        delete from  linkis_cg_manager_service_instance where instance = #{instance}
+    </delete>
+
+    <select id="getNodeInstancesByOwner" resultType="org.apache.linkis.manager.common.entity.persistence.PersistenceNode">
+        select * from  linkis_cg_manager_service_instance where owner = #{owner}
+    </select>
+    <select id="getAllNodes" resultType="org.apache.linkis.manager.common.entity.persistence.PersistenceNode">
+        select * from  linkis_cg_manager_service_instance
+    </select>
+
+    <update id="updateNodeInstanceOverload">
+        update linkis_cg_manager_service_instance set owner = #{persistenceNode.owner},mark = #{persistenceNode.mark},name = #{persistenceNode.name},
+        update_time = #{persistenceNode.updateTime},create_time = #{persistenceNode.createTime},updator = #{persistenceNode.updator}
+        ,creator = #{persistenceNode.creator} where instance = #{persistenceNode.instance}
+    </update>
+
+    <select id="getNodeInstanceId" resultType="java.lang.Integer">
+        select id from  linkis_cg_manager_service_instance where instance = #{instance}
+    </select>
+
+    <select id="getIdByInstance" resultType="java.lang.Integer">
+        select id from  linkis_cg_manager_service_instance where instance = #{instance}
+    </select>
+
+    <select id="getNodeInstanceIds" resultType="java.lang.Integer">
+            select id from linkis_cg_manager_service_instance where instance in(
+            <foreach collection='instances' separator=',' item='instance'>
+                #{instance}
+               </foreach> )
+    </select>
+
+    <select id="getNodeInstance" resultType="org.apache.linkis.manager.common.entity.persistence.PersistenceNode">
+        select * from linkis_cg_manager_service_instance where instance = #{instance}
+    </select>
+    <select id="getNodeInstanceById" resultType="org.apache.linkis.manager.common.entity.persistence.PersistenceNode">
+        select * from  linkis_cg_manager_service_instance where id = #{id}
+    </select>
+
+    <select id="getEMNodeInstanceByEngineNode" resultType="org.apache.linkis.manager.common.entity.persistence.PersistenceNode">
+        select * from linkis_cg_manager_service_instance where instance in
+        (select em_instance from linkis_cg_manager_engine_em where engine_instance=#{instance})
+    </select>
+
+    <select id="getNodeInstances" resultType="org.apache.linkis.manager.common.entity.persistence.PersistenceNode">
+        select * from linkis_cg_manager_service_instance where instance in
+        ( select engine_instance from linkis_cg_manager_engine_em where em_instance=#{instance})
+    </select>
+
+    <select id="getNodesByInstances" resultType="org.apache.linkis.manager.common.entity.persistence.PersistenceNode">
+            select * from linkis_cg_manager_service_instance where instance in(
+            <foreach collection='instances' separator=',' item='instance'>
+               #{instance}
+                </foreach>)
+    </select>
 
+    <insert id="addEngineNode">
+        insert into  linkis_cg_manager_engine_em (engine_instance, em_instance, update_time, create_time)
+        values(#{engineNodeInstance}, #{emNodeInstance}, now(), now())
+    </insert>
+    <delete id="deleteEngineNode">
+        delete from  linkis_cg_manager_engine_em where engine_instance = #{engineNodeInstance} and em_instance = #{emNodeInstance}
+    </delete>
+    <select id="getNodeInstanceIdsByOwner" resultType="java.lang.Integer">
+        select id from linkis_cg_manager_service_instance where owner = #{owner}
+    </select>
 
 </mapper>

Review Comment:
   no new line at end of file



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] jacktao007 merged pull request #3654: [NodeManagerMapper]The sql annotation form is optimized to XML

Posted by GitBox <gi...@apache.org>.
jacktao007 merged PR #3654:
URL: https://github.com/apache/incubator-linkis/pull/3654


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org