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 un­sets 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 over­ride 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 session­Id  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 Co­ordinator.  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 Co­ordinator     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.      Clean­up 

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.   

Motivation Requirements User Surface -

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 ...

193KB Sizes 0 Downloads 106 Views

Recommend Documents

How User Experience Design Can Affect Motivation: A ...
Android design recommendations [8]. .... new Android design guidelines. ..... physical activity: the evidence,” Canadian medical association journal, vol. 174, no.

Second Surface: Multi-user Spatial Collaboration ... - Fluid Interfaces
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,.

Requirements
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.

Moral motivation
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 ...

1 Motivation
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.

Motivation for Study
cutting energy use, using renewable energy sources, and pushing more sustainable .... See Table 1 for means and standard deviations for these four conditions.

The Surface Station Model and Surface Charts
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.

Shock-like free-surface perturbations in low-surface ...
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.

the surface - Geocomp
The Los Angeles Regional Connector. Tunnel Boring Machine (TBM), nicknamed “Angeli,” has embarked on its 1.1 mile journey underneath. Los Angeles.

the surface - Geocomp
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.

the surface - Geocomp
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.

the surface - Geocomp
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

the surface - Geocomp
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 ...

the surface - Geocomp
automated instrumentation reading of ... Email alerts are provided to the project .... Her extensive knowledge of field exploration, sampling, and testing will ...

the surface - Geocomp
THE SURFACE. 4. TH. QU ... Monitoring System. 1. 2. 4. 3. Penitencia Pipe Deflection. Monitoring System ... Coal Combustion Residuals Surface Impoundments.

Fermat surface
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

the surface - Geocomp
ARTER / 2016. A major ... and trucked back to the starting point, ... based in Central Virginia and responsible for business development and the expansion of.

surface area.pdf
Page 1 of 1. surface area.pdf. surface area.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying surface area.pdf. Page 1 of 1.

Download MOTIVATION: BIOLOGICAL ...
About the Author Lambert Deckers is a professor of psychological science at Ball State University in Muncie, Indiana. He teaches courses mainly in motivation ...

REQUIREMENTS FOR RESEARCH PROPOSALS
Apr 12, 2016 - REQUIREMENTS FOR RESEARCH PROPOSALS. The following itemizes the district's requirements for research to be conducted within the ...

Customer Provided Workstation Requirements
Page 1. 1. Customer Provided Workstation Requirements. The workstation requirements are based on the ... Network adapter with TCP/IP Services enabled.