Improve configuration for batch queries
This commit is contained in:
parent
ab55b083b4
commit
f932862ce4
@ -191,6 +191,20 @@ var config = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// anything analyses related
|
||||||
|
,analysis: {
|
||||||
|
// batch configuration
|
||||||
|
batch: {
|
||||||
|
// Inline execution avoid the use of SQL API as batch endpoint
|
||||||
|
// When set to true it will run all analysis queries in series, with a direct connection to the DB
|
||||||
|
// This might be useful for:
|
||||||
|
// - testing
|
||||||
|
// - running an standalone server without any dependency on external services
|
||||||
|
inlineExecution: false,
|
||||||
|
// where the SQL API is running, it will use a custom Host header to specify the username.
|
||||||
|
endpoint: 'http://127.0.0.1:8080/api/v2/sql/job'
|
||||||
|
}
|
||||||
|
}
|
||||||
,millstone: {
|
,millstone: {
|
||||||
// Needs to be writable by server user
|
// Needs to be writable by server user
|
||||||
cache_basedir: '/tmp/cdb-tiler-dev/millstone-dev'
|
cache_basedir: '/tmp/cdb-tiler-dev/millstone-dev'
|
||||||
|
@ -185,6 +185,20 @@ var config = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// anything analyses related
|
||||||
|
,analysis: {
|
||||||
|
// batch configuration
|
||||||
|
batch: {
|
||||||
|
// Inline execution avoid the use of SQL API as batch endpoint
|
||||||
|
// When set to true it will run all analysis queries in series, with a direct connection to the DB
|
||||||
|
// This might be useful for:
|
||||||
|
// - testing
|
||||||
|
// - running an standalone server without any dependency on external services
|
||||||
|
inlineExecution: false,
|
||||||
|
// where the SQL API is running, it will use a custom Host header to specify the username.
|
||||||
|
endpoint: 'http://127.0.0.1:8080/api/v2/sql/job'
|
||||||
|
}
|
||||||
|
}
|
||||||
,millstone: {
|
,millstone: {
|
||||||
// Needs to be writable by server user
|
// Needs to be writable by server user
|
||||||
cache_basedir: '/home/ubuntu/tile_assets/'
|
cache_basedir: '/home/ubuntu/tile_assets/'
|
||||||
|
@ -185,6 +185,20 @@ var config = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// anything analyses related
|
||||||
|
,analysis: {
|
||||||
|
// batch configuration
|
||||||
|
batch: {
|
||||||
|
// Inline execution avoid the use of SQL API as batch endpoint
|
||||||
|
// When set to true it will run all analysis queries in series, with a direct connection to the DB
|
||||||
|
// This might be useful for:
|
||||||
|
// - testing
|
||||||
|
// - running an standalone server without any dependency on external services
|
||||||
|
inlineExecution: false,
|
||||||
|
// where the SQL API is running, it will use a custom Host header to specify the username.
|
||||||
|
endpoint: 'http://127.0.0.1:8080/api/v2/sql/job'
|
||||||
|
}
|
||||||
|
}
|
||||||
,millstone: {
|
,millstone: {
|
||||||
// Needs to be writable by server user
|
// Needs to be writable by server user
|
||||||
cache_basedir: '/home/ubuntu/tile_assets/'
|
cache_basedir: '/home/ubuntu/tile_assets/'
|
||||||
|
@ -186,6 +186,20 @@ var config = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// anything analyses related
|
||||||
|
,analysis: {
|
||||||
|
// batch configuration
|
||||||
|
batch: {
|
||||||
|
// Inline execution avoid the use of SQL API as batch endpoint
|
||||||
|
// When set to true it will run all analysis queries in series, with a direct connection to the DB
|
||||||
|
// This might be useful for:
|
||||||
|
// - testing
|
||||||
|
// - running an standalone server without any dependency on external services
|
||||||
|
inlineExecution: true,
|
||||||
|
// where the SQL API is running, it will use a custom Host header to specify the username.
|
||||||
|
endpoint: 'http://127.0.0.1:8080/api/v2/sql/job'
|
||||||
|
}
|
||||||
|
}
|
||||||
,millstone: {
|
,millstone: {
|
||||||
// Needs to be writable by server user
|
// Needs to be writable by server user
|
||||||
cache_basedir: '/tmp/cdb-tiler-test/millstone'
|
cache_basedir: '/tmp/cdb-tiler-test/millstone'
|
||||||
|
@ -56,8 +56,6 @@ DataviewBackend.prototype.getDataview = function (mapConfigProvider, user, param
|
|||||||
pass: params.dbpassword
|
pass: params.dbpassword
|
||||||
},
|
},
|
||||||
batch: {
|
batch: {
|
||||||
// TODO load this from configuration
|
|
||||||
endpoint: 'http://127.0.0.1:8080/api/v1/sql/job',
|
|
||||||
username: user,
|
username: user,
|
||||||
apiKey: params.api_key
|
apiKey: params.api_key
|
||||||
}
|
}
|
||||||
|
@ -150,8 +150,6 @@ MapController.prototype.create = function(req, res, prepareConfigFn) {
|
|||||||
pass: req.params.dbpassword
|
pass: req.params.dbpassword
|
||||||
},
|
},
|
||||||
batch: {
|
batch: {
|
||||||
// TODO load this from configuration
|
|
||||||
endpoint: 'http://127.0.0.1:8080/api/v1/sql/job',
|
|
||||||
username: req.context.user,
|
username: req.context.user,
|
||||||
apiKey: req.params.api_key
|
apiKey: req.params.api_key
|
||||||
}
|
}
|
||||||
|
@ -105,8 +105,6 @@ NamedMapMapConfigProvider.prototype.getMapConfig = function(callback) {
|
|||||||
pass: rendererParams.dbpassword
|
pass: rendererParams.dbpassword
|
||||||
},
|
},
|
||||||
batch: {
|
batch: {
|
||||||
// TODO load this from configuration
|
|
||||||
endpoint: 'http://127.0.0.1:8080/api/v1/sql/job',
|
|
||||||
username: self.owner,
|
username: self.owner,
|
||||||
apiKey: apiKey
|
apiKey: apiKey
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,8 @@ if (global.environment.statsd) {
|
|||||||
|
|
||||||
var analysisConfig = _.defaults(global.environment.analysis || {}, {
|
var analysisConfig = _.defaults(global.environment.analysis || {}, {
|
||||||
batch: {
|
batch: {
|
||||||
endpoint: 'http://127.0.0.1:8080/api/v1/sql/job'
|
inlineExecution: false,
|
||||||
|
endpoint: 'http://127.0.0.1:8080/api/v2/sql/job'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -90,6 +91,7 @@ module.exports = {
|
|||||||
|
|
||||||
analysis: {
|
analysis: {
|
||||||
batch: {
|
batch: {
|
||||||
|
inlineExecution: analysisConfig.batch.inlineExecution,
|
||||||
endpoint: analysisConfig.batch.endpoint
|
endpoint: analysisConfig.batch.endpoint
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user