Skip to content

Instantly share code, notes, and snippets.

View miharp's full-sized avatar

Michael Harp miharp

  • ServiceNow
  • San Diego
View GitHub Profile
@amatellanes
amatellanes / pytest.sh
Last active July 6, 2024 18:56
Useful py.test commands.
py.test test_sample.py --collect-only # collects information test suite
py.test test_sample.py -v # outputs verbose messages
py.test -q test_sample.py # omit filename output
python -m pytest -q test_sample.py # calling pytest through python
py.test --markers # show available markers
@miharp
miharp / Hadoop-CheatSheet
Last active September 17, 2020 14:01
Hadoop Commands
HDFS:
NameNode
su hdfs
/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf/ start namenode
su mapred
/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf/ start jobtracker
Secondary NameNode
/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf/ start secondarynamenode
@sit
sit / dump_cloudera_manager.py
Created October 29, 2013 03:38
A quick and dirty script to dump the cluster/service/role configuration via the Cloudera Manager API http://cloudera.github.io/cm_api/.
#!/usr/bin/env python
from cm_api.api_client import ApiResource
def main(args):
cm_host = get(args, 1, "localhost")
cm_user = get(args, 2, "admin")
cm_pass = get(args, 3, "admin")
api = ApiResource(cm_host, username=cm_user, password=cm_pass)