Skip to content
Browse files

new files

  • Loading branch information...
1 parent c31bce2 commit 7d28f705e191e0402bc0de8e7ad84cf50d814814 @cwensel committed Aug 20, 2010
Showing with 238 additions and 1 deletion.
  1. +34 −0 README.txt
  2. +203 −0 build.xml
  3. +0 −1 src/java/cascading/memcached/MCOutputCollector.java
  4. +1 −0 version.properties
View
34 README.txt
@@ -0,0 +1,34 @@
+
+Welcome
+
+ This is the Cascading.Memcached module.
+
+ It provides support for reading/writing data to/from an memcached
+ cluster when bound to a Cascading data processing flow.
+
+ Cascading is a feature rich API for defining and executing complex,
+ scale-free, and fault tolerant data processing workflows on a Hadoop
+ cluster. It can be found at the following location:
+
+ http://www.cascading.org/
+
+Building
+
+ This release requires at least Cascading 1.1.x. Hadoop 0.19.x,
+ and the related memcached release.
+
+ To build a jar,
+
+ > ant -Dcascading.home=... -Dhadoop.home=... jar
+
+ To test,
+
+ > ant -Dcascading.home=... -Dhadoop.home=... test
+
+where "..." is the install path of each of the dependencies.
+
+Using
+
+ The cascading-memcached.jar file should be added to the "lib"
+ directory of your Hadoop application jar file along with all
+ Cascading dependencies.
View
203 build.xml
@@ -0,0 +1,203 @@
+<?xml version="1.0"?>
+
+<!--
+ ~ Copyright (c) 2010 Concurrent, Inc.
+ ~
+ ~ This work has been released into the public domain
+ ~ by the copyright holder. This applies worldwide.
+ ~
+ ~ In case this is not legally possible:
+ ~ The copyright holder grants any entity the right
+ ~ to use this work for any purpose, without any
+ ~ conditions, unless such conditions are required by law.
+ -->
+
+<project name="cascading-memcached" default="build" basedir=".">
+
+ <!-- load properties first -->
+ <!--<property file="${user.home}/.${ant.project.name}.build.properties" />-->
+ <property file="${basedir}/build.properties"/>
+
+ <property file="${basedir}/version.properties"/>
+
+ <property name="cascading.jdbc.version" value="x.y.z"/>
+
+ <!-- these are optional, only used if you uncomment the project.class.path filesets below -->
+ <property name="hadoop.home" location="${basedir}/../hadoop"/>
+ <property name="hadoop.lib" location="${hadoop.home}/lib"/>
+
+ <!-- assumes Cascading shares the same parent directory, change if necessary -->
+ <property name="cascading.home" location="${basedir}/../cascading"/>
+ <property file="${cascading.home}/version.properties"/>
+ <property name="cascading.release.version" value="x.y.z"/>
+ <property name="cascading.filename.core" value="cascading-core-${cascading.release.version}.jar"/>
+ <property name="cascading.filename.xml" value="cascading-xml-${cascading.release.version}.jar"/>
+ <property name="cascading.filename.test" value="cascading-test-${cascading.release.version}.jar"/>
+ <property name="cascading.libs" value="${cascading.home}/lib"/>
+ <property name="cascading.libs.core" value="${cascading.libs}"/>
+ <property name="cascading.libs.xml" value="${cascading.libs}/xml"/>
+
+ <condition property="cascading.path" value="${cascading.home}/"
+ else="${cascading.home}/build">
+ <available file="${cascading.home}/${cascading.filename.core}"/>
+ </condition>
+
+ <property name="cascading.lib.core" value="${cascading.path}/${cascading.filename.core}"/>
+ <property name="cascading.lib.xml" value="${cascading.path}/${cascading.filename.xml}"/>
+ <property name="cascading.lib.test" value="${cascading.path}/${cascading.filename.test}"/>
+
+ <property name="src.dir" location="${basedir}/src/java"/>
+ <property name="src.test" location="${basedir}/src/test"/>
+
+ <available file="${src.dir}" type="dir" property="main.available"/>
+ <available file="${src.test}" type="dir" property="test.available"/>
+
+ <property name="conf.dir" location="${hadoop.home}/conf"/>
+
+ <property name="lib.dir" location="${basedir}/lib"/>
+
+ <property name="build.dir" location="${basedir}/build/"/>
+ <property name="build.classes" location="${build.dir}/classes"/>
+ <property name="build.test" location="${build.dir}/test"/>
+
+ <property name="test.results" location="${build.dir}/results"/>
+
+ <property name="javac.debug" value="true"/>
+
+ <property name="dist" location="dist"/>
+
+ <path id="project.class.path">
+ <pathelement location="${build.classes}"/>
+ <pathelement location="${build.test}"/>
+ <pathelement location="${cascading.lib.core}"/>
+ <pathelement location="${cascading.lib.xml}"/>
+ <pathelement location="${cascading.lib.test}"/>
+
+ <fileset dir="${cascading.libs}">
+ <include name="**/*.jar"/>
+ </fileset>
+
+
+ <!--<fileset dir="${lib.dir}">-->
+ <!--<include name="*.jar"/>-->
+ <!--</fileset>-->
+
+ <fileset dir="${hadoop.home}">
+ <include name="*.jar"/>
+ </fileset>
+
+ <fileset dir="${hadoop.home}/build" erroronmissingdir="false">
+ <include name="*.jar"/>
+ </fileset>
+
+ <fileset dir="${hadoop.lib}">
+ <include name="**/*.jar"/>
+ </fileset>
+
+ </path>
+
+ <target name="clean">
+
+ <echo message="cleaning..."/>
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist}"/>
+ <delete dir="${ant.project.name}.tgz"/>
+
+ </target>
+
+ <target name="build">
+
+ <echo message="building..."/>
+ <echo message="using cascading lib: ${cascading.lib.core}"/>
+ <mkdir dir="${build.classes}"/>
+ <mkdir dir="${build.test}"/>
+ <mkdir dir="${lib.dir}"/>
+
+ <javac srcdir="${src.dir}" destdir="${build.classes}" verbose="off" debug="${javac.debug}">
+ <classpath refid="project.class.path"/>
+ </javac>
+
+ <copy todir="${build.classes}">
+ <fileset dir="${src.dir}">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+
+ <javac srcdir="${src.test}" destdir="${build.test}" verbose="off" debug="${javac.debug}">
+ <classpath refid="project.class.path"/>
+ </javac>
+
+ <copy todir="${build.test}">
+ <fileset dir="${src.test}">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="jar" depends="build" description="creates module jar">
+
+ <jar jarfile="${build.dir}/${ant.project.name}-${cascading.jdbc.version}.jar">
+ <fileset dir="${build.classes}"/>
+ </jar>
+
+ </target>
+
+
+ <target name="test" depends="build">
+ <echo message="running all tests..."/>
+
+ <mkdir dir="${test.results}"/>
+ <mkdir dir="build/test/log"/>
+
+ <junit printsummary="true" showoutput="${test.showoutput}" fork="yes" haltonerror="no" haltonfailure="no" dir="."
+ maxmemory="756m">
+
+ <sysproperty key="test.cluster.enabled" value="${test.cluster.enabled}"/>
+ <sysproperty key="test.build.data" value="data"/>
+ <sysproperty key="hadoop.log.dir" value="build/test/log"/>
+
+ <!--<jvmarg value="-Xdebug"/>--><!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"/>-->
+
+ <classpath>
+ <path refid="project.class.path"/>
+ <pathelement path="${java.class.path}"/>
+ </classpath>
+ <formatter type="plain" usefile="true"/>
+
+ <test name="${testcase}" todir="${test.results}" if="testcase" haltonfailure="${test.haltonerror}"/>
+ <batchtest todir="${test.results}" haltonfailure="${test.haltonerror}" unless="testcase">
+ <fileset dir="${src.test}">
+ <include name="**/*Test.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+
+ </target>
+
+ <target name="dist" depends="clean" description="packages current project">
+
+ <mkdir dir="${dist}"/>
+
+ <copy todir="${dist}">
+
+ <fileset dir=".">
+ <include name="src/**"/>
+ <include name="build.xml"/>
+ <include name="README.txt"/>
+ </fileset>
+
+ </copy>
+
+ </target>
+
+ <target name="tar" depends="dist" description="creates an archive of current project">
+ <tar destfile="${ant.project.name}.tgz"
+ compression="gzip">
+ <tarfileset dir="dist/" prefix="${ant.project.name}">
+ <include name="**/**"/>
+ </tarfileset>
+ </tar>
+ </target>
+
+</project>
View
1 src/java/cascading/memcached/MCOutputCollector.java
@@ -40,7 +40,6 @@
private MemcachedClient client;
private CacheLoader cacheLoader;
-
public MCOutputCollector( String hostnames ) throws IOException
{
ConnectionFactoryBuilder builder = new ConnectionFactoryBuilder();
View
1 version.properties
@@ -0,0 +1 @@
+cascading.jdbc.version=0.0.4

0 comments on commit 7d28f70

Please sign in to comment.
Something went wrong with that request. Please try again.