You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2018/07/26 02:18:10 UTC

[incubator-dubbo] branch 2.6.3-release updated (cb6f772 -> 47a4876)

This is an automated email from the ASF dual-hosted git repository.

liujun pushed a change to branch 2.6.3-release
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git.


    from cb6f772  Updage changes for 2.6.3
     new 0f36a05  Merge #2114 mannually from master, enable configuration of Consumer thread pool.
     new 47a4876  Merge #2114 mannually from master, enable configuration of Consumer thread pool.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../com/alibaba/dubbo/config/ConsumerConfig.java   | 48 ++++++++++++++++++++++
 .../alibaba/dubbo/config/ConsumerConfigTest.java   | 28 +++++++++++++
 .../src/main/resources/META-INF/compat/dubbo.xsd   | 20 +++++++++
 .../src/main/resources/META-INF/dubbo.xsd          | 20 +++++++++
 4 files changed, 116 insertions(+)


[incubator-dubbo] 02/02: Merge #2114 mannually from master, enable configuration of Consumer thread pool.

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch 2.6.3-release
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git

commit 47a4876a77823694464975251c8a163ad29d364e
Author: ken.lj <ke...@gmail.com>
AuthorDate: Thu Jul 26 10:17:51 2018 +0800

    Merge #2114 mannually from master, enable configuration of Consumer thread pool.
---
 .../com/alibaba/dubbo/config/ConsumerConfig.java   | 48 ++++++++++++++++++++++
 .../alibaba/dubbo/config/ConsumerConfigTest.java   | 28 +++++++++++++
 2 files changed, 76 insertions(+)

diff --git a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ConsumerConfig.java b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ConsumerConfig.java
index fcf96de..a16ec93 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ConsumerConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ConsumerConfig.java
@@ -31,6 +31,18 @@ public class ConsumerConfig extends AbstractReferenceConfig {
     // networking framework client uses: netty, mina, etc.
     private String client;
 
+    // consumer thread pool type: cached, fixed, limit, eager
+    private String threadpool;
+
+    // consumer threadpool core thread size
+    private Integer corethreads;
+
+    // consumer threadpool thread size
+    private Integer threads;
+
+    // consumer threadpool queue size
+    private Integer queues;
+
     @Override
     public void setTimeout(Integer timeout) {
         super.setTimeout(timeout);
@@ -56,4 +68,40 @@ public class ConsumerConfig extends AbstractReferenceConfig {
     public void setClient(String client) {
         this.client = client;
     }
+
+    public String getThreadpool() {
+        return threadpool;
+    }
+
+    public void setThreadpool(String threadpool) {
+        this.threadpool = threadpool;
+    }
+
+    public Boolean getDefault() {
+        return isDefault;
+    }
+
+    public Integer getCorethreads() {
+        return corethreads;
+    }
+
+    public void setCorethreads(Integer corethreads) {
+        this.corethreads = corethreads;
+    }
+
+    public Integer getThreads() {
+        return threads;
+    }
+
+    public void setThreads(Integer threads) {
+        this.threads = threads;
+    }
+
+    public Integer getQueues() {
+        return queues;
+    }
+
+    public void setQueues(Integer queues) {
+        this.queues = queues;
+    }
 }
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/ConsumerConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/ConsumerConfigTest.java
index 4eb2d49..6e288a3 100644
--- a/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/ConsumerConfigTest.java
+++ b/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/ConsumerConfigTest.java
@@ -50,4 +50,32 @@ public class ConsumerConfigTest {
         consumer.setClient("client");
         assertThat(consumer.getClient(), equalTo("client"));
     }
+
+    @Test
+    public void testThreadpool() throws Exception {
+        ConsumerConfig consumer = new ConsumerConfig();
+        consumer.setThreadpool("fixed");
+        assertThat(consumer.getThreadpool(), equalTo("fixed"));
+    }
+
+    @Test
+    public void testCorethreads() throws Exception {
+        ConsumerConfig consumer = new ConsumerConfig();
+        consumer.setCorethreads(10);
+        assertThat(consumer.getCorethreads(), equalTo(10));
+    }
+
+    @Test
+    public void testThreads() throws Exception {
+        ConsumerConfig consumer = new ConsumerConfig();
+        consumer.setThreads(20);
+        assertThat(consumer.getThreads(), equalTo(20));
+    }
+
+    @Test
+    public void testQueues() throws Exception {
+        ConsumerConfig consumer = new ConsumerConfig();
+        consumer.setQueues(5);
+        assertThat(consumer.getQueues(), equalTo(5));
+    }
 }


[incubator-dubbo] 01/02: Merge #2114 mannually from master, enable configuration of Consumer thread pool.

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch 2.6.3-release
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git

commit 0f36a0517d11f2613a7cf989a37657d4a2c0ff19
Author: tswstarplanet <ts...@163.com>
AuthorDate: Wed Jul 25 10:32:39 2018 +0800

    Merge #2114 mannually from master, enable configuration of Consumer thread pool.
---
 .../src/main/resources/META-INF/compat/dubbo.xsd     | 20 ++++++++++++++++++++
 .../src/main/resources/META-INF/dubbo.xsd            | 20 ++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
index 9106914..2dbdde1 100644
--- a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
+++ b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
@@ -708,6 +708,26 @@
                         <xsd:documentation><![CDATA[ Transporter layer framework: netty mina.... ]]></xsd:documentation>
                     </xsd:annotation>
                 </xsd:attribute>
+                <xsd:attribute name="threadpool" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ Consumer threadpool: cached, fixed, limited, eager]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+                <xsd:attribute name="corethreads" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool core threads size. ]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+                <xsd:attribute name="threads" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool size. ]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+                <xsd:attribute name="queues" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool queue size. ]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
                 <xsd:anyAttribute namespace="##other" processContents="lax"/>
             </xsd:extension>
         </xsd:complexContent>
diff --git a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
index 4efbc58..0c17e24 100644
--- a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
+++ b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
@@ -708,6 +708,26 @@
                         <xsd:documentation><![CDATA[ Transporter layer framework: netty mina.... ]]></xsd:documentation>
                     </xsd:annotation>
                 </xsd:attribute>
+                <xsd:attribute name="threadpool" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ Consumer threadpool: cached, fixed, limited, eager]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+                <xsd:attribute name="corethreads" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool core threads size. ]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+                <xsd:attribute name="threads" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool size. ]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+                <xsd:attribute name="queues" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool queue size. ]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
                 <xsd:anyAttribute namespace="##other" processContents="lax"/>
             </xsd:extension>
         </xsd:complexContent>