Skip to content
Permalink
Browse files

wikipedia source stream

  • Loading branch information
guozhangwang committed Oct 7, 2015
1 parent 174a43c commit 6c6b83fe0c26f72314f7aaf783958637fa2e078a
@@ -71,7 +71,7 @@ do
CLASSPATH=$CLASSPATH:$file
done

for cc_pkg in "api" "runtime" "file" "json"
for cc_pkg in "api" "runtime" "file" "json" "wikipedia"
do
for file in $base_dir/copycat/${cc_pkg}/build/libs/copycat-${cc_pkg}*.jar $base_dir/copycat/${cc_pkg}/build/dependant-libs/*.jar;
do
@@ -33,6 +33,7 @@ def junit='junit:junit:4.11'
def easymock='org.easymock:easymock:3.3.1'
def powermock='org.powermock:powermock-module-junit4:1.6.2'
def powermock_easymock='org.powermock:powermock-api-easymock:1.6.2'
def schwering_irclib='org.schwering:irclib:1.10'

allprojects {
apply plugin: 'idea'
@@ -214,7 +215,7 @@ for ( sv in ['2_10_5', '2_11_7'] ) {
}
}

def copycatPkgs = ['copycat:api', 'copycat:runtime', 'copycat:json', 'copycat:file']
def copycatPkgs = ['copycat:api', 'copycat:runtime', 'copycat:json', 'copycat:file', "copycat:wikipedia"]
def pkgs = ['clients', 'examples', 'contrib:hadoop-consumer', 'contrib:hadoop-producer', 'log4j-appender', 'tools', 'streams'] + copycatPkgs

tasks.create(name: "jarCopycat", dependsOn: copycatPkgs.collect { it + ":jar" }) {}
@@ -819,3 +820,62 @@ project(':copycat:file') {
}
test.dependsOn('checkstyleMain', 'checkstyleTest')
}

project(':copycat:wikipedia') {
apply plugin: 'checkstyle'
archivesBaseName = "copycat-wikipedia"

dependencies {
compile project(':copycat:api')
compile "$slf4japi"
compile "$schwering_irclib"
compile "org.codehaus.jackson:jackson-jaxrs:1.8.5"

testCompile "$junit"
testCompile "$easymock"
testCompile "$powermock"
testCompile "$powermock_easymock"
testRuntime "$slf4jlog4j"
}

task testJar(type: Jar) {
classifier = 'test'
from sourceSets.test.output
}

test {
testLogging {
events "passed", "skipped", "failed"
exceptionFormat = 'full'
}
}

javadoc {
include "**/org/apache/kafka/copycat/*"
}

artifacts {
archives testJar
}

configurations {
archives.extendsFrom(testCompile)
}

checkstyle {
configFile = new File(rootDir, "checkstyle/checkstyle.xml")
}
test.dependsOn('checkstyleMain', 'checkstyleTest')

tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.runtime) {
exclude('kafka-clients*')
exclude('copycat-*')
}
into "$buildDir/dependant-libs"
}

jar {
dependsOn copyDependantLibs
}
}
@@ -0,0 +1,23 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name=wikipedia-irc-source
connector.class=org.apache.kafka.copycat.wikipedia.WikipediaStreamSourceConnector
tasks.max=1
topic=wiki-test

host=irc.wikimedia.org
port=6667
channels=#en.wikipedia,#en.wiktionary,#en.wikinews

0 comments on commit 6c6b83f

Please sign in to comment.
You can’t perform that action at this time.