Skip to content

Instantly share code, notes, and snippets.

@cnauroth
cnauroth / gist:7ff52e9f80e7d856ddb3
Created June 11, 2015 15:18
Hadoop NameNode JMX REST Query for NameNodeStatus
> curl 'http://172.20.11.177:50070/jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus'
{
"beans" : [ {
"name" : "Hadoop:service=NameNode,name=NameNodeStatus",
"modelerType" : "org.apache.hadoop.hdfs.server.namenode.NameNode",
"State" : "active",
"NNRole" : "NameNode",
"HostAndPort" : "localhost:19000",
"SecurityEnabled" : false,
"LastHATransitionTime" : 0
@7171u
7171u / Cntlm Authentication Proxy for Docker.txt
Last active April 5, 2019 17:43
Docker Behind Proxy Network with Cntlm on Centos/RHEL
Install and Configure Cntlm:
1. Configure EPEL Repo and install cntlm
yum install cntlm
3. Generate hashes for password-less configuration and add one of the values to /etc/cntlm.conf
cntlm -u <user>@<domain> -H
3. vi /etc/cntlm.conf
Username <Username>
Domain <Domain>
PassNTLMv2 BCB555F5BA8709B8186C2A813C47A4BD # Only for user '<user>', domain '<domain>'
Proxy <ProxyServer>:<Port>
@drelu
drelu / example-webhdfs.py
Created December 28, 2011 20:07
WebHDFS Python Example
from webhdfs.webhdfs import WebHDFS
import os, tempfile
import time
webhdfs = WebHDFS("localhost", 50070, "luckow")
webhdfs.mkdir("/hello-world/")
# create a temporary file
f = tempfile.NamedTemporaryFile()