OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
benchmarks.HeavyDbServer Class Reference

Public Member Functions

def __init__
 
def __del__
 
def initDataDir
 

Public Attributes

 heavydb
 

Detailed Description

Definition at line 76 of file benchmarks.py.

Constructor & Destructor Documentation

def benchmarks.HeavyDbServer.__init__ (   self,
  bindir,
  datadir,
  port_main,
  port_http,
  port_calcite 
)

Definition at line 77 of file benchmarks.py.

References benchmarks.HeavyDbServer.initDataDir().

77 
78  def __init__(self, bindir, datadir, port_main, port_http, port_calcite): # Start heavydb server
79  self.initDataDir(bindir, datadir)
80  self.heavydb = subprocess.Popen([bindir+'/heavydb', '--allowed-import-paths=["/"]',
81  '--allowed-export-paths=["/"]', '--enable-http-binary-server=0', '--port='+str(port_main),
82  '--http-port='+str(port_http), '--calcite-port='+str(port_calcite), datadir])
print('heavydb server started pid='+str(self.heavydb.pid))

+ Here is the call graph for this function:

def benchmarks.HeavyDbServer.__del__ (   self)

Definition at line 83 of file benchmarks.py.

83 
84  def __del__(self): # Shutdown heavydb server
85  print('Shutting down heavydb server.')
86  self.heavydb.terminate() # Cleaner than kill()
print('Server return value=%d' % (self.heavydb.wait()))

Member Function Documentation

def benchmarks.HeavyDbServer.initDataDir (   self,
  bindir,
  datadir 
)

Definition at line 87 of file benchmarks.py.

Referenced by benchmarks.HeavyDbServer.__init__().

87 
88  def initDataDir(self, bindir, datadir):
89  if not os.path.isdir(datadir):
90  os.mkdir(datadir, mode=0o775)
91  initheavy = subprocess.run([bindir+'/initheavy', datadir])
92  assert initheavy.returncode == 0, 'initheavy returned {0}.'.format(initheavy)
93 
# Execute test query to count US states

+ Here is the caller graph for this function:

Member Data Documentation

benchmarks.HeavyDbServer.heavydb

Definition at line 79 of file benchmarks.py.


The documentation for this class was generated from the following file: