You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by luoyunpeng <gi...@git.apache.org> on 2017/08/20 12:07:27 UTC
[GitHub] incubator-trafodion pull request #1213: implement isValid function
GitHub user luoyunpeng opened a pull request:
https://github.com/apache/incubator-trafodion/pull/1213
implement isValid function
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/luoyunpeng/incubator-trafodion isValid
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/1213.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 #1213
----
commit 6f8796daa26c73519c8b526c34216777d7f046ef
Author: luoyunpeng <95...@qq.com>
Date: 2017-08-20T11:51:06Z
implement isValid function
----
---
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] incubator-trafodion pull request #1213: implement isValid function
Posted by luoyunpeng <gi...@git.apache.org>.
Github user luoyunpeng commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/1213#discussion_r134928929
--- Diff: core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4Connection.java ---
@@ -1876,9 +1876,57 @@ public SQLXML createSQLXML() throws SQLException {
return null;
}
- public boolean isValid(int timeout) throws SQLException {
- // TODO Auto-generated method stub
- return false;
+ public boolean isValid(int timeout) throws SQLException {
+ if (props_.t4Logger_.isLoggable(Level.FINE) == true) {
+ Object p[] = T4LoggingUtilities.makeParams(props_);
+ props_.t4Logger_.logp(Level.FINE, "TrafT4Connection", "isValid", "iValid", p);
+ }
+ if (props_.getLogWriter() != null) {
--- End diff --
no, the log will only be written when user of client set the log level to true and log writer is not null,
---
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] incubator-trafodion pull request #1213: implement isValid function
Posted by luoyunpeng <gi...@git.apache.org>.
Github user luoyunpeng closed the pull request at:
https://github.com/apache/incubator-trafodion/pull/1213
---
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] incubator-trafodion pull request #1213: implement isValid function
Posted by selvaganesang <gi...@git.apache.org>.
Github user selvaganesang commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/1213#discussion_r135030383
--- Diff: core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4Connection.java ---
@@ -1876,9 +1876,57 @@ public SQLXML createSQLXML() throws SQLException {
return null;
}
- public boolean isValid(int timeout) throws SQLException {
- // TODO Auto-generated method stub
- return false;
+ public boolean isValid(int timeout) throws SQLException {
+ if (props_.t4Logger_.isLoggable(Level.FINE) == true) {
+ Object p[] = T4LoggingUtilities.makeParams(props_);
+ props_.t4Logger_.logp(Level.FINE, "TrafT4Connection", "isValid", "iValid", p);
+ }
+ if (props_.getLogWriter() != null) {
--- End diff --
I meant to ask if the log will be written only when it is FINE. If so, you need to avoid create all these objects in java and then throw it out while logging because the log level is not set to FINE.
---
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] incubator-trafodion pull request #1213: implement isValid function
Posted by selvaganesang <gi...@git.apache.org>.
Github user selvaganesang commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/1213#discussion_r134927206
--- Diff: core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4Connection.java ---
@@ -1876,9 +1876,57 @@ public SQLXML createSQLXML() throws SQLException {
return null;
}
- public boolean isValid(int timeout) throws SQLException {
- // TODO Auto-generated method stub
- return false;
+ public boolean isValid(int timeout) throws SQLException {
+ if (props_.t4Logger_.isLoggable(Level.FINE) == true) {
+ Object p[] = T4LoggingUtilities.makeParams(props_);
+ props_.t4Logger_.logp(Level.FINE, "TrafT4Connection", "isValid", "iValid", p);
+ }
+ if (props_.getLogWriter() != null) {
--- End diff --
Does this mean the log will be written always?
---
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.
---