Per Session Settings Author: Vikram Agrawal Date: 10 June, 2014
Motivation It would be useful to have a per session settings mechanism that can be used to control optimizations and other functionalities. These settings can be query specific configurations, metadata properties or flags to enable/disable any functionality/optimization. Such a control will help to group a set of queries in one sessions and execute them as per desired configuration.
Requirements ● ● ●
The variables are available to optimization, execution and metadata components System to set, unset and show these session variables Provide a way to use existing ConnectorSession Object so that the same object can be used to figure out session properties.
User Surface Settings can configured using SQL syntax ● SET var = literal It sets the value to the variable. Literal can be string, integer, double, duration, memory (mb/gb), boolean. Presto Server returns True on successful execution of this command. Else it returns False. ● UNSET var; It unsets a variable. i.e. change the value of the variable to its default value, if any. Presto Server returns True on successful execution of this command. ● SET var; Print the current value of the variable. It result in failed query if var neither has any default value nor any value has been set in this session. ● SET; Display current value for all existing session variables
Background: ●
There is per query session object (ConnectorSession).
●
ConnectorSession object is not shared across queries. So even if we set some session settings in one query, we cannot use in subsequent queries.
●
There are global settings which are loaded from config files when we start Presto Server
●
There is no way to override these global settings using Presto Queries for some
queries.
Architecture and Design Details Key elements in the implementation are illustrated in the following diagram
Presto Sessions Each Presto query would be attached to one Presto Session. Presto CLI will send a sessionId in its request to create a query. Multple queries with same sessionId will be part of same session. If no session identifier is specified for a query, then the query would attached itself to a "default" session. SET operation would error out in ‘default’ session since there is no semantics to set if there is no session context.
Session Configuration Manager Create a singleton object for PrestoSessionConfigManager in Presto Coordinator. PrestoSessionConfigManager has a map between all alive sessions and their associated configurations. It supports following functionality ● Creates a PrestoSessionConfig object for a session if it does not exist. ● Fetch the PrestoSessionConfig object for given session Id ● Removes the PrestoSessionConfig object for given session Id (This functionality will be used to clean up inactive sessions) PrestoSessionConfig Object Each Presto Session will have a unique SessionConfig Object. We extend Presto SQL parser grammar to support SET/UNSET/SHOW commands for session variables. These commands will appropriately update its associated session configurations. Life cycle of this object is as follow. Creation
createquery function in StatementResource and QueryResource handles the POST requests to create queries. We would extend it ● to find the sessionId of the query, ● check if there is already a sessionconfig object for the given sessionId ● create a new sessionconfig object if it does not exist. Usage
ConnectorSession is available everywhere in a query execution workflow. We extend this object to include a new field "sessionId". Wherever we want to use session variable during query planning and optimization, we use this sessionId to find sessionConfig object from PrestoSessionConfigManager, which is globally available in Presto Coordinator Limitation to this approach is that PrestoSessionConfigManager is not accessible in Task Workers. One of the ways to overcome this problem might be to pass SessionConfig object to TaskWorker. Cleanup
Add a REST endpoint in StatementResouce to delete a session. Presto Client can explicity make a rest call to delete an inactive session which in turn delete the associated SessionConfig object.
i.e. change the value of the variable to its default value, if any. Presto. Server returns True on successful ... PrestoSessionConfigManager has a map between all alive sessions and their associated configurations. It supports ... will appropriately update its associated session configurations. Life cycle of this object is as follow ...
Android design recommendations [8]. .... new Android design guidelines. ..... physical activity: the evidence,â Canadian medical association journal, vol. 174, no.
MIT Media Lab. Cambridge ... display interactive digital content on top of print media [Layar][ ... content can be captured as a digital photo and published on social .... 9, No. 2, pp. 1-20. WANGER, D. 2009. History of Mobile Augmented Reality,.
Must be pulled high (3.3v). CS. 15. Any free pin. REST. 17. Any free pin. ITDB02 pinout. 1. All boards with pinout like the Arduino Duemilanove / Arduino UNO. 2.
Keren's important insight here is that there is an important connection between moral ...... In light of her uncertainty regarding the permissibility of eating meat ...
Mar 15, 2013 - support under research grant numbers P2005â0117:1 and W2006â0068:1. â Deakin University ... Telephone: +61 3 924 46973. Fax: +61 3 924.
cutting energy use, using renewable energy sources, and pushing more sustainable .... See Table 1 for means and standard deviations for these four conditions.
1. The Surface Station Model and Surface Charts. Surface Weather. Observation. Station Model. A. B. C. D. G. F. E. H. I. J. ⢠A = Total Cloud Cover. A. B. C. D. G. F. E. H.
time-scale analysis reveals that the shock evolution is governed by a ...... Frigo, M. & Johnson, S. G. 1998 Fftw: an adaptive software architecture for the FFT.
automated instrumentation reading of more than 3,000 sensing points, including ... Email alerts are provided to the project team as soon as any sensor detects a.
GTX's Director of Testing Services. ... CEO to execute Geocomp's corporate strategy. ... A link to the video of the lecture can be found at www.geocomp.com. ... and/or construction of deep foundations to attend DFI's 42nd Annual Conference in.
All data are collected with a battery backed up data logging system and are remotely posted to Geocomp's. iSiteCentralTM database management system. This allows multiple user access to the data through a password protected website. Trigger values are
four triaxial shear test systems for soil. (two high-pressure, two standard), a standard direct shear frame for soil, and a large-scale high-pressure rock direct shear ...
automated instrumentation reading of ... Email alerts are provided to the project .... Her extensive knowledge of field exploration, sampling, and testing will ...
Nov 29, 2005 - (And perhaps not that he instantly or intuitively realized it had an interesting property.) This is not to detract from Ramanujan's geniusâfar from it. To illustrate, another aspect of his work is tied up to 1729. This has to do with
ARTER / 2016. A major ... and trucked back to the starting point, ... based in Central Virginia and responsible for business development and the expansion of.
About the Author Lambert Deckers is a professor of psychological science at Ball State University in Muncie, Indiana. He teaches courses mainly in motivation ...