Improve configuration for batch queries

This commit is contained in:
Raul Ochoa 2016-04-18 15:13:00 +02:00
parent ab55b083b4
commit f932862ce4
8 changed files with 59 additions and 7 deletions

View File

@ -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: {
// Needs to be writable by server user
cache_basedir: '/tmp/cdb-tiler-dev/millstone-dev'

View File

@ -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: {
// Needs to be writable by server user
cache_basedir: '/home/ubuntu/tile_assets/'

View File

@ -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: {
// Needs to be writable by server user
cache_basedir: '/home/ubuntu/tile_assets/'

View File

@ -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: {
// Needs to be writable by server user
cache_basedir: '/tmp/cdb-tiler-test/millstone'

View File

@ -56,8 +56,6 @@ DataviewBackend.prototype.getDataview = function (mapConfigProvider, user, param
pass: params.dbpassword
},
batch: {
// TODO load this from configuration
endpoint: 'http://127.0.0.1:8080/api/v1/sql/job',
username: user,
apiKey: params.api_key
}

View File

@ -150,8 +150,6 @@ MapController.prototype.create = function(req, res, prepareConfigFn) {
pass: req.params.dbpassword
},
batch: {
// TODO load this from configuration
endpoint: 'http://127.0.0.1:8080/api/v1/sql/job',
username: req.context.user,
apiKey: req.params.api_key
}

View File

@ -105,8 +105,6 @@ NamedMapMapConfigProvider.prototype.getMapConfig = function(callback) {
pass: rendererParams.dbpassword
},
batch: {
// TODO load this from configuration
endpoint: 'http://127.0.0.1:8080/api/v1/sql/job',
username: self.owner,
apiKey: apiKey
}

View File

@ -33,7 +33,8 @@ if (global.environment.statsd) {
var analysisConfig = _.defaults(global.environment.analysis || {}, {
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: {
batch: {
inlineExecution: analysisConfig.batch.inlineExecution,
endpoint: analysisConfig.batch.endpoint
}
},