cmd

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

cmd package contains all the command line flag and initialization logic for commands

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "ddc",
	Short: versions.GetCLIVersion() + " ddc connects via to dremio servers collects logs into an archive",
	Long: versions.GetCLIVersion() + ` ddc connects via ssh or kubectl and collects a series of logs and files for dremio, then puts those collected files in an archive
examples:

for ssh based communication to VMs or Bare metal hardware:

	# coordinator only
	ddc --coordinator 10.0.0.19 --ssh-user myuser 
	# coordinator and executors
	ddc --coordinator 10.0.0.19 --executors 10.0.0.20,10.0.0.21,10.0.0.22 --ssh-user myuser 
	# to collect job profiles, system tables, kv reports and wlm 
	ddc --coordinator 10.0.0.19 --executors 10.0.0.20,10.0.0.21,10.0.0.22 --ssh-user myuser  --dremio-pat-prompt
	# to avoid using the /tmp folder on nodes
	ddc --coordinator 10.0.0.19 --executors 10.0.0.20,10.0.0.21,10.0.0.22 --ssh-user myuser --transfer-dir /mnt/lots_of_storage/	

for kubernetes deployments:

	# coordinator only
	ddc --k8s --namespace mynamespace --coordinator app=dremio-coordinator 
	# coordinator and executors
	ddc --k8s --namespace mynamespace --coordinator app=dremio-coordinator --executors app=dremio-executor 
	# to collect job profiles, system tables, kv reports and wlm 
	ddc --k8s -n mynamespace -c app=dremio-coordinator -e app=dremio-executor --dremio-pat-prompt
`,
	Run: func(c *cobra.Command, args []string) {

	},
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute(args []string) error

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func RemoteCollect added in v0.6.0

func RemoteCollect(collectionArgs collection.Args, sshArgs ssh.Args, kubeArgs kubernetes.KubeArgs, k8sEnabled bool) error

func ValidateAndReadYaml added in v0.8.2

func ValidateAndReadYaml(ddcYaml string) (map[string]interface{}, error)

Types

This section is empty.

Directories

Path Synopsis
cmd package contains all the command line flag and initialization logic for commands
cmd package contains all the command line flag and initialization logic for commands
apicollect
apicollect provides all the methods that collect via the API, this is a substantial part of the activities of DDC so it gets it's own package
apicollect provides all the methods that collect via the API, this is a substantial part of the activities of DDC so it gets it's own package
conf
package conf provides configuration for the local-collect command
package conf provides configuration for the local-collect command
conf/autodetect
package autodetect looks at the system configuration and file names and tries to guess at the correct configuration
package autodetect looks at the system configuration and file names and tries to guess at the correct configuration
consent
package consent contains the logic for showing what files are collected as well the boilerplate text
package consent contains the logic for showing what files are collected as well the boilerplate text
ddcio
ddcio include helper code for io operations common to ddc
ddcio include helper code for io operations common to ddc
jvmcollect
package jvmcollect handles parsing of the jvm information
package jvmcollect handles parsing of the jvm information
logcollect
package logcollect contains the logic for log collection in the local-collect sub command
package logcollect contains the logic for log collection in the local-collect sub command
nodeinfocollect
package nodeinfocollect has all the methods for collecting the information for nodeinfo
package nodeinfocollect has all the methods for collecting the information for nodeinfo
queriesjson
queriesjson package contains the logic for collecting queries.json information
queriesjson package contains the logic for collecting queries.json information
threading
threading package provides support for simple concurrency and threading
threading package provides support for simple concurrency and threading
root
cli
package cli provides wrapper support for executing commands, this is so we can test the rest of the implementations quickly.
package cli provides wrapper support for executing commands, this is so we can test the rest of the implementations quickly.
collection
collection package provides the interface for collection implementation and the actual collection execution
collection package provides the interface for collection implementation and the actual collection execution
helpers
helpers package provides some general functions that do not have a good home
helpers package provides some general functions that do not have a good home
kubernetes
kubernetes package provides access to log collections on k8s
kubernetes package provides access to log collections on k8s
ssh
ssh package uses ssh and scp binaries to execute commands remotely and translate the results back to the calling node
ssh package uses ssh and scp binaries to execute commands remotely and translate the results back to the calling node
cmd package contains all the command line flag and initialization logic for commands
cmd package contains all the command line flag and initialization logic for commands

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL