presto-client 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,10 +1,17 @@
1
1
 
2
+ 2014-01-30 version 0.3.1:
3
+
4
+ * Added http_debug option
5
+ * Disabled HTTP debug logging by default
6
+
7
+
2
8
  2014-01-22 version 0.3.0:
3
9
 
4
10
  * Added http_timeout option
5
11
  * Added http_open_timeout option
6
12
  * Changed Query.start API to start(query, options) to http options
7
13
 
14
+
8
15
  2014-01-22 version 0.2.0:
9
16
 
10
17
  * Added Query#cancel
data/README.md CHANGED
@@ -13,9 +13,10 @@ require 'presto-client'
13
13
  # create a client object:
14
14
  client = Presto::Client.new(
15
15
  server: "localhost:8880",
16
- user: "frsyuki",
17
16
  catalog: "native",
18
17
  schema: "default",
18
+ user: "frsyuki",
19
+ http_debug: true,
19
20
  )
20
21
 
21
22
  # run a query and get results:
@@ -39,3 +40,14 @@ client.query("select * from sys.node") do |q|
39
40
  end
40
41
  ```
41
42
 
43
+ ## Options
44
+
45
+ * **server** sets address[:port] to a Presto coordinator
46
+ * **catalog** sets catalog (connector) name of Presto such as `hive-cdh4`, `hive-hadoop1`, etc.
47
+ * **schema** sets default schema name of Presto. You can read other schemas by qualified name like `FROM myschema.table1`
48
+ * **source** sets source name to connect to a Presto. This name is shown on Presto web interface.
49
+ * **user** sets user name to connect to a Presto.
50
+ * **http_debug** enables debug message to STDOUT for each HTTP requests
51
+ * **http_open_timeout** sets timeout in seconds to open new HTTP connection
52
+ * **http_timeout** sets timeout in seconds to read data from a server
53
+
@@ -29,7 +29,7 @@ module Presto::Client
29
29
 
30
30
  faraday = Faraday.new(url: "http://#{server}") do |faraday|
31
31
  #faraday.request :url_encoded
32
- faraday.response :logger
32
+ faraday.response :logger if options[:http_debug]
33
33
  faraday.adapter Faraday.default_adapter
34
34
  end
35
35
 
@@ -15,6 +15,6 @@
15
15
  #
16
16
  module Presto
17
17
  module Client
18
- VERSION = "0.3.0"
18
+ VERSION = "0.3.1"
19
19
  end
20
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: presto-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-23 00:00:00.000000000 Z
12
+ date: 2014-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  segments:
138
138
  - 0
139
- hash: -2053006963209558154
139
+ hash: -4584095944750783678
140
140
  requirements: []
141
141
  rubyforge_project:
142
142
  rubygems_version: 1.8.23