README.md in drill-sergeant-0.1.4 vs README.md in drill-sergeant-0.2.0

- old
+ new

@@ -1,14 +1,14 @@ -# Drill Sergeant +# Drill Ruby Ruby client for Apache Drill -[![Build Status](https://github.com/ankane/drill-sergeant/workflows/build/badge.svg?branch=master)](https://github.com/ankane/drill-sergeant/actions) +[![Build Status](https://github.com/ankane/drill-ruby/workflows/build/badge.svg?branch=master)](https://github.com/ankane/drill-ruby/actions) ## Installation -First, [install Apache Drill](https://drill.apache.org/docs/installing-drill-on-linux-and-mac-os-x/). For Homebrew, use: +First, [install Apache Drill](https://drill.apache.org/docs/install-drill-introduction/). For Homebrew, use: ```sh brew install apache-drill drill-embedded ``` @@ -17,16 +17,16 @@ ```ruby gem "drill-sergeant" ``` -## How to Use +## Getting Started Create a client ```ruby -drill = Drill.new(url: "http://localhost:8047") +drill = Drill::Client.new(url: "http://localhost:8047") ``` And query away ```ruby @@ -35,34 +35,90 @@ ## Endpoints [API docs](https://drill.apache.org/docs/rest-api-introduction/) -Get profiles +### Query +Run a query + ```ruby +drill.query( + query, + limit: nil, + default_schema: nil, + username: nil +) +``` + +### Profiles + +Get profiles of running and completed queries + +```ruby drill.profiles ``` -Get profile by query id +Get the profile of a query ```ruby drill.profiles(query_id) ``` -Get storage +Cancel a query ```ruby +drill.cancel_query(query_id) +``` + +### Storage + +List storage plugins + +```ruby drill.storage ``` -Get storage by name +Get a storage plugin by name ```ruby drill.storage(name) ``` +Enable a storage plugin + +```ruby +drill.enable_storage(name) +``` + +Disable a storage plugin + +```ruby +drill.disable_storage(name) +``` + +Create or update a storage plugin + +```ruby +drill.update_storage( + name, + type: nil, + enabled: nil, + connection: nil, + workspaces: nil, + formats: nil +) +``` + +Delete a storage plugin + +```ruby +drill.delete_storage(name) +``` + +### Info + Get cluster info ```ruby drill.cluster ``` @@ -82,29 +138,29 @@ ## Reference Set timeouts ```ruby -Drill.new(open_timeout: 5, read_timeout: 120) +Drill::Client.new(open_timeout: 5, read_timeout: 120) ``` ## History -View the [changelog](https://github.com/ankane/drill-sergeant/blob/master/CHANGELOG.md) +View the [changelog](CHANGELOG.md) ## Contributing Everyone is encouraged to help improve this project. Here are a few ways you can help: -- [Report bugs](https://github.com/ankane/drill-sergeant/issues) -- Fix bugs and [submit pull requests](https://github.com/ankane/drill-sergeant/pulls) +- [Report bugs](https://github.com/ankane/drill-ruby/issues) +- Fix bugs and [submit pull requests](https://github.com/ankane/drill-ruby/pulls) - Write, clarify, or fix documentation - Suggest or add new features To get started with development: ```sh -git clone https://github.com/ankane/drill-sergeant.git -cd drill-sergeant +git clone https://github.com/ankane/drill-ruby.git +cd drill-ruby bundle install bundle exec rake test ```