View director-config.conf
...
...
cloudera-manager {
...
...
# Use this option here to avoid having CM install JDK7 on the agents
# This is fine in situations where JDK8 is pre-installed during bootstrap
# For ex. via https://github.com/cloudera/director-scripts/tree/master/java8
javaInstallationStrategy: NONE
...
View PigServerJavaAction.java
// imports go here...
// example follows doc-suggestion from
// http://archive.cloudera.com/cdh5/cdh/5/oozie/WorkflowFunctionalSpec.html#a3.2.7_Java_Action
public class PigServerJavaAction extends Configured implements Tool {
public int run(String remainingArgs[]) {
// Process your remainingArgs...
// Do other prepare logic...
/*
View 001 - HBaseUDF.java
package com.cloudera.support.udfs;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.*;
import org.apache.hadoop.hive.ql.exec.MapredContext;
import org.apache.hadoop.hive.ql.exec.UDFArgumentException;
import org.apache.hadoop.hive.ql.exec.UDFArgumentLengthException;
import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException;
View README.md

Run as below, for example to check the Oozie Server role on a machine:

~> ROLENAME='OOZIE_SERVER' ./kvno-test.sh
View Foo.java
import org.apache.hadoop.fs.*;
import org.apache.hadoop.conf.*;
import org.apache.hadoop.hdfs.*;
import java.io.*;
class Foo {
public static void main(String args[]) throws Exception {
FileSystem fs = FileSystem.get(new Configuration());
DistributedFileSystem dfs = (DistributedFileSystem) fs;
View YarnClusterStatus.java
import org.apache.hadoop.yarn.client.api.*;
import org.apache.hadoop.yarn.api.records.*;
import org.apache.hadoop.yarn.conf.*;
class YarnClusterStatus {
public static void main(String args[]) throws Exception {
YarnClient client = YarnClient.createYarnClient();
client.init(new YarnConfiguration());
client.start();
for (NodeReport state : client.getNodeReports()) {
View mahout-0.8-on-cdh4
To grab and build, run the following:
~> git clone https://github.com/QwertyManiac/mahout-cdh4.git
~> cd mahout-cdh4/
~> mvn -Phadoop-0.23 -DskipTests -Dhadoop.version=2.0.0-mr1-cdh4.4.0 -Dmahout.skip.distribution=false clean package
~> cd distribution/target
~> ls -l mahout-distribution-0.8.tar.gz
The resulting release can be found under distribution/target directory after the build succeeds.
View Symlinks.java
View cassandra-cdh4.sh
git clone git://github.com/QwertyManiac/cassandra-cdh4.git
cd cassandra-cdh4
ant publish -Dversion=1.2.2
cp build/apache-cassandra-1.2.2-bin.tar.gz ~/
# The ~/apache-cassandra-1.2.2-bin.tar.gz is now the release build binaries, and you can use this to deploy/use Cassandra with CDH4
View DFWAppendTest.java
package com.cloudera.example;
import java.io.IOException;
import java.io.OutputStream;
import org.apache.avro.Schema;
import org.apache.avro.file.DataFileWriter;
import org.apache.avro.file.SeekableInput;
import org.apache.avro.mapred.FsInput;
import org.apache.avro.reflect.ReflectData;
import org.apache.avro.reflect.ReflectDatumWriter;