Files
impala/tests/benchmark/plugins/__init__.py
Casey Ching 074e5b4349 Remove hashbang from non-script python files
Many python files had a hashbang and the executable bit set though
they were not intended to be run a standalone script. That makes
determining which python files are actually scripts very difficult.
A future patch will update the hashbang in real python scripts so they
use $IMPALA_HOME/bin/impala-python.

Change-Id: I04eafdc73201feefe65b85817a00474e182ec2ba
Reviewed-on: http://gerrit.cloudera.org:8080/599
Reviewed-by: Casey Ching <casey@cloudera.com>
Reviewed-by: Taras Bobrovytsky <tbobrovytsky@cloudera.com>
Tested-by: Internal Jenkins
2015-08-04 05:26:07 +00:00

38 lines
1.2 KiB
Python

# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
class Plugin(object):
'''Base plugin class.
Defines the interfaces that all plugins will use.
The interface consists of:
* The scope, which defines when the plugin will run.
The different scopes are:
* per query
* per workload
* per test suite run
* A pre-hook method, which is run at the beginning of the 'scope'
* A post-hook method, which is run at the end of the scope.
'''
__name__ = "BasePlugin"
def __init__(self, scope=None):
self.scope = scope
def run_pre_hook(self, context=None):
pass
def run_post_hook(self, context=None):
pass