You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by jo...@apache.org on 2016/05/24 12:57:00 UTC

incubator-zeppelin git commit: [MINOR] Remove redundant logic of JDBC Interpreter

Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master 61f0a5c24 -> 19889c361


[MINOR] Remove redundant logic of JDBC Interpreter

### What is this PR for?
Removing redundant codes and expanding features for passing extra properties into JDBC driver

### What type of PR is it?
[Bug Fix | Improvement]

### Todos
* [x] - Removed logic

### What is the Jira issue?
* MINOR issue

### How should this be tested?
Just passed additional information into your JDBC

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? NO
* Is there breaking changes for older versions? NO
* Does this needs documentation? NO

Author: Jongyoul Lee <jo...@gmail.com>

Closes #909 from jongyoul/minor-remove-logic-for-check-user-pass-from-jdbc and squashes the following commits:

0a72a57 [Jongyoul Lee] [MINOR] Remove redundant logic of JDBC Interpreter  - Removed logic for checking user and pass from properties


Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/19889c36
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/19889c36
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/19889c36

Branch: refs/heads/master
Commit: 19889c3614eea4e7fb3d68f5bd64a1acda459efa
Parents: 61f0a5c
Author: Jongyoul Lee <jo...@gmail.com>
Authored: Sun May 22 23:34:19 2016 +0900
Committer: Jongyoul Lee <jo...@apache.org>
Committed: Tue May 24 21:56:41 2016 +0900

----------------------------------------------------------------------
 .../main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java  | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/19889c36/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
index 0c53281..da1a69d 100644
--- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
+++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
@@ -191,13 +191,7 @@ public class JDBCInterpreter extends Interpreter {
       logger.info(properties.getProperty(DRIVER_KEY));
       Class.forName(properties.getProperty(DRIVER_KEY));
       String url = properties.getProperty(URL_KEY);
-      String user = properties.getProperty(USER_KEY);
-      String password = properties.getProperty(PASSWORD_KEY);
-      if (null != user && null != password) {
-        connection = DriverManager.getConnection(url, user, password);
-      } else {
-        connection = DriverManager.getConnection(url, properties);
-      }
+      connection = DriverManager.getConnection(url, properties);
     }
     return connection;
   }