Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederico Melo authored and Frederico Melo committed Jun 8, 2016
0 parents commit 11c82ac
Show file tree
Hide file tree
Showing 119 changed files with 141,983 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .gitignore
@@ -0,0 +1,19 @@
**/target/**/*.*
**/*.log
**/logs/**/*.*
vf.gf.*
**/build/**/*.*
**/bin/**/*.*
*.log
**/.idea/**/*.*
**/.gradle/**/*.*
**/gradle/**/*.*
**/.class
**/.Rapp.history
**/.settings
**/.cache-main
**/.DS_store
**/.classpath
**/.springBeans
**/server1/**/*.*
**/locator/**/*.*
189 changes: 189 additions & 0 deletions ClusteringService/.factorypath

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ClusteringService/.gitignore
@@ -0,0 +1 @@
/bin/
31 changes: 31 additions & 0 deletions ClusteringService/.project
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ClusteringService</name>
<comment>Apache Spark + Hadoop meetup group. Intro workshop Apr 20</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.scala-ide.sdt.core.scalabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.springsource.ide.eclipse.gradle.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.scala-ide.sdt.core.scalanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
44 changes: 44 additions & 0 deletions ClusteringService/all-modules.properties
@@ -0,0 +1,44 @@
source.file=maven://org.springframework.cloud.stream.app:file-source-rabbit:1.0.0.BUILD-SNAPSHOT
source.ftp=maven://org.springframework.cloud.stream.app:ftp-source-rabbit:1.0.0.BUILD-SNAPSHOT
source.jdbc=maven://org.springframework.cloud.stream.app:jdbc-source-rabbit:1.0.0.BUILD-SNAPSHOT
source.jms=maven://org.springframework.cloud.stream.app:jms-source-rabbit:1.0.0.BUILD-SNAPSHOT
source.http=maven://org.springframework.cloud.stream.app:http-source-rabbit:1.0.0.BUILD-SNAPSHOT
source.load-generator=maven://org.springframework.cloud.stream.app:load-generator-source-rabbit:1.0.0.BUILD-SNAPSHOT
source.rabbit=maven://org.springframework.cloud.stream.app:rabbit-source-rabbit:1.0.0.BUILD-SNAPSHOT
source.sftp=maven://org.springframework.cloud.stream.app:sftp-source-rabbit:1.0.0.BUILD-SNAPSHOT
source.tcp=maven://org.springframework.cloud.stream.app:tcp-source-rabbit:1.0.0.BUILD-SNAPSHOT
source.time=maven://org.springframework.cloud.stream.app:time-source-rabbit:1.0.0.BUILD-SNAPSHOT
source.trigger=maven://org.springframework.cloud.stream.app:trigger-source-rabbit:1.0.0.BUILD-SNAPSHOT
source.twitterstream=maven://org.springframework.cloud.stream.app:twitterstream-source-rabbit:1.0.0.BUILD-SNAPSHOT
processor.bridge=maven://org.springframework.cloud.stream.app:bridge-processor-rabbit:1.0.0.BUILD-SNAPSHOT
processor.filter=maven://org.springframework.cloud.stream.app:filter-processor-rabbit:1.0.0.BUILD-SNAPSHOT
processor.groovy-filter=maven://org.springframework.cloud.stream.app:groovy-filter-processor-rabbit:1.0.0.BUILD-SNAPSHOT
processor.groovy-transform=maven://org.springframework.cloud.stream.app:groovy-transform-processor-rabbit:1.0.0.BUILD-SNAPSHOT
processor.httpclient=maven://org.springframework.cloud.stream.app:httpclient-processor-rabbit:1.0.0.BUILD-SNAPSHOT

#processor.pmml=maven://org.springframework.cloud.stream.app:pmml-processor-rabbit:1.0.0.BUILD-SNAPSHOT
# PATCHED PMML MODULE
processor.pmml=file:///Users/fmelo/roadshow/PivotalRoadshow2016/pmml-processor-rabbit-1.0.0.BUILD-SNAPSHOT.jar

processor.scriptable-transform=maven://org.springframework.cloud.stream.app:scriptable-transform-processor-rabbit:1.0.0.BUILD-SNAPSHOT
processor.splitter=maven://org.springframework.cloud.stream.app:splitter-processor-rabbit:1.0.0.BUILD-SNAPSHOT
processor.transform=maven://org.springframework.cloud.stream.app:transform-processor-rabbit:1.0.0.BUILD-SNAPSHOT
sink.aggregate-counter=maven://org.springframework.cloud.stream.app:aggregate-counter-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.cassandra=maven://org.springframework.cloud.stream.app:cassandra-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.counter=maven://org.springframework.cloud.stream.app:counter-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.field-value-counter=maven://org.springframework.cloud.stream.app:field-value-counter-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.file=maven://org.springframework.cloud.stream.app:file-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.ftp=maven://org.springframework.cloud.stream.app:ftp-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.gemfire=maven://org.springframework.cloud.stream.app:gemfire-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.gpfdist=maven://org.springframework.cloud.stream.app:gpfdist-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.hdfs=maven://org.springframework.cloud.stream.app:hdfs-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.jdbc=maven://org.springframework.cloud.stream.app:jdbc-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.log=maven://org.springframework.cloud.stream.app:log-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.rabbit=maven://org.springframework.cloud.stream.app:rabbit-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.redis=maven://org.springframework.cloud.stream.app:redis-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.router=maven://org.springframework.cloud.stream.app:router-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.tcp=maven://org.springframework.cloud.stream.app:tcp-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.throughput=maven://org.springframework.cloud.stream.app:throughput-sink-rabbit:1.0.0.BUILD-SNAPSHOT
sink.websocket=maven://org.springframework.cloud.stream.app:websocket-sink-rabbit:1.0.0.BUILD-SNAPSHOT
task.timestamp=maven://org.springframework.cloud.task.app:timestamp-task:1.0.0.BUILD-SNAPSHOT

129 changes: 129 additions & 0 deletions ClusteringService/build.gradle
@@ -0,0 +1,129 @@
buildscript {
ext {
springBootVersion = '1.3.3.RELEASE'
}
repositories {
mavenCentral()
flatDir dir: "${projectDir}/gradle/plugins"

}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("io.spring.gradle:dependency-management-plugin:0.5.6.RELEASE")
}
}

apply plugin: 'scala'
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'spring-boot'
apply plugin: "io.spring.dependency-management"


sourceCompatibility = 1.8
targetCompatibility = 1.8
version = '1.0'

sourceSets.main.scala.srcDir "src/main/java"
sourceSets.main.java.srcDirs = []



def scalaVersion = '2.10.6'

jar {
manifest {
attributes 'Main-Class': 'io.pivotal.demo.ClusterTrainingApp'
}
}


repositories {
mavenCentral()
mavenLocal()
maven { url "https://repo.spring.io/libs-release/" }
maven { url "https://repo.spring.io/libs-snapshot/" }
maven { url "http://repo.spring.io/milestone" }
}

configurations {
idea {
transitive = true
}
}


dependencies {

compile "org.scala-lang:scala-library:$scalaVersion"

compile ('org.apache.spark:spark-core_2.10:1.6.0'){
exclude group: 'com.fasterxml.jackson.core'
exclude group: 'com.fasterxml.jackson.module'
exclude group: 'org.slf4j'
exclude group: 'org.eclipse.jetty.orbit'
}


compile ('org.apache.spark:spark-mllib_2.10:1.6.0'){
exclude group: 'com.fasterxml.jackson.core'
exclude group: 'com.fasterxml.jackson.module'
exclude group: 'org.slf4j'
exclude group: 'org.eclipse.jetty.orbit'
}

compile('org.springframework.boot:spring-boot-starter-web'){
exclude group: 'com.fasterxml.jackson.core'
exclude (group: 'org.springframework.boot', module: 'spring-boot-starter-logging')

}

compile ('com.fasterxml.jackson.core:jackson-databind:2.6.5')

compile ('com.fasterxml.jackson.module:jackson-module-scala_2.10:2.6.5')

compile ('postgresql:postgresql:9.1-901-1.jdbc4')

compile ('com.databricks:spark-csv_2.10:1.4.0')

compile ('org.springframework.cloud:spring-cloud-spring-service-connector:1.2.2.RELEASE'){
exclude group: 'com.fasterxml.jackson.core'
exclude (group: 'org.springframework.boot', module: 'spring-boot-starter-logging')
}

compile ('org.springframework.cloud:spring-cloud-cloudfoundry-connector:1.2.2.RELEASE'){
exclude group: 'com.fasterxml.jackson.core'
exclude (group: 'org.springframework.boot', module: 'spring-boot-starter-logging')
}

// Spring Cloud Stream
//compile ('org.springframework.cloud:spring-cloud-stream:1.0.0.RELEASE')
//compile ('org.springframework.boot:spring-boot-configuration-processor')
//compile ('org.springframework.integration:spring-integration-xml'){
// exclude group: 'commons-logging'
//}
compile ('org.springframework.boot:spring-boot-starter-logging')

compile ('com.redislabs:spark-redis:0.1.1'){
exclude group: 'org.slf4j'
exclude group: 'org.scala-lang'
exclude group: 'org.apache.spark'
}
}


eclipse {
classpath {
containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
}
}


tasks.withType(ScalaCompile) {
scalaCompileOptions.useAnt = false
}




4 changes: 4 additions & 0 deletions ClusteringService/gradle.properties
@@ -0,0 +1,4 @@
sparkVersion=1.3.1
spring-cloud-connectors.version=1.2.1.RELEASE
# speed up gradle invocations with the daemon process
org.gradle.daemon=true
164 changes: 164 additions & 0 deletions ClusteringService/gradlew
@@ -0,0 +1,164 @@
#!/usr/bin/env bash

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
echo "$*"
}

die ( ) {
echo
echo "$*"
echo
exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option

if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

0 comments on commit 11c82ac

Please sign in to comment.