[ 
https://issues.apache.org/jira/browse/KNOX-1742?focusedWorklogId=374873&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-374873
 ]

ASF GitHub Bot logged work on KNOX-1742:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Jan/20 09:30
            Start Date: 21/Jan/20 09:30
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on pull request #241: KNOX-1742 - 
Simple SQL Client in KnoxShell for access to JDBC sources
URL: https://github.com/apache/knox/pull/241#discussion_r368891437
 
 

 ##########
 File path: 
gateway-shell/src/main/java/org/apache/knox/gateway/shell/jdbc/KnoxLine.java
 ##########
 @@ -0,0 +1,213 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.knox.gateway.shell.jdbc;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.knox.gateway.shell.CredentialCollectionException;
+import org.apache.knox.gateway.shell.Credentials;
+import org.apache.knox.gateway.shell.KnoxDataSource;
+import org.apache.knox.gateway.shell.KnoxSession;
+import org.apache.knox.gateway.shell.table.KnoxShellTable;
+
+public class KnoxLine {
+  String user;
+  String pass;
+  KnoxDataSource datasource;
+  Connection conn;
+
+  public void execute(String[] args)
 
 Review comment:
   You can ignore PMD's `DoNotUseThread` rule here like this.
   ```
   @SuppressWarnings("PMD.DoNotUseThreads") //we need to define a Thread to be 
able to register a shutdown hook
   ```
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 374873)
    Time Spent: 40m  (was: 0.5h)

> Simple SQL Client in KnoxShell for access to JDBC datasources
> -------------------------------------------------------------
>
>                 Key: KNOX-1742
>                 URL: https://issues.apache.org/jira/browse/KNOX-1742
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: KnoxShell
>            Reporter: Larry McCay
>            Assignee: Larry McCay
>            Priority: Major
>             Fix For: 1.5.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Let's take the following wiki article example and make it an actual feature 
> of KnoxShell: 
> https://cwiki.apache.org/confluence/display/KNOX/SQL+Client+Example+using+KnoxShell+in+Apache+Knox
> In order to make it a generic feature, we will need to do a number of things:
> # add a lib directory
> # add the HiveDriver - *maybe* - perhaps it is better to have the user 
> download the right version?
> # add commons-logging jar to lib directory
> # add a real table rendering class to the KnoxShell rather than embedded in 
> the SQL client script - so that other features and scripts can use it to 
> render results
> # add the knoxline.sh and hive2.groovy script to bin directory



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to