Skip to content

Instantly share code, notes, and snippets.

View Buttonwood's full-sized avatar

Buttonwood Buttonwood

View GitHub Profile
@Buttonwood
Buttonwood / xrdp_rhel_centos_6.md
Created August 31, 2022 01:07 — forked from dduvnjak/xrdp_rhel_centos_6.md
Setting up xrdp on RHEL 6

1 - Install the prerequisites for building and installation

yum groupinstall Desktop -y
yum install finger cmake patch gcc make autoconf libtool automake pkgconfig openssl-devel gettext file pam-devel libX11-devel libXfixes-devel libjpeg-devel
yum install flex bison gcc-c++ libxslt perl-libxml-perl xorg-x11-font-utils tigervnc-server git -y
reboot

2 - Get the latest source from the xrdp git repo, build and install

git clone git://github.com/FreeRDP/xrdp.git
#!/usr/bin/python
import sys
from cm_api.api_client import ApiResource
## ** CM Connection Settings ******************************
cm_host = "localhost"
cm_port = "7180"
cm_login = "admin"
cm_password = "admin"
#!/usr/bin/python
## ********************************************************************************
## mr-usage-by-user.py
##
## Aggregates YARN MapReduce usage by day and user and writes the results to the console and to a file
##
## As the CM-API call "yarn.get_yarn_applications" can only return 1000 jobs max per call the script will make
## multiple calls to yarn.get_yarn_applications and aggregate all results between the script's global start and end times
##
@Buttonwood
Buttonwood / get-yarn-long-running-jobs.py
Created June 13, 2019 02:19 — forked from onefoursix/get-yarn-long-running-jobs.py
Example of using the Cloudera Manager API to poll for YARN health checks and to list long running jobs using a tsquery
#!/usr/bin/python
## ********************************************************************************
## get-yarn-long-running-jobs.py
##
## Usage: ./get-yarn-long-running-jobs.py
##
## Edit the settings below to connect to your Cluster
##
## ********************************************************************************
@Buttonwood
Buttonwood / get-hive-yarn-jobs-for-sentry-user.py
Created June 13, 2019 02:19 — forked from onefoursix/get-hive-yarn-jobs-for-sentry-user.py
Example of how to get info on Hive YARN jobs for a specific Sentry user using the Cloudera Manager API
#!/usr/bin/python
## ********************************************************************************
## get-hive-yarn-jobs-for-sentry-user.py
##
## Example of how to retrieve info on YARN Hive jobs for a given Sentry user
## using the Cloudera Manager API
##
## Usage: ./get-hive-yarn-jobs-for-sentry-user.py <sentry_user_name>
##
@Buttonwood
Buttonwood / impalaQueries.py
Created June 13, 2019 02:19 — forked from onefoursix/impalaQueries.py
Python CM-API Example to pull Impala Query metrics
#!/usr/bin/python
## *******************************************************************************************
## impalaQueries.py
##
## Getting Info on Impala Queries
##
## Usage: ./impalaQueries.py
##
## *******************************************************************************************
# Transforming a color scale
doInstall <- TRUE # Change to FALSE if you don't want packages installed.
toInstall <- c("ggplot2", "RColorBrewer", "scales")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
# Generate some data
nn <- 10000
myData <- data.frame(X = rnorm(nn),