Skip to content

Commit

Permalink
new msgbus added
Browse files Browse the repository at this point in the history
Signed-off-by: huangruiqing <ruoyiqing1990@163.com>
  • Loading branch information
ruoyiqing committed Jun 6, 2013
0 parents commit 450d29b
Show file tree
Hide file tree
Showing 399 changed files with 486,847 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hedwig-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.settings
/target
/.classpath
/.project
/bin
22 changes: 22 additions & 0 deletions hedwig-client/conf/hw_client.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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.

# The default Hedwig server host to contact (this ideally should be a VIP
# that fronts all of the Hedwig server hubs).
default_server_host=localhost:4080:9876
# This parameter is a boolean flag indicating if communication with the
# server should be done via SSL for encryption. The Hedwig server hubs also
# need to be SSL enabled for this to work.
ssl_enabled=false
149 changes: 149 additions & 0 deletions hedwig-client/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
<?xml version="1.0"?>
<!-- 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. -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.bookkeeper</groupId>
<artifactId>bookkeeper</artifactId>
<version>4.2.1</version>
</parent>
<properties>
<mainclass>org.apache.hedwig.client.App</mainclass>
</properties>
<artifactId>hedwig-client</artifactId>
<packaging>jar</packaging>
<name>hedwig-client</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.bookkeeper</groupId>
<artifactId>hedwig-protocol</artifactId>
<version>${project.parent.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
<version>3.2.4.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.4.3</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.bookkeeper</groupId>
<artifactId>bookkeeper-server</artifactId>
<version>${project.parent.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<!-- Annoying dependency we need to include because zookeeper uses log4j
and so we transatively do, but log4j has some dependencies which aren't in
the default maven repositories // -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<skipAssembly>true</skipAssembly>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.7</version>
<configuration>
<excludes>
<exclude>**/m4/*.m4</exclude>
<exclude>**/aminclude.am</exclude>
</excludes>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>

</project>
44 changes: 44 additions & 0 deletions hedwig-client/src/main/cpp/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# 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.
#

ACLOCAL_AMFLAGS = -I m4

SUBDIRS = lib test

library_includedir=$(includedir)/hedwig-0.1/hedwig
library_include_HEADERS = inc/hedwig/callback.h inc/hedwig/client.h inc/hedwig/exceptions.h inc/hedwig/publish.h inc/hedwig/subscribe.h

pkgconfigdir = $(libdir)/pkgconfig
nodist_pkgconfig_DATA = hedwig-0.1.pc

EXTRA_DIST = $(DX_CONFIG) doc/html

check:
cd test; make check

simplesslcheck:
cd test; make simplesslcheck

simplecheck:
cd test; make simplecheck

multiplexsslcheck:
cd test; make multiplexsslcheck

multiplexcheck:
cd test; make multiplexcheck
38 changes: 38 additions & 0 deletions hedwig-client/src/main/cpp/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
= BUILDING =

To build:
$ libtoolize
$ autoreconf -fi
$ ./configure
$ make

The devel packages for protobuf, log4cxx & boost are required to build.

= TESTING =

To test, Google Test(http://code.google.com/p/googletest/) is required.
The project must be configured with the location of gtest. Making with
the target "check" will run all the tests.

$ ./configure --enable-gtest=/home/user/src/gtest-1.6.0
$ make check

To run individual tests, first start a test cluster. We provide a
convenience script to do this.

$ sh scripts/tester.sh start-cluster

Once the cluster is running, you can run individual tests using the test
harness.

$ test/hedwigtest --gtest_filter=PublishTest.testAsyncPublish

To get a list of tests:

$ test/hedwigtest --gtest_list_tests

test/hedwigtest is a libtool wrapper, which cannot be used directly with
gdb. To run a test with gdb:

$ libtool --mode=execute gdb test/hedwigtest
(gdb) run --gtest_filter=PublishTest.testAsyncPublish
Loading

0 comments on commit 450d29b

Please sign in to comment.