You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by ToivoAdams <gi...@git.apache.org> on 2016/09/04 11:12:52 UTC

[GitHub] nifi pull request #986: Nifi 2381

GitHub user ToivoAdams opened a pull request:

    https://github.com/apache/nifi/pull/986

    Nifi 2381

    Connection Pooling Service -Drop invalid connections and create new ones done.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ToivoAdams/nifi nifi-2381

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/986.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #986
    
----
commit c9c107763cf56f8017a6abb04adec86cd6e10331
Author: Toivo Adams <to...@gmail.com>
Date:   2016-09-04T10:40:24Z

    nifi-2381 Connection Pooling Service -Drop invalid connections and create new ones.

commit 33ebd9e61f32281951095096a7baacdd1acf8709
Author: Toivo Adams <to...@gmail.com>
Date:   2016-09-04T11:10:21Z

    nifi-2381 Connection Pooling Service -Drop invalid connections and create new ones. Cleanup.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #986: Nifi 2381

Posted by pvillard31 <gi...@git.apache.org>.
Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/986#discussion_r79215094
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/pom.xml ---
    @@ -52,7 +52,32 @@
                 <groupId>org.apache.derby</groupId>
                 <artifactId>derby</artifactId>
             </dependency>        
    -        <dependency>
    +		<dependency>
    +		    <groupId>org.apache.derby</groupId>
    +		    <artifactId>derbynet</artifactId>
    +		    <version>10.11.1.1</version>
    +		    <scope>test</scope>
    +		</dependency>        
    +		<dependency>
    +		    <groupId>org.apache.derby</groupId>
    +		    <artifactId>derbytools</artifactId>
    +		    <version>10.11.1.1</version>
    +		    <scope>test</scope>
    +		</dependency>
    +		<dependency>
    +		    <groupId>org.apache.derby</groupId>
    +		    <artifactId>derbyclient</artifactId>
    +		    <version>10.11.1.1</version>
    +		    <scope>test</scope>
    +		</dependency>
    +		<dependency>
    +    		<groupId>com.h2database</groupId>
    +    		<artifactId>h2</artifactId>
    +    		<version>1.4.192</version>
    +    		<scope>test</scope>
    +		</dependency>
    +		
    +		<dependency>
    --- End diff --
    
    Can you take care of indentation?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #986: Nifi 2381

Posted by pvillard31 <gi...@git.apache.org>.
Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/986#discussion_r79215471
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/dbcp/DBCPConnectionPool.java ---
    @@ -171,6 +184,11 @@ public void onConfigured(final ConfigurationContext context) throws Initializati
             dataSource.setMaxWait(maxWaitMillis);
             dataSource.setMaxActive(maxTotal);
     
    +        if (validationQuery!=null && validationQuery.isEmpty()==false) {
    --- End diff --
    
    ````
    validationQuery.isEmpty()==false
    ````
    to be replaced by
    ````
    !validationQuery.isEmpty()
    ````


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #986: Nifi 2381

Posted by pvillard31 <gi...@git.apache.org>.
Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/986#discussion_r79214997
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-api/src/main/java/org/apache/nifi/dbcp/DBCPService.java ---
    @@ -31,4 +31,5 @@
     @CapabilityDescription("Provides Database Connection Pooling Service. Connections can be asked from pool and returned after usage.")
     public interface DBCPService extends ControllerService {
         public Connection getConnection()  throws ProcessException;
    +
    --- End diff --
    
    Unnecessary change


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #986: Nifi 2381

Posted by pvillard31 <gi...@git.apache.org>.
Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/986#discussion_r79215236
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/dbcp/DBCPConnectionPool.java ---
    @@ -114,6 +114,17 @@
             .sensitive(false)
             .build();
     
    +    public static final PropertyDescriptor VALIDATION_QUERY = new PropertyDescriptor.Builder()
    +            .name("Validation query")
    --- End diff --
    
    Please when adding new property, think about .displayName() and .name()


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #986: Nifi 2381

Posted by pvillard31 <gi...@git.apache.org>.
Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/986#discussion_r79215329
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/dbcp/DBCPConnectionPool.java ---
    @@ -114,6 +114,17 @@
             .sensitive(false)
             .build();
     
    +    public static final PropertyDescriptor VALIDATION_QUERY = new PropertyDescriptor.Builder()
    +            .name("Validation query")
    +            .description("Validation query used to validate connections before returning them."
    +                + "When connection is invalid, it get's dropped and new valid connection will be returned."
    --- End diff --
    
    Cosmetic: white spaces in the description ;)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #986: Nifi 2381

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/986


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #986: Nifi 2381

Posted by pvillard31 <gi...@git.apache.org>.
Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/986#discussion_r79215167
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/dbcp/DBCPConnectionPool.java ---
    @@ -114,6 +114,17 @@
             .sensitive(false)
             .build();
     
    +    public static final PropertyDescriptor VALIDATION_QUERY = new PropertyDescriptor.Builder()
    +            .name("Validation query")
    +            .description("Validation query used to validate connections before returning them."
    +                + "When connection is invalid, it get's dropped and new valid connection will be returned."
    +                + "Note!! Using validation might have some performance penalty.")
    +            .defaultValue(null)
    --- End diff --
    
    I don't think default value to null is necessary.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #986: Nifi 2381

Posted by ToivoAdams <gi...@git.apache.org>.
Github user ToivoAdams commented on the issue:

    https://github.com/apache/nifi/pull/986
  
    Hi @pvillard31 
    
    I did changes.
    Thank you for reviewing.
    Toivo


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---