kaqing 2.0.193__tar.gz → 2.0.222__tar.gz
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.
- {kaqing-2.0.193 → kaqing-2.0.222}/PKG-INFO +1 -1
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/batch.py +12 -12
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/compactionstats.py +1 -1
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/cpu.py +1 -1
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/disk.py +5 -4
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/gossip.py +1 -1
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/memory.py +1 -1
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/status.py +1 -1
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/app/app.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/app/app_ping.py +2 -2
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/app}/login.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/app/show_app_actions.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/app/show_app_id.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/app/show_app_queues.py +2 -2
- {kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/app}/show_login.py +3 -3
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/app/utils_app.py +1 -1
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/audit/audit.py +3 -5
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/audit/audit_repair_tables.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/audit/audit_run.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/audit/show_last10.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/audit/show_slow10.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/audit/show_top10.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/bash/bash.py +2 -2
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/cassandra}/download_cassandra_log.py +4 -4
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/cassandra}/restart_cluster.py +2 -2
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/cassandra}/restart_node.py +2 -2
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/cassandra}/restart_nodes.py +2 -2
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/cassandra}/rollout.py +3 -3
- {kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/cassandra}/show_cassandra_repairs.py +2 -2
- {kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/cassandra}/show_cassandra_status.py +5 -12
- {kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/cassandra}/show_cassandra_version.py +2 -2
- {kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/cassandra}/show_processes.py +7 -7
- {kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/cassandra}/show_storage.py +4 -3
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/cassandra}/watch.py +2 -2
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/cli}/clipboard_copy.py +3 -4
- {kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/cli}/show_cli_commands.py +4 -4
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/code.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/command.py +32 -5
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/commands_utils.py +2 -29
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/config}/param_get.py +2 -2
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/config}/param_set.py +2 -2
- {kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/config}/show_params.py +2 -2
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/cql}/alter_tables.py +3 -3
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/cql/completions_c.py +3 -3
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/cql/cqlsh.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/cql/utils_cql.py +24 -13
- kaqing-2.0.222/adam/commands/debug/debug.py +22 -0
- kaqing-2.0.222/adam/commands/debug/debug_completes.py +35 -0
- kaqing-2.0.222/adam/commands/debug/debug_timings.py +35 -0
- kaqing-2.0.222/adam/commands/debug/show_offloaded_completes.py +45 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/deploy/code_start.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/deploy/code_stop.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/deploy/deploy_frontend.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/deploy/deploy_pg_agent.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/deploy/deploy_pod.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/deploy/undeploy_frontend.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/deploy/undeploy_pg_agent.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/deploy/undeploy_pod.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/devices/device.py +8 -8
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/devices/device_app.py +6 -6
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/devices/device_auit_log.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/devices/device_cass.py +6 -6
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/devices/device_export.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/devices/device_postgres.py +6 -6
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/diag}/check.py +3 -3
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/diag}/generate_report.py +2 -2
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/diag}/issues.py +3 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/exit.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/clean_up_all_export_sessions.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/clean_up_export_sessions.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/download_export_session.py +3 -4
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/drop_export_database.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/drop_export_databases.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/export.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/export_databases.py +17 -9
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/export_select.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/export_sessions.py +12 -10
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/export_use.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/export_x_select.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/exporter.py +140 -53
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/import_files.py +3 -7
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/import_session.py +2 -6
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/importer.py +11 -11
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/importer_athena.py +15 -6
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/importer_sqlite.py +19 -8
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/show_column_counts.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/show_export_databases.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/show_export_session.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/show_export_sessions.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/utils_export.py +37 -15
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/fs}/cat.py +2 -2
- kaqing-2.0.222/adam/commands/fs/cat_local.py +42 -0
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/fs}/cd.py +2 -2
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/fs}/download_file.py +3 -3
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/fs}/find_files.py +6 -6
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/fs}/find_processes.py +10 -20
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/fs}/head.py +4 -4
- kaqing-2.0.222/adam/commands/fs/head_local.py +46 -0
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/fs}/ls.py +2 -2
- kaqing-2.0.222/adam/commands/fs/ls_local.py +40 -0
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/fs}/pwd.py +2 -2
- kaqing-2.0.222/adam/commands/fs/rm.py +18 -0
- kaqing-2.0.222/adam/commands/fs/rm_downloads.py +39 -0
- kaqing-2.0.222/adam/commands/fs/rm_logs.py +38 -0
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/fs}/shell.py +2 -2
- {kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/fs}/show_adam.py +3 -3
- {kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/fs}/show_host.py +2 -2
- kaqing-2.0.222/adam/commands/fs/show_last_results.py +35 -0
- kaqing-2.0.222/adam/commands/fs/tail_local.py +46 -0
- kaqing-2.0.222/adam/commands/fs/utils_last_results.py +127 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/help.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/kubectl.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/medusa/medusa_backup.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/medusa/medusa_restore.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/medusa/medusa_show_backupjobs.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/medusa/medusa_show_restorejobs.py +2 -2
- kaqing-2.0.222/adam/commands/nodetool/nodetool.py +87 -0
- kaqing-2.0.222/adam/commands/nodetool/utils_nodetool.py +44 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/postgres/completions_p.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/postgres/postgres.py +3 -6
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/postgres/postgres_databases.py +1 -1
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/postgres/postgres_ls.py +3 -3
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/postgres/postgres_preview.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/postgres/utils_postgres.py +2 -1
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/preview_table.py +2 -3
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper_forward.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper_forward_stop.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper_restart.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper_run_abort.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper_runs.py +14 -12
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper_runs_abort.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper_schedule_activate.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper_schedule_start.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper_schedule_stop.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper_schedules.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper_status.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/utils_reaper.py +31 -5
- kaqing-2.0.222/adam/commands/repair/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/repair/repair_log.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/repair/repair_run.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/repair/repair_scan.py +2 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/repair/repair_stop.py +2 -2
- {kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands}/show.py +12 -11
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/config.py +4 -6
- kaqing-2.0.222/adam/embedded_params.py +2 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/repl.py +8 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/repl_commands.py +49 -39
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/repl_session.py +2 -0
- kaqing-2.0.222/adam/sql/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sql/async_executor.py +19 -1
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sql/qingl.lark +58 -59
- kaqing-2.0.222/adam/sso/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sso/cred_cache.py +2 -5
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils.py +215 -86
- kaqing-2.0.222/adam/utils_async_job.py +69 -0
- kaqing-2.0.222/adam/utils_k8s/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/app_clusters.py +11 -4
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/app_pods.py +9 -3
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/cassandra_clusters.py +12 -6
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/cassandra_nodes.py +16 -5
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/kube_context.py +1 -4
- {kaqing-2.0.193/adam → kaqing-2.0.222/adam/utils_k8s}/pod_exec_result.py +8 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/pods.py +95 -31
- kaqing-2.0.222/adam/utils_local.py +80 -0
- kaqing-2.0.222/adam/utils_repl/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_repl/repl_completer.py +6 -2
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_sqlite.py +3 -8
- kaqing-2.0.222/adam/version.py +5 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/kaqing.egg-info/PKG-INFO +1 -1
- {kaqing-2.0.193 → kaqing-2.0.222}/kaqing.egg-info/SOURCES.txt +60 -39
- {kaqing-2.0.193 → kaqing-2.0.222}/setup.py +1 -1
- kaqing-2.0.222/teddy/__init__.py +0 -0
- kaqing-2.0.193/adam/commands/nodetool.py +0 -64
- kaqing-2.0.193/adam/embedded_params.py +0 -2
- kaqing-2.0.193/adam/utils_local.py +0 -4
- kaqing-2.0.193/adam/version.py +0 -5
- {kaqing-2.0.193 → kaqing-2.0.222}/MANIFEST.in +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/README +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/app_session.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/apps.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/check.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/check_context.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/check_result.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/check_utils.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/cpu_metrics.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/checks/issue.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/cli.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/cli_group.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/column.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/columns.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/compactions.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/cpu.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/cpu_metrics.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/dir_data.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/dir_snapshots.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/gossip.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/host_id.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/memory.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/node_address.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/node_load.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/node_owns.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/node_status.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/node_tokens.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/node_utils.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/pod_name.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/volume_cassandra.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/columns/volume_root.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/app/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/audit/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/audit/completions_l.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/audit/utils_show_top10.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/bash/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/bash/bash_completer.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/bash/utils_bash.py +0 -0
- {kaqing-2.0.193/adam/commands/cql → kaqing-2.0.222/adam/commands/cassandra}/__init__.py +0 -0
- {kaqing-2.0.193/adam/commands/deploy → kaqing-2.0.222/adam/commands/cli}/__init__.py +0 -0
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/cli}/cli_commands.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/command_helpers.py +0 -0
- {kaqing-2.0.193/adam/commands/devices → kaqing-2.0.222/adam/commands/config}/__init__.py +0 -0
- {kaqing-2.0.193/adam/commands/export → kaqing-2.0.222/adam/commands/cql}/__init__.py +0 -0
- {kaqing-2.0.193/adam/commands/medusa → kaqing-2.0.222/adam/commands/debug}/__init__.py +0 -0
- {kaqing-2.0.193/adam/commands/postgres → kaqing-2.0.222/adam/commands/deploy}/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/deploy/code_utils.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/deploy/deploy.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/deploy/deploy_utils.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/deploy/undeploy.py +0 -0
- {kaqing-2.0.193/adam/commands/reaper → kaqing-2.0.222/adam/commands/devices}/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/devices/devices.py +0 -0
- {kaqing-2.0.193/adam/commands/repair → kaqing-2.0.222/adam/commands/diag}/__init__.py +0 -0
- {kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/export}/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/export/completions_x.py +0 -0
- {kaqing-2.0.193/adam/sql → kaqing-2.0.222/adam/commands/fs}/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/intermediate_command.py +0 -0
- {kaqing-2.0.193/adam/sso → kaqing-2.0.222/adam/commands/medusa}/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/medusa/medusa.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/medusa/utils_medusa.py +0 -0
- {kaqing-2.0.193/adam/utils_k8s → kaqing-2.0.222/adam/commands/nodetool}/__init__.py +0 -0
- {kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/nodetool}/nodetool_commands.py +0 -0
- {kaqing-2.0.193/adam/utils_repl → kaqing-2.0.222/adam/commands/postgres}/__init__.py +0 -0
- {kaqing-2.0.193/teddy → kaqing-2.0.222/adam/commands/reaper}/__init__.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/reaper/reaper_forward_session.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/commands/repair/repair.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/embedded_apps.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/log.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/repl_state.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sql/lark_completer.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sql/lark_parser.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sql/sql_completer.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sql/sql_state_machine.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sql/term_completer.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sso/authenticator.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sso/authn_ad.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sso/authn_okta.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sso/id_token.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sso/idp.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sso/idp_login.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sso/idp_session.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/sso/sso_config.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_athena.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_audits.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_issues.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/config_maps.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/custom_resources.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/deployment.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/ingresses.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/jobs.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/k8s.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/secrets.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/service_accounts.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/services.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/statefulsets.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_k8s/volumes.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_net.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_repl/appendable_completer.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_repl/automata_completer.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/adam/utils_repl/state_machine.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/kaqing.egg-info/dependency_links.txt +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/kaqing.egg-info/entry_points.txt +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/kaqing.egg-info/top_level.txt +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/setup.cfg +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/teddy/lark_parser.py +0 -0
- {kaqing-2.0.193 → kaqing-2.0.222}/teddy/lark_parser2.py +0 -0
|
@@ -2,28 +2,28 @@ import click
|
|
|
2
2
|
|
|
3
3
|
from adam.commands.audit.audit import Audit, AuditCommandHelper
|
|
4
4
|
from adam.commands.bash.bash import Bash
|
|
5
|
-
from adam.commands.
|
|
6
|
-
from adam.commands.
|
|
5
|
+
from adam.commands.cassandra.restart_nodes import RestartNodes
|
|
6
|
+
from adam.commands.cassandra.rollout import RollOut
|
|
7
|
+
from adam.commands.cassandra.watch import Watch
|
|
8
|
+
from adam.commands.cli.clipboard_copy import ClipboardCopy, CopyCommandHelper
|
|
7
9
|
from adam.commands.command import Command
|
|
8
10
|
from adam.commands.command_helpers import ClusterCommandHelper, ClusterOrPodCommandHelper, PodCommandHelper
|
|
9
11
|
from adam.commands.cql.cqlsh import CqlCommandHelper, Cqlsh
|
|
10
12
|
from adam.commands.deploy.deploy import Deploy, DeployCommandHelper
|
|
11
13
|
from adam.commands.deploy.undeploy import Undeploy, UndeployCommandHelper
|
|
12
|
-
from adam.commands.
|
|
13
|
-
from adam.commands.
|
|
14
|
-
from adam.commands.
|
|
15
|
-
from adam.commands.
|
|
14
|
+
from adam.commands.app.login import Login
|
|
15
|
+
from adam.commands.cassandra.download_cassandra_log import DownloadCassandraLog
|
|
16
|
+
from adam.commands.diag.check import Check, CheckCommandHelper
|
|
17
|
+
from adam.commands.diag.generate_report import GenerateReport
|
|
18
|
+
from adam.commands.diag.issues import Issues
|
|
19
|
+
from adam.commands.fs.ls import Ls
|
|
16
20
|
from adam.commands.medusa.medusa import Medusa
|
|
17
|
-
from adam.commands.nodetool import NodeTool, NodeToolCommandHelper
|
|
21
|
+
from adam.commands.nodetool.nodetool import NodeTool, NodeToolCommandHelper
|
|
18
22
|
from adam.commands.postgres.postgres import Postgres, PostgresCommandHelper
|
|
19
23
|
from adam.commands.preview_table import PreviewTable
|
|
20
24
|
from adam.commands.reaper.reaper import Reaper, ReaperCommandHelper
|
|
21
25
|
from adam.commands.repair.repair import Repair, RepairCommandHelper
|
|
22
|
-
from adam.commands.
|
|
23
|
-
from adam.commands.restart_nodes import RestartNodes
|
|
24
|
-
from adam.commands.rollout import RollOut
|
|
25
|
-
from adam.commands.show.show import Show, ShowCommandHelper
|
|
26
|
-
from adam.commands.watch import Watch
|
|
26
|
+
from adam.commands.show import Show, ShowCommandHelper
|
|
27
27
|
from adam.utils_k8s.kube_context import KubeContext
|
|
28
28
|
from adam.repl import enter_repl
|
|
29
29
|
from adam.repl_state import ReplState
|
|
@@ -15,7 +15,7 @@ class CompactionStats(Check):
|
|
|
15
15
|
issues: list[Issue] = []
|
|
16
16
|
|
|
17
17
|
try:
|
|
18
|
-
result = CassandraNodes.exec(ctx.pod, ctx.namespace, f"nodetool -u {ctx.user} -pw {ctx.pw} compactionstats", show_out=ctx.show_output)
|
|
18
|
+
result = CassandraNodes.exec(ctx.pod, ctx.namespace, f"nodetool -u {ctx.user} -pw {ctx.pw} compactionstats", show_out=ctx.show_output, text_color='gray')
|
|
19
19
|
compactions = parse_nodetool_compactionstats(result.stdout)
|
|
20
20
|
pod_details = {
|
|
21
21
|
'name': ctx.pod,
|
|
@@ -31,7 +31,7 @@ class Cpu(Check):
|
|
|
31
31
|
details['limit'] = container.resources.limits["cpu"]
|
|
32
32
|
|
|
33
33
|
idle = 'Unknown'
|
|
34
|
-
result = CassandraNodes.exec(ctx.pod, ctx.namespace, "mpstat 5 2 | grep Average | awk '{print $NF}'", show_out=ctx.show_output)
|
|
34
|
+
result = CassandraNodes.exec(ctx.pod, ctx.namespace, "mpstat 5 2 | grep Average | awk '{print $NF}'", show_out=ctx.show_output, text_color='gray')
|
|
35
35
|
lines = result.stdout.strip(' \r\n').split('\n')
|
|
36
36
|
line = lines[len(lines) - 1].strip(' \r')
|
|
37
37
|
idle = details['idle'] = line
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import re
|
|
2
2
|
from pathlib import Path
|
|
3
|
+
import traceback
|
|
3
4
|
|
|
4
5
|
from adam.checks.check import Check
|
|
5
6
|
from adam.checks.check_context import CheckContext
|
|
@@ -19,16 +20,16 @@ class Disk(Check):
|
|
|
19
20
|
|
|
20
21
|
try:
|
|
21
22
|
cass_data_path = Config().get('checks.cassandra-data-path', '/c3/cassandra')
|
|
22
|
-
df_result = CassandraNodes.exec(ctx.pod, ctx.namespace, f"df -h | grep -e '{cass_data_path}' -e 'overlay'", show_out=ctx.show_output)
|
|
23
|
+
df_result = CassandraNodes.exec(ctx.pod, ctx.namespace, f"df -h | grep -e '{cass_data_path}' -e 'overlay'", show_out=ctx.show_output, text_color='gray')
|
|
23
24
|
|
|
24
25
|
snapshot_size = Config().get('checks.snapshot-size-cmd', "ls /c3/cassandra/data/data/*/*/snapshots | grep snapshots | sed 's/:$//g' | xargs -I {} du -sk {} | awk '{print $1}' | awk '{s+=$1} END {print s}'")
|
|
25
|
-
ss_result = CassandraNodes.exec(ctx.pod, ctx.namespace, snapshot_size, show_out=ctx.show_output)
|
|
26
|
+
ss_result = CassandraNodes.exec(ctx.pod, ctx.namespace, snapshot_size, show_out=ctx.show_output, text_color='gray')
|
|
26
27
|
|
|
27
28
|
data_sizes = Config().get('checks.data-size-cmd', "du -sh /c3/cassandra/data/data")
|
|
28
|
-
ds_result = CassandraNodes.exec(ctx.pod, ctx.namespace, data_sizes, show_out=ctx.show_output)
|
|
29
|
+
ds_result = CassandraNodes.exec(ctx.pod, ctx.namespace, data_sizes, show_out=ctx.show_output, text_color='gray')
|
|
29
30
|
|
|
30
31
|
table_sizes = Config().get('checks.table-sizes-cmd', "ls -Al /c3/cassandra/data/data/ | awk '{print $9}' | sed 's/\^r//g' | xargs -I {} du -sk /c3/cassandra/data/data/{}")
|
|
31
|
-
ts_result = CassandraNodes.exec(ctx.pod, ctx.namespace, table_sizes, show_out=ctx.show_output)
|
|
32
|
+
ts_result = CassandraNodes.exec(ctx.pod, ctx.namespace, table_sizes, show_out=ctx.show_output, text_color='gray')
|
|
32
33
|
|
|
33
34
|
result = self.build_details(ctx, df_result.stdout, ss_result.stdout, ds_result.stdout, ts_result.stdout)
|
|
34
35
|
|
|
@@ -32,7 +32,7 @@ class Gossip(Check):
|
|
|
32
32
|
# TOKENS:21:<hidden>
|
|
33
33
|
# STATUS line missing -> NORMAL
|
|
34
34
|
# user, pw = get_user_pass(pod_name, ns)
|
|
35
|
-
result = CassandraNodes.exec(ctx.pod, ctx.namespace, f"nodetool -u {ctx.user} -pw {ctx.pw} gossipinfo", show_out=ctx.show_output)
|
|
35
|
+
result = CassandraNodes.exec(ctx.pod, ctx.namespace, f"nodetool -u {ctx.user} -pw {ctx.pw} gossipinfo", show_out=ctx.show_output, text_color='gray')
|
|
36
36
|
|
|
37
37
|
nodes = self.parse_gossipinfo(result.stdout)
|
|
38
38
|
details = {
|
|
@@ -47,7 +47,7 @@ class Memory(Check):
|
|
|
47
47
|
|
|
48
48
|
def find_error(self, ctx: CheckContext, pattern: str, issue_desc: str):
|
|
49
49
|
escaped = pattern.replace('"', '\"')
|
|
50
|
-
result = CassandraNodes.exec(ctx.pod, ctx.namespace, f'tac /c3/cassandra/logs/system.log | grep "{escaped}" | head -1', show_out=ctx.show_output)
|
|
50
|
+
result = CassandraNodes.exec(ctx.pod, ctx.namespace, f'tac /c3/cassandra/logs/system.log | grep "{escaped}" | head -1', show_out=ctx.show_output, text_color='gray')
|
|
51
51
|
if result.stdout.find(pattern) > 0:
|
|
52
52
|
return Issue(
|
|
53
53
|
statefulset=ctx.statefulset,
|
|
@@ -14,7 +14,7 @@ class Status(Check):
|
|
|
14
14
|
issues: list[Issue] = []
|
|
15
15
|
|
|
16
16
|
try:
|
|
17
|
-
result = CassandraNodes.exec(ctx.pod, ctx.namespace, f"nodetool -u {ctx.user} -pw {ctx.pw} status", show_out=ctx.show_output)
|
|
17
|
+
result = CassandraNodes.exec(ctx.pod, ctx.namespace, f"nodetool -u {ctx.user} -pw {ctx.pw} status", show_out=ctx.show_output, text_color='gray')
|
|
18
18
|
status = parse_nodetool_status(result.stdout)
|
|
19
19
|
pod_details = {
|
|
20
20
|
'name': ctx.pod,
|
|
@@ -34,5 +34,5 @@ class App(Command):
|
|
|
34
34
|
def completion(self, _: ReplState):
|
|
35
35
|
return {}
|
|
36
36
|
|
|
37
|
-
def help(self,
|
|
38
|
-
return
|
|
37
|
+
def help(self, state: ReplState):
|
|
38
|
+
return super().help(state, "post app action use 'show app actions' for registered actions --force refresh session", command='<AppType>.<AppAction>', args='<args> [--force]')
|
|
@@ -34,5 +34,5 @@ class AppPing(Command):
|
|
|
34
34
|
def completion(self, state: ReplState):
|
|
35
35
|
return super().completion(state, {'--force': None})
|
|
36
36
|
|
|
37
|
-
def help(self,
|
|
38
|
-
return
|
|
37
|
+
def help(self, state: ReplState):
|
|
38
|
+
return super().help(state, 'ping app server with Echo.echoStatic() --force refresh session', args='[--force]')
|
|
@@ -45,5 +45,5 @@ class ShowAppActions(Command):
|
|
|
45
45
|
def completion(self, state: ReplState):
|
|
46
46
|
return super().completion(state)
|
|
47
47
|
|
|
48
|
-
def help(self,
|
|
49
|
-
return
|
|
48
|
+
def help(self, state: ReplState):
|
|
49
|
+
return super().help(state, 'show registered app actions')
|
|
@@ -40,5 +40,5 @@ class ShowAppId(Command):
|
|
|
40
40
|
def completion(self, state: ReplState):
|
|
41
41
|
return super().completion(state)
|
|
42
42
|
|
|
43
|
-
def help(self,
|
|
44
|
-
return
|
|
43
|
+
def help(self, state: ReplState):
|
|
44
|
+
return super().help(state, 'show app id for the Cassandra cluster')
|
|
@@ -34,5 +34,5 @@ class ShowAppQueues(Command):
|
|
|
34
34
|
def completion(self, state: ReplState):
|
|
35
35
|
return super().completion(state, {'--force': None})
|
|
36
36
|
|
|
37
|
-
def help(self,
|
|
38
|
-
return
|
|
37
|
+
def help(self, state: ReplState):
|
|
38
|
+
return super().help(state, 'show invalidation queue counts --force refresh session', args='[--force]')
|
|
@@ -5,7 +5,7 @@ from adam.sso.idp import Idp
|
|
|
5
5
|
from adam.sso.idp_login import IdpLogin
|
|
6
6
|
from adam.commands.command import Command
|
|
7
7
|
from adam.repl_state import ReplState
|
|
8
|
-
from adam.utils import duration, tabulize,
|
|
8
|
+
from adam.utils import duration, tabulize, log2, log_exc
|
|
9
9
|
|
|
10
10
|
class ShowLogin(Command):
|
|
11
11
|
COMMAND = 'show login'
|
|
@@ -52,5 +52,5 @@ class ShowLogin(Command):
|
|
|
52
52
|
def completion(self, state: ReplState):
|
|
53
53
|
return super().completion(state)
|
|
54
54
|
|
|
55
|
-
def help(self,
|
|
56
|
-
return
|
|
55
|
+
def help(self, state: ReplState):
|
|
56
|
+
return super().help(state, 'show SSO login details')
|
|
@@ -3,7 +3,7 @@ from typing import Union
|
|
|
3
3
|
|
|
4
4
|
from adam.app_session import AppSession
|
|
5
5
|
from adam.apps import Apps
|
|
6
|
-
from adam.pod_exec_result import PodExecResult
|
|
6
|
+
from adam.utils_k8s.pod_exec_result import PodExecResult
|
|
7
7
|
from adam.repl_state import ReplState
|
|
8
8
|
from adam.utils import log2
|
|
9
9
|
from adam.utils_k8s.app_clusters import AppClusters
|
|
@@ -7,12 +7,10 @@ from adam.commands.audit.audit_run import AuditRun
|
|
|
7
7
|
from adam.commands.audit.show_last10 import ShowLast10
|
|
8
8
|
from adam.commands.audit.show_slow10 import ShowSlow10
|
|
9
9
|
from adam.commands.audit.show_top10 import ShowTop10
|
|
10
|
-
from adam.commands.audit.utils_show_top10 import show_top10_completions_for_nesting
|
|
11
10
|
from adam.commands.command import Command
|
|
12
11
|
from adam.commands.intermediate_command import IntermediateCommand
|
|
13
12
|
from adam.repl_state import ReplState
|
|
14
|
-
from adam.
|
|
15
|
-
from adam.utils import log2, wait_log
|
|
13
|
+
from adam.utils import log2
|
|
16
14
|
from adam.utils_athena import Athena
|
|
17
15
|
|
|
18
16
|
class Audit(IntermediateCommand):
|
|
@@ -59,8 +57,8 @@ class Audit(IntermediateCommand):
|
|
|
59
57
|
def cmd_list(self):
|
|
60
58
|
return [AuditRepairTables(), AuditRun(), ShowLast10(), ShowSlow10(), ShowTop10()]
|
|
61
59
|
|
|
62
|
-
def help(self,
|
|
63
|
-
return
|
|
60
|
+
def help(self, state: ReplState):
|
|
61
|
+
return super().help(state, 'run SQL queries on Athena audit database', command='[audit] [<sql-statements>]')
|
|
64
62
|
|
|
65
63
|
class AuditCommandHelper(click.Command):
|
|
66
64
|
def get_help(self, ctx: click.Context):
|
|
@@ -68,5 +68,5 @@ class AuditRepairTables(Command):
|
|
|
68
68
|
exec.submit(Athena.query, f'MSCK REPAIR TABLE {table}', None,)
|
|
69
69
|
exec.submit(Audits.put_meta, Audits.PARTITIONS_ADDED, meta,)
|
|
70
70
|
|
|
71
|
-
def help(self,
|
|
72
|
-
return
|
|
71
|
+
def help(self, state: ReplState):
|
|
72
|
+
return super().help(state, 'run MSCK REPAIR to discover new partitions')
|
|
@@ -32,5 +32,5 @@ class ShowLast10(Command):
|
|
|
32
32
|
def completion(self, _: ReplState):
|
|
33
33
|
return {}
|
|
34
34
|
|
|
35
|
-
def help(self,
|
|
36
|
-
return
|
|
35
|
+
def help(self, state: ReplState):
|
|
36
|
+
return super().help(state, 'show last <limit> audit lines <limit> defaults to 10', args='[limit]')
|
|
@@ -32,5 +32,5 @@ class ShowSlow10(Command):
|
|
|
32
32
|
def completion(self, _: ReplState):
|
|
33
33
|
return {}
|
|
34
34
|
|
|
35
|
-
def help(self,
|
|
36
|
-
return
|
|
35
|
+
def help(self, state: ReplState):
|
|
36
|
+
return super().help(state, 'show slow <limit> audit lines <limit> default to 10', args='[limit]')
|
|
@@ -32,5 +32,5 @@ class ShowTop10(Command):
|
|
|
32
32
|
def completion(self, _: ReplState):
|
|
33
33
|
return {}
|
|
34
34
|
|
|
35
|
-
def help(self,
|
|
36
|
-
return
|
|
35
|
+
def help(self, state: ReplState):
|
|
36
|
+
return super().help(state, 'show top <limit> audit lines <limit> default to 10', args='[limit]')
|
|
@@ -32,5 +32,5 @@ class Bash(Command):
|
|
|
32
32
|
def completion(self, state: ReplState):
|
|
33
33
|
return super().completion(state, {c : {'&': None} for c in ['ls', 'cat', 'head']}, pods=Devices.of(state).pods(state, '-'))
|
|
34
34
|
|
|
35
|
-
def help(self,
|
|
36
|
-
return
|
|
35
|
+
def help(self, state: ReplState):
|
|
36
|
+
return super().help(state, 'run bash on Cassandra nodes', args='[bash-commands] [&]')
|
{kaqing-2.0.193/adam/commands → kaqing-2.0.222/adam/commands/cassandra}/download_cassandra_log.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
2
|
from adam.commands.devices.devices import Devices
|
|
3
3
|
from adam.config import Config
|
|
4
|
-
from adam.pod_exec_result import PodExecResult
|
|
4
|
+
from adam.utils_k8s.pod_exec_result import PodExecResult
|
|
5
5
|
from adam.utils import log2
|
|
6
6
|
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
7
7
|
from adam.repl_state import ReplState, RequiredState
|
|
@@ -31,7 +31,7 @@ class DownloadCassandraLog(Command):
|
|
|
31
31
|
|
|
32
32
|
with self.validate(args, state) as (args, state):
|
|
33
33
|
path = Config().get('logs.path', '/c3/cassandra/logs/system.log')
|
|
34
|
-
r: PodExecResult = CassandraNodes.exec(state.pod, state.namespace, f'cat {path}', backgrounded=True,
|
|
34
|
+
r: PodExecResult = CassandraNodes.exec(state.pod, state.namespace, f'cat {path}', backgrounded=True, history=False)
|
|
35
35
|
|
|
36
36
|
to_file = Pods.download_file(state.pod, 'cassandra', state.namespace, path)
|
|
37
37
|
log2(f'Downloaded to {to_file}.')
|
|
@@ -41,5 +41,5 @@ class DownloadCassandraLog(Command):
|
|
|
41
41
|
def completion(self, state: ReplState):
|
|
42
42
|
return super().completion(state, pods=Devices.of(state).pods(state, '-'), auto='jit')
|
|
43
43
|
|
|
44
|
-
def help(self,
|
|
45
|
-
return
|
|
44
|
+
def help(self, state: ReplState):
|
|
45
|
+
return super().help(state, 'download cassandra system log')
|
|
@@ -43,5 +43,5 @@ class RestartCluster(Command):
|
|
|
43
43
|
def completion(self, state: ReplState):
|
|
44
44
|
return super().completion(state, {'--force': None})
|
|
45
45
|
|
|
46
|
-
def help(self,
|
|
47
|
-
return
|
|
46
|
+
def help(self, state: ReplState):
|
|
47
|
+
return super().help(state, 'restart all the nodes in the cluster', args='--force')
|
|
@@ -47,5 +47,5 @@ class RestartNode(Command):
|
|
|
47
47
|
def completion(self, state: ReplState):
|
|
48
48
|
return super().completion(state, {'--force': None}, pods=Devices.of(state).pods(state, '-'))
|
|
49
49
|
|
|
50
|
-
def help(self,
|
|
51
|
-
return
|
|
50
|
+
def help(self, state: ReplState):
|
|
51
|
+
return super().help(state, 'restart the node', args='--force')
|
|
@@ -43,5 +43,5 @@ class RestartNodes(Command):
|
|
|
43
43
|
def completion(self, state: ReplState):
|
|
44
44
|
return super().completion(state, lambda: {p: {'--force': None} for p in StatefulSets.pod_names(state.sts, state.namespace)})
|
|
45
45
|
|
|
46
|
-
def help(self,
|
|
47
|
-
return
|
|
46
|
+
def help(self, state: ReplState):
|
|
47
|
+
return super().help(state, 'restart Cassandra nodes', args='<pod-name>... --force')
|
|
@@ -3,8 +3,8 @@ from kubernetes import client
|
|
|
3
3
|
from kubernetes.client.rest import ApiException
|
|
4
4
|
|
|
5
5
|
from adam.commands import extract_options
|
|
6
|
+
from adam.commands.cassandra.watch import Watch
|
|
6
7
|
from adam.commands.command import Command
|
|
7
|
-
from adam.commands.watch import Watch
|
|
8
8
|
from adam.utils_k8s.statefulsets import StatefulSets
|
|
9
9
|
from adam.config import Config
|
|
10
10
|
from adam.repl_state import ReplState, RequiredState
|
|
@@ -84,5 +84,5 @@ class RollOut(Command):
|
|
|
84
84
|
|
|
85
85
|
return {}
|
|
86
86
|
|
|
87
|
-
def help(self,
|
|
88
|
-
return
|
|
87
|
+
def help(self, state: ReplState):
|
|
88
|
+
return super().help(state, 'rollout all nodes --force ignore current rolling out', args='[--force]')
|
|
@@ -33,5 +33,5 @@ class ShowCassandraRepairs(Command):
|
|
|
33
33
|
def completion(self, state: ReplState):
|
|
34
34
|
return super().completion(state, {'&': None})
|
|
35
35
|
|
|
36
|
-
def help(self,
|
|
37
|
-
return
|
|
36
|
+
def help(self, state: ReplState):
|
|
37
|
+
return super().help(state, 'show Cassandra repairs', args='[&]')
|
|
@@ -8,13 +8,14 @@ from adam.checks.gossip import Gossip
|
|
|
8
8
|
from adam.columns.columns import Columns
|
|
9
9
|
from adam.commands import extract_options, extract_trailing_options
|
|
10
10
|
from adam.commands.command import Command
|
|
11
|
+
from adam.commands.commands_utils import write_to_kaqing_log_file
|
|
11
12
|
from adam.commands.cql.utils_cql import cassandra
|
|
12
13
|
from adam.config import Config
|
|
13
14
|
from adam.repl_session import ReplSession
|
|
14
15
|
from adam.utils_issues import IssuesUtils
|
|
15
16
|
from adam.utils_k8s.statefulsets import StatefulSets
|
|
16
17
|
from adam.repl_state import ReplState, RequiredState
|
|
17
|
-
from adam.utils import SORT, tabulize, log2, log_exc
|
|
18
|
+
from adam.utils import SORT, log_dir, tabulize, log2, log_exc
|
|
18
19
|
from adam.checks.status import parse_nodetool_status
|
|
19
20
|
|
|
20
21
|
class ShowCassandraStatus(Command):
|
|
@@ -105,20 +106,12 @@ class ShowCassandraStatus(Command):
|
|
|
105
106
|
r = tabulize(status, lambda s: ','.join([c.host_value(check_results, s) for c in columns]), header=header, separator=',', sorted=SORT, to = 0 if backgrounded else 1)
|
|
106
107
|
|
|
107
108
|
if backgrounded:
|
|
108
|
-
|
|
109
|
-
log_file = f'{log_prefix}-{datetime.now().strftime("%d%H%M%S")}.log'
|
|
110
|
-
|
|
111
|
-
with open(log_file, 'w') as f:
|
|
112
|
-
f.write(r)
|
|
113
|
-
|
|
114
|
-
ReplSession().append_history(f':sh cat {log_file}')
|
|
115
|
-
|
|
116
|
-
r = log_file
|
|
109
|
+
r = write_to_kaqing_log_file(r)
|
|
117
110
|
|
|
118
111
|
IssuesUtils.show(check_results)
|
|
119
112
|
|
|
120
113
|
def completion(self, state: ReplState):
|
|
121
114
|
return super().completion(state, {'-s': {'&': None}, '&': None})
|
|
122
115
|
|
|
123
|
-
def help(self,
|
|
124
|
-
return
|
|
116
|
+
def help(self, state: ReplState):
|
|
117
|
+
return super().help(state, 'show merged nodetool status -s show processing details', args='[-s]')
|
|
@@ -31,5 +31,5 @@ class ShowCassandraVersion(Command):
|
|
|
31
31
|
def completion(self, state: ReplState):
|
|
32
32
|
return super().completion(state)
|
|
33
33
|
|
|
34
|
-
def help(self,
|
|
35
|
-
return
|
|
34
|
+
def help(self, state: ReplState):
|
|
35
|
+
return super().help(state, 'show Cassandra version')
|
{kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/cassandra}/show_processes.py
RENAMED
|
@@ -29,22 +29,22 @@ class ShowProcesses(Command):
|
|
|
29
29
|
with self.validate(args, state) as (args, state):
|
|
30
30
|
with extract_trailing_options(args, '&') as (args, backgrounded):
|
|
31
31
|
with extract_options(args, ['-s', '--show']) as (args, show_out):
|
|
32
|
-
with extract_sequence(args, ['with', 'recipe', '=', '
|
|
32
|
+
with extract_sequence(args, ['with', 'recipe', '=', 'mpstat']) as (_, recipe_qing):
|
|
33
33
|
cols = Config().get('processes.columns', 'pod,cpu-metrics,mem')
|
|
34
34
|
header = Config().get('processes.header', 'POD_NAME,M_CPU(USAGE/LIMIT),MEM/LIMIT')
|
|
35
35
|
if recipe_qing:
|
|
36
|
-
cols = Config().get('processes-
|
|
37
|
-
header = Config().get('processes-
|
|
36
|
+
cols = Config().get('processes-mpstat.columns', 'pod,cpu,mem')
|
|
37
|
+
header = Config().get('processes-mpstat.header', 'POD_NAME,Q_CPU/TOTAL,MEM/LIMIT')
|
|
38
38
|
|
|
39
39
|
with cassandra(state) as pods:
|
|
40
|
-
pods.display_table(cols, header, show_out=show_out, backgrounded=backgrounded)
|
|
40
|
+
pods.display_table(cols, header, show_out=show_out, backgrounded=backgrounded, msg='Checking processes')
|
|
41
41
|
|
|
42
42
|
return state
|
|
43
43
|
|
|
44
44
|
def completion(self, state: ReplState):
|
|
45
|
-
recipes = ['metrics', '
|
|
45
|
+
recipes = ['metrics', 'mpstat']
|
|
46
46
|
return super().completion(state, {'with': {'recipe': {'=': {r: {'-s': {'&': None}, '&': None} for r in recipes}}}, '-s': {'&': None}, '&': None})
|
|
47
47
|
# return super().completion(state, {'with': {'recipe': {'=': {'metrics': {'-s': {'&': None}, '&': None}, 'qing': {'-s': {'&': None}}}}}, '-s': {'&': None}, '&': None})
|
|
48
48
|
|
|
49
|
-
def help(self,
|
|
50
|
-
return
|
|
49
|
+
def help(self, state: ReplState):
|
|
50
|
+
return super().help(state, 'show process overview -s show processing details', args='[with recipe=metrics|mpstat] [-s]')
|
{kaqing-2.0.193/adam/commands/show → kaqing-2.0.222/adam/commands/cassandra}/show_storage.py
RENAMED
|
@@ -3,6 +3,7 @@ from adam.commands.command import Command
|
|
|
3
3
|
from adam.commands.cql.utils_cql import cassandra
|
|
4
4
|
from adam.config import Config
|
|
5
5
|
from adam.repl_state import ReplState, RequiredState
|
|
6
|
+
from adam.utils import ing
|
|
6
7
|
|
|
7
8
|
class ShowStorage(Command):
|
|
8
9
|
COMMAND = 'show storage'
|
|
@@ -32,12 +33,12 @@ class ShowStorage(Command):
|
|
|
32
33
|
cols = Config().get('storage.columns', 'pod,volume_root,volume_cassandra,snapshots,data,compactions')
|
|
33
34
|
header = Config().get('storage.header', 'POD_NAME,VOLUME /,VOLUME CASS,SNAPSHOTS,DATA,COMPACTIONS')
|
|
34
35
|
with cassandra(state) as pods:
|
|
35
|
-
pods.display_table(cols, header, show_out=show_out, backgrounded=backgrounded)
|
|
36
|
+
pods.display_table(cols, header, show_out=show_out, backgrounded=backgrounded, msg='Checking storage')
|
|
36
37
|
|
|
37
38
|
return state
|
|
38
39
|
|
|
39
40
|
def completion(self, state: ReplState):
|
|
40
41
|
return super().completion(state, {'-s': {'&': None}, '&': None})
|
|
41
42
|
|
|
42
|
-
def help(self,
|
|
43
|
-
return
|
|
43
|
+
def help(self, state: ReplState):
|
|
44
|
+
return super().help(state, 'show storage overview -s show processing details', args='[-s]')
|
|
@@ -3,10 +3,9 @@ import click
|
|
|
3
3
|
import pyperclip
|
|
4
4
|
|
|
5
5
|
from adam.commands import validate_args
|
|
6
|
+
from adam.commands.cli.cli_commands import CliCommands
|
|
6
7
|
from adam.commands.command import Command, InvalidArgumentsException
|
|
7
8
|
from adam.commands.command_helpers import ClusterOrPodCommandHelper
|
|
8
|
-
from adam.commands.cli_commands import CliCommands
|
|
9
|
-
from adam.config import Config
|
|
10
9
|
from adam.repl_state import ReplState, RequiredState
|
|
11
10
|
from adam.utils import tabulize, log, log2
|
|
12
11
|
|
|
@@ -65,8 +64,8 @@ class ClipboardCopy(Command):
|
|
|
65
64
|
def completion(self, state: ReplState):
|
|
66
65
|
return super().completion(state, lambda: {key: None for key in CliCommands.values(state).keys()}, auto_key='cli.cp-auto-complete')
|
|
67
66
|
|
|
68
|
-
def help(self,
|
|
69
|
-
return
|
|
67
|
+
def help(self, state: ReplState):
|
|
68
|
+
return super().help(state, 'copy a value to clipboard for conveninence', args='<key')
|
|
70
69
|
|
|
71
70
|
class CopyCommandHelper(click.Command):
|
|
72
71
|
def lines(self):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
from adam.commands.cli.cli_commands import CliCommands
|
|
1
2
|
from adam.commands.command import Command
|
|
2
|
-
from adam.commands.cli_commands import CliCommands
|
|
3
3
|
from adam.repl_state import ReplState, RequiredState
|
|
4
|
-
from adam.utils import tabulize
|
|
4
|
+
from adam.utils import tabulize
|
|
5
5
|
|
|
6
6
|
class ShowKubectlCommands(Command):
|
|
7
7
|
COMMAND = 'show cli-commands'
|
|
@@ -52,5 +52,5 @@ class ShowKubectlCommands(Command):
|
|
|
52
52
|
def completion(self, state: ReplState):
|
|
53
53
|
return super().completion(state)
|
|
54
54
|
|
|
55
|
-
def help(self,
|
|
56
|
-
return
|
|
55
|
+
def help(self, state: ReplState):
|
|
56
|
+
return super().help(state, 'show kubectl commands')
|
|
@@ -53,5 +53,5 @@ class Code(Command):
|
|
|
53
53
|
def completion(self, state: ReplState):
|
|
54
54
|
return super().completion(state)
|
|
55
55
|
|
|
56
|
-
def help(self,
|
|
57
|
-
return
|
|
56
|
+
def help(self, state: ReplState):
|
|
57
|
+
return super().help(state, 'run interactive Python shell')
|
|
@@ -22,6 +22,9 @@ class Command:
|
|
|
22
22
|
def command(self) -> str:
|
|
23
23
|
pass
|
|
24
24
|
|
|
25
|
+
def aliases(self):
|
|
26
|
+
return None
|
|
27
|
+
|
|
25
28
|
# The chain of responsibility pattern
|
|
26
29
|
# Do not do child of child!!!
|
|
27
30
|
@abstractmethod
|
|
@@ -68,6 +71,13 @@ class Command:
|
|
|
68
71
|
for t in reversed(self.command().split(' ')):
|
|
69
72
|
d = {t: d}
|
|
70
73
|
|
|
74
|
+
if aliases := self.aliases():
|
|
75
|
+
for alias in aliases:
|
|
76
|
+
a = leaf
|
|
77
|
+
for t in reversed(alias.split(' ')):
|
|
78
|
+
a = {t: a}
|
|
79
|
+
d |= a
|
|
80
|
+
|
|
71
81
|
return d
|
|
72
82
|
|
|
73
83
|
def required(self) -> RequiredState:
|
|
@@ -79,16 +89,33 @@ class Command:
|
|
|
79
89
|
def validate_state(self, state: ReplState, show_err = True):
|
|
80
90
|
return state.validate(self.required(), show_err=show_err)
|
|
81
91
|
|
|
82
|
-
def help(self, _: ReplState
|
|
83
|
-
|
|
92
|
+
def help(self, _: ReplState, desc: str = None, command: str = None, args: str = None):
|
|
93
|
+
if not desc:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not command:
|
|
97
|
+
command = self.command()
|
|
98
|
+
if args:
|
|
99
|
+
args = f' {args}'
|
|
100
|
+
else:
|
|
101
|
+
args = ''
|
|
102
|
+
aliases = ' alias ' + ','.join(self.aliases()) if self.aliases() else ''
|
|
103
|
+
return f'{command}{args}{aliases}\t{desc}'
|
|
84
104
|
|
|
85
105
|
def args(self, cmd: str):
|
|
86
106
|
a = list(filter(None, cmd.split(' ')))
|
|
87
107
|
spec = self.command_tokens()
|
|
88
|
-
if spec
|
|
89
|
-
return
|
|
108
|
+
if spec == a[:len(spec)]:
|
|
109
|
+
return a
|
|
90
110
|
|
|
91
|
-
|
|
111
|
+
if aliases := self.aliases():
|
|
112
|
+
for alias in aliases:
|
|
113
|
+
a = list(filter(None, cmd.split(' ')))
|
|
114
|
+
spec = alias.split(' ')
|
|
115
|
+
if spec == a[:len(spec)]:
|
|
116
|
+
return a
|
|
117
|
+
|
|
118
|
+
return None
|
|
92
119
|
|
|
93
120
|
def apply_state(self, args: list[str], state: ReplState, resolve_pg = True, args_to_check = 6) -> tuple[ReplState, list[str]]:
|
|
94
121
|
"""
|