presto-client
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -36,3 +36,3 @@ const { URL } = require('url') ; | ||
this.checkInterval = args.checkInterval || QUERY_STATE_CHECK_INTERVAL; | ||
this.enableVerboseStateCallback = args.enableVerboseStateCallback || false; | ||
this.jsonParser = args.jsonParser || JSON; | ||
@@ -247,2 +247,4 @@ | ||
var enable_verbose_state_callback = this.enableVerboseStateCallback || false; | ||
var req = { method: 'POST', path: '/v1/statement', headers: header, body: opts.query }; | ||
@@ -344,3 +346,3 @@ client.request(req, function(err, code, data){ | ||
if (state_callback && last_state !== response.stats.state) { | ||
if (state_callback && (last_state !== response.stats.state || enable_verbose_state_callback)) { | ||
state_callback(null, response.id, response.stats); | ||
@@ -347,0 +349,0 @@ last_state = response.stats.state; |
{ | ||
"name": "presto-client", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Distributed query engine Presto client library for node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -47,5 +47,5 @@ # presto-client-node | ||
* host [string] | ||
* presto coordinator hostname or address (default: localhost) | ||
* Presto coordinator hostname or address (default: localhost) | ||
* ssl [object] | ||
* setting a Hash object enables SSL and verify server certificate with options (default: `null`): | ||
* Setting a Hash object enables SSL and verify server certificate with options (default: `null`): | ||
* `ca`: An authority certificate or array of authority certificates to check the remote host against | ||
@@ -61,5 +61,5 @@ * `cert`: Public x509 certificate to use (default : `null`) | ||
* port [integer] | ||
* presto coordinator port (default: 8080) | ||
* Presto coordinator port (default: 8080) | ||
* user [string] | ||
* username of query (default: process user name) | ||
* Username of query (default: process user name) | ||
* basic_auth [object] | ||
@@ -69,9 +69,14 @@ * Pass in a user and password to enable Authorization Basic headers on all requests. | ||
* catalog [string] | ||
* default catalog name | ||
* Default catalog name | ||
* schema [string] | ||
* default schema name | ||
* Default schema name | ||
* checkInterval [integer] | ||
* interval milliseconds of each RPC to check query status (default: 800ms) | ||
* Interval milliseconds of each RPC to check query status (default: 800ms) | ||
* enableVerboseStateCallback [boolean] | ||
* Enable more verbose callback for Presto query states (default: false) | ||
* When set to `true`, this flag modifies the condition of the state change callback to return data every `checkInterval`(default: 800ms). Modify `checkInterval` if you wish to change the frequency. | ||
* Otherwise (`false`), the state change callback will only be called upon a change in state. | ||
* The purpose of this variable is to enable verbose update capability in state callbacks. This is such that "percentage complete" and "processed rows" may be extracted despite the state still remaining in a particular state eg. "RUNNING". | ||
* jsonParser [object] | ||
* custom json parser if required (default: `JSON`) | ||
* Custom json parser if required (default: `JSON`) | ||
@@ -204,2 +209,4 @@ return value: client instance object | ||
* 0.4.0: | ||
* add a parameter to call status callback in verbose | ||
* 0.3.0: | ||
@@ -206,0 +213,0 @@ * add Basic Authentication support |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23789
356
244