def __init__(self,
                 host,
                 port,
                 user,
                 password,
                 databaseName,
                 insertMode="UPDATE"):
        Backend.__init__(self, host, port, user, password, databaseName,
                         insertMode)
        self.tableInsertCache = dict()
        self.cachingThreshold = config.data_backend_caching_threshold
        self.counter = 0

        self.column_map = None

        self.doCache = True

        self.conn = None
        self.cursor = None
        self.dictCursor = None
        self.connect()

        self.dbType = None
        self.did_reconnect_on_error = False

        self.executeTimes = 0
        self.executeManyTimes = 0
        self.executeManyObjects = 0
        self.last_query = ""
        self.tableNames = [common.DB_INDEX_NODES, common.DB_INDEX_PORTS]
        for s in config.flow_bucket_sizes:
            self.tableNames.append(common.DB_FLOW_PREFIX + str(s))
            self.tableNames.append(common.DB_FLOW_AGGR_PREFIX + str(s))
            for index in [common.DB_INDEX_NODES, common.DB_INDEX_PORTS]:
                self.tableNames.append(index + "_" + str(s))
	def __init__(self, host, port, user, password, databaseName, insertMode="UPDATE"):
		Backend.__init__(self, host, port, user, password, databaseName, insertMode)
		self.tableInsertCache = dict()
		self.cachingThreshold = config.data_backend_caching_threshold
		self.counter = 0

		self.column_map = None

		self.doCache = True

		self.conn = None
		self.cursor = None
		self.dictCursor = None
		self.connect()

		self.dbType = None
		self.did_reconnect_on_error = False

		self.executeTimes = 0
		self.executeManyTimes = 0
		self.executeManyObjects = 0
		self.last_query = ""
		self.tableNames = [ common.DB_INDEX_NODES, common.DB_INDEX_PORTS ]
		for s in config.flow_bucket_sizes:
			self.tableNames.append(common.DB_FLOW_PREFIX + str(s))
			self.tableNames.append(common.DB_FLOW_AGGR_PREFIX + str(s))
			for index in [ common.DB_INDEX_NODES, common.DB_INDEX_PORTS ]:
				self.tableNames.append(index + "_" + str(s))
	def __init__(self, host, port, user, password, databaseName):
		Backend.__init__(self, host, port, user, password, databaseName)
		self.tableInsertCache = dict()
		self.cachingThreshold = 10000
		self.counter = 0

		self.column_map = None

		self.doCache = True

		self.conn = None
		self.cursor = None
		self.connect()

		self.executeTimes = 0
		self.executeManyTimes = 0
		self.executeManyObjects = 0

		self.tableNames = [ common.DB_INDEX_NODES, common.DB_INDEX_PORTS ]
		for s in config.flow_bucket_sizes:
			self.tableNames.append(common.DB_FLOW_PREFIX + str(s))
			self.tableNames.append(common.DB_FLOW_AGGR_PREFIX + str(s))
			for index in [ common.DB_INDEX_NODES, common.DB_INDEX_PORTS ]:
				self.tableNames.append(index + "_" + str(s))
	def __init__(self, host, port, user, password, databaseName):
		Backend.__init__(self, host, port, user, password, databaseName)
		self.connect()
Exemple #5
0
 def __init__(self, host, port, user, password, databaseName):
     Backend.__init__(self, host, port, user, password, databaseName)
     self.connect()