Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Current state: Work In Progress

Discussion threadhere

JIRA

Motivation

There have been a few motivations for this work. Firstly, while leveraging KnoxShell classes and scripting to test Apache Knox releases, it became obvious that there was no easy way actually test Hive integrations.

...

While investigating this as a feature, it became clear that in order to accomplish KNOX-174 [ 2 ]we needed to have a better table rendering capability.

In the development of KnoShellTable KnoxShellTable [ 3 ], and the use of its fluent API within the groovy based KnoxShell environment it became evident that this would be a powerful tool within KnoxShell for all sorts of tabular data.

...

  • UC-1: JDBC Resultset Representations
  • UC-2: CSV Representations
  • UC-3: General Table Operations
    • Builders
    • Joining
    • Sorting, Selecting, Filtering, Calculations
  • UC-4: Persistence and Publishing
  • UC-5: KnoxLine SQL Shell (leveraging UC-1)
  • UC-6: Custom GroovySh Commands

UC-1: JDBC Resultset Representations

...

1 is the blog post that describes this capability.

Another KIP will represent additional KnoxShell improvements regarding KnoxShellTable that will make the use of the JDBC builder much easier and show why this particular usecase may not be required.

...

UC-6: Custom GroovySh Commands

Groovy shell has the ability to extend the commands available to help automate scripting or coding that you would otherwise need to do programmatically over and over.

By providing custom commands for KnoxShellTable operations,  builders and manipulation we can greatly simplify what would need to be done with the fluent API of KnoxShellTable and groovy/java code for saving state, etc.

Commands to be proposed:

  • Datasources (:datasource|:ds) CRUD and select operations for a set of JDBC datasources that are persisted to disk (KNOX-2128)
  • SQL (:SQL|:sql) SQL query execution with persisted SQL history per datasource (KNOX-2128)
  • JSON and CSV (:JSON|:json, :CSV|:csv) Import and Export from CSV and JSON formats
  • Table (:Table|:table) General table operations and aggregation/summaries of a table or datasets
  • Mount (:Mount|:mnt) Ability to mount a Knox and topology with metadata describing the exposed UIs, APIs and datasources to a given name from metadata exposed by a Knox API
  • POSIX style filesystem commands for HDFS and cloud storage (:ls, :rm, :mkdir, :chmod, :chown, :cat, :put, etc)

Resources

  1. SQL Client Example using KnoxShell in Apache Knox
  2. Jira
    serverASF JIRA
    serverId5aa69414-a9e9-3523-82ec-879b028fb15b
    keyKNOX-1742
  3. Jira
    serverASF JIRA
    serverId5aa69414-a9e9-3523-82ec-879b028fb15b
    keyKNOX-2002