kaqing 2.0.172__py3-none-any.whl → 2.0.174__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kaqing might be problematic. Click here for more details.
- adam/commands/__init__.py +6 -2
- adam/commands/alter_tables.py +24 -35
- adam/commands/cat.py +3 -13
- adam/commands/cd.py +6 -8
- adam/commands/check.py +9 -17
- adam/commands/command.py +39 -5
- adam/commands/cp.py +24 -32
- adam/commands/cql/cql_completions.py +3 -4
- adam/commands/cql/utils_cql.py +0 -2
- adam/commands/devices/device_app.py +2 -2
- adam/commands/devices/device_cass.py +2 -2
- adam/commands/devices/device_export.py +7 -9
- adam/commands/devices/device_postgres.py +2 -2
- adam/commands/export/clean_up_all_export_sessions.py +3 -3
- adam/commands/export/clean_up_export_sessions.py +8 -15
- adam/commands/export/drop_export_database.py +6 -22
- adam/commands/export/drop_export_databases.py +3 -9
- adam/commands/export/export.py +1 -1
- adam/commands/export/export_databases.py +70 -15
- adam/commands/export/export_select.py +12 -23
- adam/commands/export/export_select_x.py +3 -3
- adam/commands/export/export_sessions.py +124 -0
- adam/commands/export/export_use.py +0 -6
- adam/commands/export/exporter.py +61 -120
- adam/commands/export/import_session.py +4 -4
- adam/commands/export/importer.py +12 -5
- adam/commands/export/importer_athena.py +17 -13
- adam/commands/export/importer_sqlite.py +20 -17
- adam/commands/export/show_column_counts.py +5 -14
- adam/commands/export/show_export_databases.py +2 -1
- adam/commands/export/show_export_session.py +5 -13
- adam/commands/export/show_export_sessions.py +2 -2
- adam/commands/export/utils_export.py +5 -3
- adam/commands/medusa/medusa_backup.py +1 -2
- adam/commands/medusa/medusa_restore.py +21 -19
- adam/commands/param_get.py +8 -9
- adam/commands/param_set.py +7 -10
- adam/commands/postgres/postgres.py +13 -21
- adam/commands/postgres/utils_postgres.py +5 -1
- adam/commands/preview_table.py +1 -1
- adam/commands/reaper/reaper_run_abort.py +4 -10
- adam/commands/reaper/reaper_schedule_activate.py +6 -10
- adam/commands/reaper/reaper_schedule_start.py +6 -10
- adam/commands/reaper/reaper_schedule_stop.py +6 -10
- adam/repl.py +5 -3
- adam/utils_k8s/k8s.py +5 -5
- adam/utils_sqlite.py +13 -13
- adam/version.py +1 -1
- {kaqing-2.0.172.dist-info → kaqing-2.0.174.dist-info}/METADATA +1 -1
- {kaqing-2.0.172.dist-info → kaqing-2.0.174.dist-info}/RECORD +53 -53
- adam/commands/export/export_handlers.py +0 -71
- {kaqing-2.0.172.dist-info → kaqing-2.0.174.dist-info}/WHEEL +0 -0
- {kaqing-2.0.172.dist-info → kaqing-2.0.174.dist-info}/entry_points.txt +0 -0
- {kaqing-2.0.172.dist-info → kaqing-2.0.174.dist-info}/top_level.txt +0 -0
adam/utils_k8s/k8s.py
CHANGED
|
@@ -2,7 +2,7 @@ from collections.abc import Callable
|
|
|
2
2
|
import re
|
|
3
3
|
import portforward
|
|
4
4
|
|
|
5
|
-
from adam.commands.command import
|
|
5
|
+
from adam.commands.command import InvalidStateException
|
|
6
6
|
from adam.repl_state import ReplState
|
|
7
7
|
from adam.utils import log2
|
|
8
8
|
from adam.utils_k8s.kube_context import KubeContext
|
|
@@ -24,14 +24,14 @@ class PortForwardHandler:
|
|
|
24
24
|
if not self.svc_or_pod:
|
|
25
25
|
log2('No service or pod found.')
|
|
26
26
|
|
|
27
|
-
raise
|
|
27
|
+
raise InvalidStateException(state)
|
|
28
28
|
|
|
29
29
|
if KubeContext.in_cluster():
|
|
30
30
|
svc_name = self.svc_or_pod(True)
|
|
31
31
|
if not svc_name:
|
|
32
32
|
log2('No service found.')
|
|
33
33
|
|
|
34
|
-
raise
|
|
34
|
+
raise InvalidStateException(state)
|
|
35
35
|
|
|
36
36
|
# cs-a526330d23-cs-a526330d23-default-sts-0 ->
|
|
37
37
|
# curl http://cs-a526330d23-cs-a526330d23-reaper-service.stgawsscpsr.svc.cluster.local:8080
|
|
@@ -40,13 +40,13 @@ class PortForwardHandler:
|
|
|
40
40
|
svc = f'{groups[1]}{svc_name}.{state.namespace}.svc.cluster.local:{self.target_port}'
|
|
41
41
|
return (svc, svc)
|
|
42
42
|
else:
|
|
43
|
-
raise
|
|
43
|
+
raise InvalidStateException(state)
|
|
44
44
|
else:
|
|
45
45
|
pod = self.svc_or_pod(False)
|
|
46
46
|
if not pod:
|
|
47
47
|
log2('No pod found.')
|
|
48
48
|
|
|
49
|
-
raise
|
|
49
|
+
raise InvalidStateException(state)
|
|
50
50
|
|
|
51
51
|
self.pod = pod
|
|
52
52
|
self.forward_connection = portforward.forward(state.namespace, pod, self.local_port, self.target_port)
|
adam/utils_sqlite.py
CHANGED
|
@@ -32,10 +32,7 @@ class SQLiteConnectionHandler:
|
|
|
32
32
|
self.conn = None
|
|
33
33
|
|
|
34
34
|
def __enter__(self) -> sqlite3.Connection:
|
|
35
|
-
|
|
36
|
-
self.conn = sqlite3.connect(f'{SQLite.local_db_dir()}/{self.database}_{self.keyspace}.db')
|
|
37
|
-
else:
|
|
38
|
-
self.conn = SQLite.connect(self.database)
|
|
35
|
+
self.conn = SQLite.connect(self.database, self.keyspace)
|
|
39
36
|
|
|
40
37
|
self.conn.__enter__()
|
|
41
38
|
|
|
@@ -97,17 +94,20 @@ class SQLite:
|
|
|
97
94
|
if conn:
|
|
98
95
|
conn.close()
|
|
99
96
|
|
|
100
|
-
def connect(database: str):
|
|
97
|
+
def connect(database: str, keyspace: str = None):
|
|
101
98
|
os.makedirs(SQLite.local_db_dir(), exist_ok=True)
|
|
102
99
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
100
|
+
if keyspace:
|
|
101
|
+
return sqlite3.connect(f'{SQLite.local_db_dir()}/{database}_{keyspace}.db')
|
|
102
|
+
else:
|
|
103
|
+
conn = sqlite3.connect(f'{SQLite.local_db_dir()}/{database}_root.db')
|
|
104
|
+
with SQLite.cursor(conn) as cursor:
|
|
105
|
+
for d in SQLite.database_names(database):
|
|
106
|
+
if d != f'{database}.db':
|
|
107
|
+
q = f"ATTACH DATABASE '{SQLite.local_db_dir()}/{d}' AS {SQLite.keyspace(d)}"
|
|
108
|
+
cursor.execute(q)
|
|
109
|
+
|
|
110
|
+
return conn
|
|
111
111
|
|
|
112
112
|
@functools.lru_cache()
|
|
113
113
|
def column_names(tables: list[str] = [], database: str = None, function: str = 'audit', partition_cols_only = False):
|
adam/version.py
CHANGED
|
@@ -9,7 +9,7 @@ adam/embedded_apps.py,sha256=lKPx63mKzJbNmwz0rgL4gF76M9fDGxraYTtNAIGnZ_s,419
|
|
|
9
9
|
adam/embedded_params.py,sha256=4q3Sc8tmlWyY5Yyfpqatl9urorJ_rW6KGxr_LCiQ5RI,5724
|
|
10
10
|
adam/log.py,sha256=vcJ1Q8LLnt3NSXqpVcKjAI2OZE6KaD3PEi1kfu_D8qs,1156
|
|
11
11
|
adam/pod_exec_result.py,sha256=85jy_5dS6TEEk5ijU0B62YfUycxmD3dG8mhIHFPipc8,1260
|
|
12
|
-
adam/repl.py,sha256=
|
|
12
|
+
adam/repl.py,sha256=iQ16-x2kS-6Sak4CjqUE41-Af-MApGjPka4qPzKkhQc,7459
|
|
13
13
|
adam/repl_commands.py,sha256=vCKee-0smNPTK_SMegU-6GR4ShTh_nY_Ac3fFIdCMqc,6440
|
|
14
14
|
adam/repl_session.py,sha256=uIogcvWBh7wd8QQ-p_JgLsyJ8YJgINw5vOd6JIsd7Vo,472
|
|
15
15
|
adam/repl_state.py,sha256=ckyoj6j17cxQy0h1jVyxAgDvRRAzJeOS0SV01gzbEs0,15532
|
|
@@ -18,8 +18,8 @@ adam/utils_athena.py,sha256=vIcOPMtDrgA2SM2a2VpOVOjTJ2_Hss63lwlSgG3kuLM,5409
|
|
|
18
18
|
adam/utils_audits.py,sha256=lZ2U1AcROxLB4652auG091QFTPs_YNzbtdXBiK6bY_Y,4063
|
|
19
19
|
adam/utils_issues.py,sha256=XDiHDxQcYEvIxwL-fOeIXDRPpKinnggB5sSM3Yo2P-I,1458
|
|
20
20
|
adam/utils_net.py,sha256=byEtNVr8iG9UaD7dM77dN2WEBClB7YNKult7LKFTCOc,428
|
|
21
|
-
adam/utils_sqlite.py,sha256=
|
|
22
|
-
adam/version.py,sha256=
|
|
21
|
+
adam/utils_sqlite.py,sha256=kF1zTCJE_aIEhgbCDOIUH23XvnLufKpHiiyhkKqH6is,4340
|
|
22
|
+
adam/version.py,sha256=htfdPUqia9L7LzWep3oJtMmkyNtuf9mKyjtJsHQfT7g,140
|
|
23
23
|
adam/checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
adam/checks/check.py,sha256=Qopr3huYcMu2bzQgb99dEUYjFzkjKHRI76S6KA9b9Rk,702
|
|
25
25
|
adam/checks/check_context.py,sha256=FEHkQ32jY1EDopQ2uYWqy9v7aEEX1orLpJWhopwAlh4,402
|
|
@@ -53,17 +53,17 @@ adam/columns/node_utils.py,sha256=ql2StXmASC7equuabZVZEQ_BPTu2KkS99gY_3JXpIvU,77
|
|
|
53
53
|
adam/columns/pod_name.py,sha256=IYw0ZKA7Fb9LaGXENqzZTiTgL98tahwFRtfy0KkKh2Q,280
|
|
54
54
|
adam/columns/volume_cassandra.py,sha256=9KRNOzjNYganI9avN6zaA5_-7yxD4rV-KNxro9CSUg4,753
|
|
55
55
|
adam/columns/volume_root.py,sha256=29ujLoCAf9LO75u62LxEaPD58s6ihV-tcK17OeLSOM0,556
|
|
56
|
-
adam/commands/__init__.py,sha256=
|
|
57
|
-
adam/commands/alter_tables.py,sha256=
|
|
58
|
-
adam/commands/cat.py,sha256
|
|
59
|
-
adam/commands/cd.py,sha256=
|
|
60
|
-
adam/commands/check.py,sha256=
|
|
56
|
+
adam/commands/__init__.py,sha256=6MGdr7yYIzW-igcxq44jZRVuKaoIhbaOOqdEiSyElbM,1173
|
|
57
|
+
adam/commands/alter_tables.py,sha256=yNqIYDoZd2xZEl3hc8E6V1Br6_BEM3X7DCnXFGuR1pQ,3216
|
|
58
|
+
adam/commands/cat.py,sha256=-Xx04XCYDVszR68IrJRnGbeu6RC1YRc_bnrY87xqkr4,1295
|
|
59
|
+
adam/commands/cd.py,sha256=g6GGHqg72pfxjVL_s5KFne2GL8taikWRWgCEU1nDRqg,1338
|
|
60
|
+
adam/commands/check.py,sha256=Hf2ukd2DDuWkfCpGYQFENZwQuPfuMqA_silmTVEfaQ0,2334
|
|
61
61
|
adam/commands/cli_commands.py,sha256=TGnm2uxtuDRmkNNMlPOpYAXJkgDQEuhDeimBcwsEtC8,3574
|
|
62
62
|
adam/commands/code.py,sha256=8SwSYuMx2QNFB3RUfVPfYVUAf_unEjADx4xvrstepJc,1906
|
|
63
|
-
adam/commands/command.py,sha256=
|
|
63
|
+
adam/commands/command.py,sha256=AO9y4D00Ho8ThC8PQV53wUHm01w3ox3d3UXrooySwNw,7931
|
|
64
64
|
adam/commands/command_helpers.py,sha256=leOJJK1UXczNTJHN9TGMCbIpUpmpreULvQ-TvnsYS7w,1134
|
|
65
65
|
adam/commands/commands_utils.py,sha256=PjhJqqGdKNsUYry4ZU53tlR_NVwc0Fb8J-ZarN0uiD0,2856
|
|
66
|
-
adam/commands/cp.py,sha256=
|
|
66
|
+
adam/commands/cp.py,sha256=qYntAdgs5aUg9-_EXT6ngz4dxyzcsfGR8vkrFrs6hag,2879
|
|
67
67
|
adam/commands/exit.py,sha256=T7bCEShd6MXQ8rXak7vGZTvqEOejPOUPtbdfy7d8WWA,753
|
|
68
68
|
adam/commands/help.py,sha256=v8VPGfnMC_PY_oqJUlwdAqIeJ9-EicvMEVT1RDKSmyI,1907
|
|
69
69
|
adam/commands/intermediate_command.py,sha256=HBSV0tdocHtpe4g3BDagEp55SpDdMAtOVb_ZWVh8v78,1755
|
|
@@ -74,9 +74,9 @@ adam/commands/logs.py,sha256=CS4eh5JWzoXboYSXXpiE6CDsky1Jsu61Q1MZAqGjOB8,1142
|
|
|
74
74
|
adam/commands/ls.py,sha256=b6EBzjXdlagOkpD_OM77I_n18ikGub5obtuerruA9yA,1298
|
|
75
75
|
adam/commands/nodetool.py,sha256=QUgKWjtPCuoA2vsip7naaf-5XGqHVinhWjsxmIxd8AA,2161
|
|
76
76
|
adam/commands/nodetool_commands.py,sha256=5IgWC3rmeDD1cgwqQjiiWzi-wJpJ3n_8pAzz_9phXuk,2635
|
|
77
|
-
adam/commands/param_get.py,sha256=
|
|
78
|
-
adam/commands/param_set.py,sha256=
|
|
79
|
-
adam/commands/preview_table.py,sha256=
|
|
77
|
+
adam/commands/param_get.py,sha256=LOCjvqbfSYGOhX4p4I6kj2H6PFvmDyUiaRm28AOxH4w,1408
|
|
78
|
+
adam/commands/param_set.py,sha256=GMvd38jGBcjH1ElcpHmdKwuTvvGanm_CNZ8hJJRFXss,1358
|
|
79
|
+
adam/commands/preview_table.py,sha256=TfSipKOrd1avGQ4Au09wh0FkMKKRuHYqfShHHbTbe-w,1165
|
|
80
80
|
adam/commands/pwd.py,sha256=cdnmJv3-9uRtN-GFlqlktdWNKZLdKCTD55DAkSa065I,1441
|
|
81
81
|
adam/commands/report.py,sha256=IESGEq6akUY2IznKUZV90_5s2gRM4npexFQH7Pa3rAI,2086
|
|
82
82
|
adam/commands/restart.py,sha256=CUjHxdWznqgY2BdYcHHKH2eolj3cPeE5xbMjkIiyJ2A,2202
|
|
@@ -96,9 +96,9 @@ adam/commands/bash/bash.py,sha256=AvXehWWltrT9sXttpeGFhRoNO0PAjyNEiqnbxSiNpZI,11
|
|
|
96
96
|
adam/commands/bash/bash_completer.py,sha256=IStUg5LLTqc3vjupw33WtXUG9zRQ37BctjDYGDyYEXU,3883
|
|
97
97
|
adam/commands/bash/utils_bash.py,sha256=LmpTVPaM0aEMDqKPFnyEp5EidAyQQiiUkcvRjvOu-20,433
|
|
98
98
|
adam/commands/cql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
99
|
-
adam/commands/cql/cql_completions.py,sha256=
|
|
99
|
+
adam/commands/cql/cql_completions.py,sha256=Wr37WHWO4-zAYMRlG38GpfxFAIFHlmBUKSAHHsx7ftU,1465
|
|
100
100
|
adam/commands/cql/cqlsh.py,sha256=ddb1JBdCs8sMHt8L-1gDHIir9hbjxP0gJKpKCBFPFuM,2381
|
|
101
|
-
adam/commands/cql/utils_cql.py,sha256=
|
|
101
|
+
adam/commands/cql/utils_cql.py,sha256=H3XmGATVUfANhejwgPU1BoAcvRbq1Z0zpDeZXSp9g7M,12776
|
|
102
102
|
adam/commands/deploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
103
103
|
adam/commands/deploy/code_start.py,sha256=0h8AIPjThC7uxa4HVkYMdC-7qCNXk0QXO1zDrzIOA4s,1335
|
|
104
104
|
adam/commands/deploy/code_stop.py,sha256=R9zvNVD4NLUD3J6ktZ53Rsalzn-t0ZxEpeyOoiizfgU,1153
|
|
@@ -114,58 +114,58 @@ adam/commands/deploy/undeploy_pg_agent.py,sha256=t9l9XJiChiH61Z7Zc967b3zH_Tsj7Gr
|
|
|
114
114
|
adam/commands/deploy/undeploy_pod.py,sha256=Pc5xpU4z5_CHrtz3cAzReT4Qxyks2kQ-uWSRUnAYiJ4,1907
|
|
115
115
|
adam/commands/devices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
116
116
|
adam/commands/devices/device.py,sha256=UPqHLQXar5a3ENQDaqimcX2DrX3OPILrbBTTfIB39F4,3336
|
|
117
|
-
adam/commands/devices/device_app.py,sha256=
|
|
117
|
+
adam/commands/devices/device_app.py,sha256=Wik6s_RB6vtCsQQvIEK6PelnAvutzQrzWewLiMvqCiw,6811
|
|
118
118
|
adam/commands/devices/device_auit_log.py,sha256=PaniVrADdqQM0xAkXtT3w5MFkERKWH0wdHl3mXnlMpo,1587
|
|
119
|
-
adam/commands/devices/device_cass.py,sha256=
|
|
120
|
-
adam/commands/devices/device_export.py,sha256=
|
|
121
|
-
adam/commands/devices/device_postgres.py,sha256=
|
|
119
|
+
adam/commands/devices/device_cass.py,sha256=GlbjnEu92hKFOls-jLqMJ0y6y5WPk5KV9CQqvf72hDE,7059
|
|
120
|
+
adam/commands/devices/device_export.py,sha256=yROeaNC1e0HkUuXlPy_v1MUi9CmoDIta8KNVohzuVBI,2946
|
|
121
|
+
adam/commands/devices/device_postgres.py,sha256=Iriz4m3fKSbyk2CuLYIxZuNE60fGnkSLhHtzrEx8jNQ,5791
|
|
122
122
|
adam/commands/devices/devices.py,sha256=-VV8nU-Qcebx2g2ftOywmgrn8wW7-teCpxFQjU9wBR4,965
|
|
123
123
|
adam/commands/export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
124
|
-
adam/commands/export/clean_up_all_export_sessions.py,sha256=
|
|
125
|
-
adam/commands/export/clean_up_export_sessions.py,sha256=
|
|
126
|
-
adam/commands/export/drop_export_database.py,sha256=
|
|
127
|
-
adam/commands/export/drop_export_databases.py,sha256=
|
|
128
|
-
adam/commands/export/export.py,sha256=
|
|
129
|
-
adam/commands/export/export_databases.py,sha256=
|
|
130
|
-
adam/commands/export/
|
|
131
|
-
adam/commands/export/
|
|
132
|
-
adam/commands/export/
|
|
133
|
-
adam/commands/export/export_use.py,sha256=
|
|
134
|
-
adam/commands/export/exporter.py,sha256
|
|
135
|
-
adam/commands/export/import_session.py,sha256=
|
|
136
|
-
adam/commands/export/importer.py,sha256=
|
|
137
|
-
adam/commands/export/importer_athena.py,sha256=
|
|
138
|
-
adam/commands/export/importer_sqlite.py,sha256=
|
|
139
|
-
adam/commands/export/show_column_counts.py,sha256=
|
|
140
|
-
adam/commands/export/show_export_databases.py,sha256=
|
|
141
|
-
adam/commands/export/show_export_session.py,sha256=
|
|
142
|
-
adam/commands/export/show_export_sessions.py,sha256=
|
|
143
|
-
adam/commands/export/utils_export.py,sha256=
|
|
124
|
+
adam/commands/export/clean_up_all_export_sessions.py,sha256=yWDC9ts2HYachcfffqhbXwAIi5xwvsE3m7XNNFk-xLQ,1221
|
|
125
|
+
adam/commands/export/clean_up_export_sessions.py,sha256=ERLcGgzY5j3GoqkGJy-THYDgJLANAlpWnCnZ4vkH-y0,1600
|
|
126
|
+
adam/commands/export/drop_export_database.py,sha256=3S6yj0OuMknPZ1MpPad7eCm1V6BdDn6enHcjRC_fjek,1232
|
|
127
|
+
adam/commands/export/drop_export_databases.py,sha256=WzOm4Ykf1O_ZRjF8oZn_PaKTuIzxFeRJhqWfsENCstg,1095
|
|
128
|
+
adam/commands/export/export.py,sha256=l-3dSKXVdAteicfQvkLmELRJ42LBmCAqhOqL0uthrJA,2105
|
|
129
|
+
adam/commands/export/export_databases.py,sha256=aZogr6UZsSjvqTkPemF-pdscMZMDkwx3JXOAspmlmS4,7626
|
|
130
|
+
adam/commands/export/export_select.py,sha256=wVkw7Th3Abs-zRJO0Rk310GUl8nEOyWLbXNLaBZ3Mq8,3113
|
|
131
|
+
adam/commands/export/export_select_x.py,sha256=WuSkuhB4yfz0IVt3-Dd42GG7FTWoNzBhVsfieEN51W0,2020
|
|
132
|
+
adam/commands/export/export_sessions.py,sha256=vaT3o8K9uOXvJ5jzTxZONm6QcEAbhgCNqdK0-GXiY9s,4623
|
|
133
|
+
adam/commands/export/export_use.py,sha256=j7eNmlnNtyTrk3AyAZzA8kkU2C7e1pmAmNFwIMdDSA0,1354
|
|
134
|
+
adam/commands/export/exporter.py,sha256=qj0b6gXCmj7k0cCQFShHde54_l4n0zVhPCHkO559034,13858
|
|
135
|
+
adam/commands/export/import_session.py,sha256=tb_ybcQbUN4kbc7MuUqsg75NY9tXzXdJSh1zcXs0ILQ,1393
|
|
136
|
+
adam/commands/export/importer.py,sha256=V4EbanV-rEmbqP43u8_07YY98A7wdbwjo1j7BMNzfOU,2450
|
|
137
|
+
adam/commands/export/importer_athena.py,sha256=zNKWFi90wACmOgVEfzMyEt6V4yF1Hl7uo6wYOwIh84k,3373
|
|
138
|
+
adam/commands/export/importer_sqlite.py,sha256=0hvo3MoIs_J9vjsO0iCMRcYOzR7GpRx9Law7CVP5arQ,1720
|
|
139
|
+
adam/commands/export/show_column_counts.py,sha256=zsECHmHgwFATmsyshLbDgG2uBgAosGEwPmwhB_RJF04,1638
|
|
140
|
+
adam/commands/export/show_export_databases.py,sha256=G1Ue-c_fKs_xEesCZV7gVdPY6w-AbJ_M6jWSw-hf73Q,1229
|
|
141
|
+
adam/commands/export/show_export_session.py,sha256=Gzrj87PZDwevACL17P7dH2a91QYkSwFezguAfMdtv0Q,1481
|
|
142
|
+
adam/commands/export/show_export_sessions.py,sha256=xyuDu8oUkTdMKfBHhAUOcwIQdZWcl0ePkSM27wuomIA,1599
|
|
143
|
+
adam/commands/export/utils_export.py,sha256=5TUHfkt4Lx5iO6OizSBxiJxyNgAVDAslUaVMX2dKkF0,11311
|
|
144
144
|
adam/commands/medusa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
145
145
|
adam/commands/medusa/medusa.py,sha256=Ey2kJpoKqPFP6m623B3ciMoLur5SVcHEBYsvW7G7aAY,958
|
|
146
|
-
adam/commands/medusa/medusa_backup.py,sha256=
|
|
147
|
-
adam/commands/medusa/medusa_restore.py,sha256
|
|
146
|
+
adam/commands/medusa/medusa_backup.py,sha256=1yWMGEipdZ_2vALAYdmyPjZWrX6kY7E0OuPxiBv0tfw,1759
|
|
147
|
+
adam/commands/medusa/medusa_restore.py,sha256=_v5-d_yAjvpTivpROS51IV95Jj0WE1qZvDkY_kczQrw,3271
|
|
148
148
|
adam/commands/medusa/medusa_show_backupjobs.py,sha256=rAlhpXH2mhY-1ScSGm32llLh5_fNbHS2wLR0pdi6LBw,1761
|
|
149
149
|
adam/commands/medusa/medusa_show_restorejobs.py,sha256=KxPgUOHGqik4G7B4GnsX9Ogr1yDIR5k1lf4fkJXPjwM,1556
|
|
150
150
|
adam/commands/postgres/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
151
|
-
adam/commands/postgres/postgres.py,sha256=
|
|
151
|
+
adam/commands/postgres/postgres.py,sha256=1QCgDe_8b6-z02XoUpk9wbQ2j5ZMi6rRiZ_bXElE6K8,3478
|
|
152
152
|
adam/commands/postgres/postgres_context.py,sha256=y_3n5kWBT_XFFCdPS8qYm5_2v4bJ-PuwH2EO_-IZUiQ,10784
|
|
153
153
|
adam/commands/postgres/postgres_ls.py,sha256=yT-V1mGnvImaIr4s75FUsV5klcrOB7HHJwWbY6h1Kpk,1111
|
|
154
154
|
adam/commands/postgres/postgres_preview.py,sha256=Bmw3YC98tFdjUx2CRHOakcvLHCOLtEiKxvNDjlDoRo0,1174
|
|
155
155
|
adam/commands/postgres/psql_completions.py,sha256=LVw7LvKSRh61Dfqxh_FZp7wmIeejHjK_V6QGwUrePfw,336
|
|
156
|
-
adam/commands/postgres/utils_postgres.py,sha256=
|
|
156
|
+
adam/commands/postgres/utils_postgres.py,sha256=omriBzuW0NQ16IF1Hy6FeVLvfGSWJeTMk34jwigDxrw,2108
|
|
157
157
|
adam/commands/reaper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
158
158
|
adam/commands/reaper/reaper.py,sha256=Xrfjvqtn5txnaMwofBb77yEsmSYLO_-Bi43ABq2ZmaQ,1398
|
|
159
159
|
adam/commands/reaper/reaper_forward.py,sha256=Su3tFrx2MTTXvaPC0EsmCnTKDuUjziyED583IX2UJ84,3326
|
|
160
160
|
adam/commands/reaper/reaper_forward_session.py,sha256=CfKMYQPDZYQBtYQjxcPs7ns5e8AGZj9Q0LD8dOxvLl0,160
|
|
161
161
|
adam/commands/reaper/reaper_forward_stop.py,sha256=a8i6Zp4rYKFt6qC7iqpf57gDZTMAtZy1H1PXq5tTOHM,1375
|
|
162
162
|
adam/commands/reaper/reaper_restart.py,sha256=Ms3OWhV6pqEtmQiupvKO9ArTVBPlniPtg4BwPCgaFq8,1173
|
|
163
|
-
adam/commands/reaper/reaper_run_abort.py,sha256=
|
|
163
|
+
adam/commands/reaper/reaper_run_abort.py,sha256=f3D2EhtiPiLXBOx0vY-XmBivDrgLbppb4dgnStucNVk,1276
|
|
164
164
|
adam/commands/reaper/reaper_runs.py,sha256=hXfGdtlRyf6jOyoILGFEec_lL4RWn_Eqiw69Zge9SLo,3065
|
|
165
165
|
adam/commands/reaper/reaper_runs_abort.py,sha256=ykY8D5fcZwqMRebM2JxFClVksjeDIBTIQe5nSk5oyp0,2058
|
|
166
|
-
adam/commands/reaper/reaper_schedule_activate.py,sha256=
|
|
167
|
-
adam/commands/reaper/reaper_schedule_start.py,sha256=
|
|
168
|
-
adam/commands/reaper/reaper_schedule_stop.py,sha256=
|
|
166
|
+
adam/commands/reaper/reaper_schedule_activate.py,sha256=PELW78_kblgGegyRFXtIOMf3eIHxJt2D3jNEYITwHFw,1485
|
|
167
|
+
adam/commands/reaper/reaper_schedule_start.py,sha256=VjZ2E-pm8QpnVuMYw53VhfXUgfORC-DjJoDiERKqxYM,1472
|
|
168
|
+
adam/commands/reaper/reaper_schedule_stop.py,sha256=FWaUF3j8R6v57bNQm2np96QwsvBUS3Ee7TDDl5avbRM,1464
|
|
169
169
|
adam/commands/reaper/reaper_schedules.py,sha256=vbvt0JojQecWCo5i4M-3HenWSnJU68F1MAoWcPhp8bo,1071
|
|
170
170
|
adam/commands/reaper/reaper_status.py,sha256=IuRbQwlZB4pDZu4iuPk5TXdTqvzBTMtAl68tHiiPZM0,1801
|
|
171
171
|
adam/commands/reaper/utils_reaper.py,sha256=jQIjpBfQxCPfD_63RpbRZ_tbW2335mBaYiBHalhijSc,7541
|
|
@@ -211,7 +211,7 @@ adam/utils_k8s/custom_resources.py,sha256=95zVZchFtFWGZ_P-jLaSMl6WYTObn7PqeTLxZ_
|
|
|
211
211
|
adam/utils_k8s/deployment.py,sha256=SLhnMm5GMXwEldj2OupSFBUsvNjynwSNrv5tIDvLMrc,2921
|
|
212
212
|
adam/utils_k8s/ingresses.py,sha256=q8nJTIoxa_dVrGMl1HS5yTS_11jLNBAnWlc2ZishMEE,3458
|
|
213
213
|
adam/utils_k8s/jobs.py,sha256=HbUBNXcKcuXaNzc8NmqR_Sq35yHQ_qeQtiQFFM-J2QY,2534
|
|
214
|
-
adam/utils_k8s/k8s.py,sha256=
|
|
214
|
+
adam/utils_k8s/k8s.py,sha256=hq3kPTdDB9Fyny64mFLepOgtqpEEVw6wm6IveWzBRfY,3133
|
|
215
215
|
adam/utils_k8s/kube_context.py,sha256=xJF_72vUJu-X9MpIYzOIfnj7KEWU7a_sLBR-H3994Y0,3311
|
|
216
216
|
adam/utils_k8s/pods.py,sha256=Y3FnAxnmNJwpvUaIkXf2Wkdq2iSpw5AU2aJMKRLf9AQ,10865
|
|
217
217
|
adam/utils_k8s/secrets.py,sha256=xnqRSumCIcPaASDcErzxjx1BCE-qJkPoG5wIP7YHzIo,2430
|
|
@@ -223,8 +223,8 @@ adam/utils_repl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
223
223
|
adam/utils_repl/automata_completer.py,sha256=LJP_2WHHR7AtjX00MJ59VGQEL3t0XS-qYnDmMaZe-Tk,1641
|
|
224
224
|
adam/utils_repl/repl_completer.py,sha256=lsu0vWFdTs8SSSY9gxHN-fQSap-Wqz1QhMF4FqGf7qA,1722
|
|
225
225
|
adam/utils_repl/state_machine.py,sha256=kO4_oSi_M53f3QQjINzzb2VFptjbnqX3KRC0G8LqqeA,5426
|
|
226
|
-
kaqing-2.0.
|
|
227
|
-
kaqing-2.0.
|
|
228
|
-
kaqing-2.0.
|
|
229
|
-
kaqing-2.0.
|
|
230
|
-
kaqing-2.0.
|
|
226
|
+
kaqing-2.0.174.dist-info/METADATA,sha256=RW9iMrX4oWDyFahuaYLnN--UVcZfqK3SP-x_1xgVR60,133
|
|
227
|
+
kaqing-2.0.174.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
228
|
+
kaqing-2.0.174.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
|
|
229
|
+
kaqing-2.0.174.dist-info/top_level.txt,sha256=8_2PZkwBb-xDcnc8a2rAbQeJhXKXskc7zTP7pSPa1fw,5
|
|
230
|
+
kaqing-2.0.174.dist-info/RECORD,,
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
from adam.commands.command import Command
|
|
2
|
-
from adam.commands.export.export_databases import ExportDatabases
|
|
3
|
-
from adam.commands.export.exporter import Exporter
|
|
4
|
-
from adam.commands.export.utils_export import ExportSpec, state_with_pod
|
|
5
|
-
from adam.repl_state import ReplState
|
|
6
|
-
from adam.utils import log, log2
|
|
7
|
-
|
|
8
|
-
class ExportService:
|
|
9
|
-
def __init__(self, handler: 'ExporterHandler'):
|
|
10
|
-
self.handler = handler
|
|
11
|
-
|
|
12
|
-
def export(self, args: list[str], export_only=False):
|
|
13
|
-
state = self.handler.state
|
|
14
|
-
export_session = state.export_session
|
|
15
|
-
spec: ExportSpec = None
|
|
16
|
-
try:
|
|
17
|
-
with state_with_pod(state) as state:
|
|
18
|
-
# --export-only for testing only
|
|
19
|
-
statuses, spec = Exporter.export_tables(args, state, export_only=export_only)
|
|
20
|
-
if not statuses:
|
|
21
|
-
return state
|
|
22
|
-
|
|
23
|
-
Exporter.clear_export_session_cache()
|
|
24
|
-
|
|
25
|
-
if spec.importer == 'csv' or export_only:
|
|
26
|
-
ExportDatabases.disply_export_session(state.sts, state.pod, state.namespace, spec.session)
|
|
27
|
-
else:
|
|
28
|
-
log()
|
|
29
|
-
ExportDatabases.display_export_db(state.export_session)
|
|
30
|
-
finally:
|
|
31
|
-
# if exporting to csv, do not bind the new session id to repl state
|
|
32
|
-
if spec and spec.importer == 'csv':
|
|
33
|
-
state.export_session = export_session
|
|
34
|
-
|
|
35
|
-
return state
|
|
36
|
-
|
|
37
|
-
def import_sesion(self, args: list[str]):
|
|
38
|
-
state = self.handler.state
|
|
39
|
-
|
|
40
|
-
if not args:
|
|
41
|
-
if state.in_repl:
|
|
42
|
-
log2('Specify export session name.')
|
|
43
|
-
else:
|
|
44
|
-
log2('* Export session name is missing.')
|
|
45
|
-
|
|
46
|
-
Command.display_help()
|
|
47
|
-
|
|
48
|
-
return 'command-missing'
|
|
49
|
-
|
|
50
|
-
with state_with_pod(state) as state:
|
|
51
|
-
tables, _ = Exporter.import_session(args, state)
|
|
52
|
-
if tables:
|
|
53
|
-
Exporter.clear_export_session_cache()
|
|
54
|
-
|
|
55
|
-
log()
|
|
56
|
-
ExportDatabases.display_export_db(state.export_session)
|
|
57
|
-
|
|
58
|
-
return state
|
|
59
|
-
|
|
60
|
-
class ExporterHandler:
|
|
61
|
-
def __init__(self, state: ReplState):
|
|
62
|
-
self.state = state
|
|
63
|
-
|
|
64
|
-
def __enter__(self):
|
|
65
|
-
return ExportService(self)
|
|
66
|
-
|
|
67
|
-
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
68
|
-
return False
|
|
69
|
-
|
|
70
|
-
def export(state: ReplState):
|
|
71
|
-
return ExporterHandler(state)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|