Skip to content

Instantly share code, notes, and snippets.

@mattf
mattf / wallaby_accounting_group_porcelain.txt
Created November 14, 2012 20:12
wallaby accounting group porcelain
This is porcelain for managing an AccountingGroups feature.
The AccountingGroups feature should be independently added to nodes
potentially running a condor_negotiator.
A group: Name (str), Static (int), Dynamic (float), Surplus (tri)
A name: may have multiple dots (.), e.g. A, A.B, B, C, C.D,
representing a Parent.Child relationship
Static and Dynamic are mutually exclusive
Surplus is Yes/No/Default
@mattf
mattf / gettrustedglusterfspathinfo.c
Created February 11, 2013 13:49
Tool to get the trusted.glusterfs.pathinfo extended attribute from a file
/*
* Allow retrieval of ONLY the trusted.glusterfs.pathinfo extended
* attribute on a file.
*/
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
package org.apache.hadoop.fs.glusterfs;
import java.net.URI;
import java.io.File;
import java.io.RandomAccessFile;
import java.io.IOException;
import java.nio.channels.FileLock;
-- invoke with two arguments, the input file , and the output file. -input /bps/gen -output /bps/analytics
-- FYI...
-- If you run into errors, you can see them in
-- ./target/failsafe-reports/TEST-org.bigtop.bigpetstore.integration.BigPetStorePigIT.xml
-- First , we load data in from a file, as tuples.
-- in pig, relations like tables in a relational database
-- so each relation is just a bunch of tuples.
-- in this case csvdata will be a relation,
@mattf
mattf / gist:10578722
Last active August 29, 2015 13:59
sahara bigpetstore script
create node group
- master
- namenode, oozie, resourcemanager, historyserver
create node group
- worker
- datanode, nodemanager
create cluster
- master: 1
@mattf
mattf / kubelet_hostname
Created February 19, 2015 15:04
fake hostname for running kubelet with asymmetric name resolution
#!/bin/sh
# mv /bin/hostname /bin/hostname.real
# install $0 as /bin/hostname (a+rx)
TARGET="kubelet"
IFACE=eth0
PARENT=$(ps -oucmd= $PPID)
kind: Template
apiVersion: v1
template: oshinko
metadata:
name: oshinko
objects:
- kind: Service
apiVersion: v1
metadata:
@mattf
mattf / graaftel.txt
Last active January 24, 2017 23:12
: Start up an OpenShift Origin cluster locally
oc cluster up
: Launch Oshinko in the current project
oc new-app -f http://goo.gl/ZU02P4
: Authorize Oshinko to write to the OpenShift API
oc policy add-role-to-user edit -z oshinko
: Anayltical application demo - counting words by Joyce
: joyce writes text to a socket
@mattf
mattf / oshinko.app
Last active January 24, 2017 23:06
kind: Template
apiVersion: v1
template: oshinko
metadata:
name: oshinko
objects:
- kind: ServiceAccount
apiVersion: v1
metadata:
: Start up an OpenShift Origin cluster locally
oc cluster up
: Install Oshinko components
oc create -f http://radanalytics.io/resources.yaml
: Install Apache Kafka for OpenShift components
oc create -f https://raw.githubusercontent.com/mattf/openshift-kafka/master/resources.yaml
: Launch an Apache Kafka instance, it is 1-pod, not replicated, not persistent, just-enough kafka