mirror of https://github.com/citusdata/citus.git
Run python files through isort
parent
530b24a887
commit
188cc7d2ae
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
|
||||||
import random
|
|
||||||
import os
|
import os
|
||||||
|
import random
|
||||||
|
import sys
|
||||||
|
|
||||||
if len(sys.argv) != 2:
|
if len(sys.argv) != 2:
|
||||||
print(
|
print(
|
||||||
|
|
|
@ -5,8 +5,8 @@ diff-filter denormalizes diff output by having lines beginning with ' ' or '+'
|
||||||
come from file2's unmodified version.
|
come from file2's unmodified version.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from sys import argv, stdin, stdout
|
|
||||||
import re
|
import re
|
||||||
|
from sys import argv, stdin, stdout
|
||||||
|
|
||||||
|
|
||||||
class FileScanner:
|
class FileScanner:
|
||||||
|
|
|
@ -12,21 +12,23 @@ Options:
|
||||||
--seed=<seed> random number seed
|
--seed=<seed> random number seed
|
||||||
--base whether to use the base sql schedule or not
|
--base whether to use the base sql schedule or not
|
||||||
"""
|
"""
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import os, shutil
|
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/14132789/relative-imports-for-the-billionth-time/14132912#14132912
|
# https://stackoverflow.com/questions/14132789/relative-imports-for-the-billionth-time/14132912#14132912
|
||||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
|
|
||||||
|
|
||||||
import common
|
|
||||||
import config as cfg
|
|
||||||
import concurrent.futures
|
import concurrent.futures
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
from docopt import docopt
|
|
||||||
import time
|
|
||||||
import random
|
import random
|
||||||
|
import time
|
||||||
|
|
||||||
|
import common
|
||||||
|
from docopt import docopt
|
||||||
|
|
||||||
|
import config as cfg
|
||||||
|
|
||||||
testResults = {}
|
testResults = {}
|
||||||
parallel_thread_amount = 1
|
parallel_thread_amount = 1
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import sys
|
|
||||||
import subprocess
|
|
||||||
import atexit
|
import atexit
|
||||||
import concurrent.futures
|
import concurrent.futures
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
import utils
|
import utils
|
||||||
from utils import USER, cd
|
from utils import USER, cd
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
from os.path import expanduser
|
import inspect
|
||||||
|
import os
|
||||||
import random
|
import random
|
||||||
import socket
|
import socket
|
||||||
from contextlib import closing
|
|
||||||
import os
|
|
||||||
import threading
|
import threading
|
||||||
|
from contextlib import closing
|
||||||
|
from os.path import expanduser
|
||||||
|
|
||||||
import common
|
import common
|
||||||
import inspect
|
|
||||||
|
|
||||||
COORDINATOR_NAME = "coordinator"
|
COORDINATOR_NAME = "coordinator"
|
||||||
WORKER1 = "worker1"
|
WORKER1 = "worker1"
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import argparse
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
from glob import glob
|
|
||||||
import argparse
|
|
||||||
import shutil
|
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
|
import shutil
|
||||||
|
import sys
|
||||||
|
from glob import glob
|
||||||
|
|
||||||
import common
|
import common
|
||||||
|
|
||||||
import config
|
import config
|
||||||
|
|
||||||
args = argparse.ArgumentParser()
|
args = argparse.ArgumentParser()
|
||||||
|
|
|
@ -13,32 +13,30 @@ Options:
|
||||||
--mixed Run the verification phase with one node not upgraded.
|
--mixed Run the verification phase with one node not upgraded.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import subprocess
|
|
||||||
import atexit
|
import atexit
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/14132789/relative-imports-for-the-billionth-time/14132912#14132912
|
# https://stackoverflow.com/questions/14132789/relative-imports-for-the-billionth-time/14132912#14132912
|
||||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
|
|
||||||
|
import common
|
||||||
import utils
|
import utils
|
||||||
|
from docopt import docopt
|
||||||
from utils import USER
|
from utils import USER
|
||||||
|
|
||||||
from docopt import docopt
|
|
||||||
|
|
||||||
from config import (
|
from config import (
|
||||||
CitusUpgradeConfig,
|
|
||||||
CITUS_VERSION_SQL,
|
|
||||||
MASTER_VERSION,
|
|
||||||
AFTER_CITUS_UPGRADE_COORD_SCHEDULE,
|
AFTER_CITUS_UPGRADE_COORD_SCHEDULE,
|
||||||
BEFORE_CITUS_UPGRADE_COORD_SCHEDULE,
|
BEFORE_CITUS_UPGRADE_COORD_SCHEDULE,
|
||||||
|
CITUS_VERSION_SQL,
|
||||||
|
MASTER_VERSION,
|
||||||
MIXED_AFTER_CITUS_UPGRADE_SCHEDULE,
|
MIXED_AFTER_CITUS_UPGRADE_SCHEDULE,
|
||||||
MIXED_BEFORE_CITUS_UPGRADE_SCHEDULE,
|
MIXED_BEFORE_CITUS_UPGRADE_SCHEDULE,
|
||||||
|
CitusUpgradeConfig,
|
||||||
)
|
)
|
||||||
|
|
||||||
import common
|
|
||||||
|
|
||||||
|
|
||||||
def main(config):
|
def main(config):
|
||||||
install_citus(config.pre_tar_path)
|
install_citus(config.pre_tar_path)
|
||||||
|
|
|
@ -10,23 +10,25 @@ Options:
|
||||||
--pgxsdir=<pgxsdir> Path to the PGXS directory(ex: ~/.pgenv/src/postgresql-11.3)
|
--pgxsdir=<pgxsdir> Path to the PGXS directory(ex: ~/.pgenv/src/postgresql-11.3)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import sys, os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/14132789/relative-imports-for-the-billionth-time/14132912#14132912
|
# https://stackoverflow.com/questions/14132789/relative-imports-for-the-billionth-time/14132912#14132912
|
||||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
|
|
||||||
from config import (
|
|
||||||
PGUpgradeConfig,
|
|
||||||
AFTER_PG_UPGRADE_SCHEDULE,
|
|
||||||
BEFORE_PG_UPGRADE_SCHEDULE,
|
|
||||||
)
|
|
||||||
from docopt import docopt
|
|
||||||
import utils
|
|
||||||
from utils import USER
|
|
||||||
import atexit
|
import atexit
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import common
|
import common
|
||||||
|
import utils
|
||||||
|
from docopt import docopt
|
||||||
|
from utils import USER
|
||||||
|
|
||||||
|
from config import (
|
||||||
|
AFTER_PG_UPGRADE_SCHEDULE,
|
||||||
|
BEFORE_PG_UPGRADE_SCHEDULE,
|
||||||
|
PGUpgradeConfig,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def citus_prepare_pg_upgrade(pg_path, node_ports):
|
def citus_prepare_pg_upgrade(pg_path, node_ports):
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import subprocess
|
|
||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
USER = "postgres"
|
USER = "postgres"
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
from collections import defaultdict
|
|
||||||
from itertools import count
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
|
||||||
import os
|
import os
|
||||||
|
import queue
|
||||||
|
import re
|
||||||
import signal
|
import signal
|
||||||
import socket
|
import socket
|
||||||
import struct
|
import struct
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
import queue
|
from collections import defaultdict
|
||||||
|
from itertools import count
|
||||||
from construct.lib import ListContainer
|
|
||||||
from mitmproxy import ctx, tcp
|
|
||||||
|
|
||||||
import structs
|
import structs
|
||||||
|
from construct.lib import ListContainer
|
||||||
|
from mitmproxy import ctx, tcp
|
||||||
|
|
||||||
logging.basicConfig(format="%(asctime)s %(levelname)s %(message)s", level=logging.DEBUG)
|
logging.basicConfig(format="%(asctime)s %(levelname)s %(message)s", level=logging.DEBUG)
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
from construct import (
|
|
||||||
Struct,
|
|
||||||
Int8ub,
|
|
||||||
Int16ub,
|
|
||||||
Int32ub,
|
|
||||||
Int16sb,
|
|
||||||
Int32sb,
|
|
||||||
Bytes,
|
|
||||||
CString,
|
|
||||||
Computed,
|
|
||||||
Switch,
|
|
||||||
Seek,
|
|
||||||
this,
|
|
||||||
Pointer,
|
|
||||||
GreedyRange,
|
|
||||||
Enum,
|
|
||||||
Byte,
|
|
||||||
Probe,
|
|
||||||
FixedSized,
|
|
||||||
RestreamData,
|
|
||||||
GreedyBytes,
|
|
||||||
Array,
|
|
||||||
)
|
|
||||||
import construct.lib as cl
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
import construct.lib as cl
|
||||||
|
from construct import (
|
||||||
|
Array,
|
||||||
|
Byte,
|
||||||
|
Bytes,
|
||||||
|
Computed,
|
||||||
|
CString,
|
||||||
|
Enum,
|
||||||
|
FixedSized,
|
||||||
|
GreedyBytes,
|
||||||
|
GreedyRange,
|
||||||
|
Int8ub,
|
||||||
|
Int16sb,
|
||||||
|
Int16ub,
|
||||||
|
Int32sb,
|
||||||
|
Int32ub,
|
||||||
|
Pointer,
|
||||||
|
Probe,
|
||||||
|
RestreamData,
|
||||||
|
Seek,
|
||||||
|
Struct,
|
||||||
|
Switch,
|
||||||
|
this,
|
||||||
|
)
|
||||||
|
|
||||||
# For all possible message formats see:
|
# For all possible message formats see:
|
||||||
# https://www.postgresql.org/docs/current/protocol-message-formats.html
|
# https://www.postgresql.org/docs/current/protocol-message-formats.html
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue