Considering the following 2 points:
-
When it is not update, use self.getDBInst().cleartab(tabs) clean up DB, DB is empty. But in import process, settab call df.cleartab(tabdict[key].keys(),[key]) in for loop to execute db query to clean table again.
-
If there are many nodes, settab call cleartab in each node to clear switch table, but there is only one switch table. We only need clear up switch table once.
Considering the following 2 points:
When it is not update, use
self.getDBInst().cleartab(tabs)clean up DB, DB is empty. But inimportprocess,settabcalldf.cleartab(tabdict[key].keys(),[key])inforloop to executedbquery to clean table again.If there are many nodes,
settabcallcleartabin each node to clearswitchtable, but there is only oneswitchtable. We only need clear upswitchtable once.