-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
454 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
if [ $# != 2 ] ; then | ||
echo "pard-client <host> <port>" | ||
exit | ||
fi | ||
|
||
cd `dirname $0` | ||
|
||
exec java -jar ../bin/pard-client.jar $1 $2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
if [ $# != 1 ] ; then | ||
echo "pard-server <run/start/stop>" | ||
exit | ||
fi | ||
|
||
cd `dirname $0` | ||
|
||
# run in foreground | ||
if [ $1 == "run" ] ; then | ||
if [ -e ../pid ] ; then | ||
echo "Pard already started. Please stop it first." | ||
else | ||
exec java -jar ../bin/pard-server.jar ../pard.properties | ||
fi | ||
exit | ||
fi | ||
|
||
# run in background | ||
if [ $1 == "start" ] ; then | ||
if [ -e ../pid ] ; then | ||
echo "Pard already started. Please stop it first." | ||
else | ||
nohup java -jar ../bin/pard-server.jar ../pard.properties & | ||
pid=$! | ||
echo ${pid} > ../pid | ||
echo "Pard is running in background as" ${pid} | ||
fi | ||
exit | ||
fi | ||
|
||
# stop | ||
if [ $1 == "stop" ] | ||
then | ||
if [ -e ../pid ] && [ -r ../pid ] ; then | ||
# read pid | ||
pid=$(head -n 1 ../pid) | ||
# kill process | ||
kill -9 ${pid} | ||
# remove file | ||
rm ../pid | ||
echo "Pard at" ${pid} "is killed." | ||
else | ||
echo "Pard is not started yet." | ||
fi | ||
exit | ||
fi | ||
|
||
echo "pard-server <run/start/stop>" | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,118 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>pard</artifactId> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>pard</artifactId> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>pard-main</artifactId> | ||
<artifactId>pard-main</artifactId> | ||
|
||
<properties> | ||
<main.basedir>${project.parent.basedir}</main.basedir> | ||
</properties> | ||
<properties> | ||
<main.basedir>${project.parent.basedir}</main.basedir> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- pard --> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-commons</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-communication</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-parser</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-catalog</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-connector-postgresql</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-nodekeeper</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-optimizer</artifactId> | ||
</dependency> | ||
<!-- grpc --> | ||
<dependency> | ||
<groupId>io.grpc</groupId> | ||
<artifactId>grpc-netty</artifactId> | ||
</dependency> | ||
<!-- marshalling --> | ||
<dependency> | ||
<groupId>org.jboss.marshalling</groupId> | ||
<artifactId>jboss-marshalling-serial</artifactId> | ||
</dependency> | ||
<dependencies> | ||
<!-- pard --> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-commons</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-communication</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-parser</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-catalog</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-connector-postgresql</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-nodekeeper</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.edu.ruc.iir</groupId> | ||
<artifactId>pard-optimizer</artifactId> | ||
</dependency> | ||
<!-- grpc --> | ||
<dependency> | ||
<groupId>io.grpc</groupId> | ||
<artifactId>grpc-netty</artifactId> | ||
</dependency> | ||
<!-- marshalling --> | ||
<dependency> | ||
<groupId>org.jboss.marshalling</groupId> | ||
<artifactId>jboss-marshalling-serial</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.testng</groupId> | ||
<artifactId>testng</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<!-- jetty --> | ||
<dependency> | ||
<groupId>org.eclipse.jetty.aggregate</groupId> | ||
<artifactId>jetty-all</artifactId> | ||
<version>9.2.14.v20151106</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<version>3.1.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.jetty</groupId> | ||
<artifactId>jetty-jsp</artifactId> | ||
<version>9.2.15.v20160210</version> | ||
</dependency> | ||
</dependencies> | ||
<dependency> | ||
<groupId>org.testng</groupId> | ||
<artifactId>testng</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<!-- jetty --> | ||
<dependency> | ||
<groupId>org.eclipse.jetty.aggregate</groupId> | ||
<artifactId>jetty-all</artifactId> | ||
<version>9.2.14.v20151106</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<version>3.1.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.jetty</groupId> | ||
<artifactId>jetty-jsp</artifactId> | ||
<version>9.2.15.v20160210</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<finalName>pard-server</finalName> | ||
<shadedArtifactAttached>true</shadedArtifactAttached> | ||
<shadedClassifierName>allinone</shadedClassifierName> | ||
<filters> | ||
<filter> | ||
<artifact>*:*</artifact> | ||
<excludes> | ||
<exclude>META-INF/*.SF</exclude> | ||
<exclude>META-INT/*.DSA</exclude> | ||
<exclude>META-INT/*.RSA</exclude> | ||
</excludes> | ||
</filter> | ||
</filters> | ||
<transformers> | ||
<transformer | ||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
<mainClass>cn.edu.ruc.iir.pard.server.PardServer</mainClass> | ||
</transformer> | ||
</transformers> | ||
<outputDirectory>${main.basedir}/pard-server-test/</outputDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<finalName>pard-server</finalName> | ||
<shadedArtifactAttached>true</shadedArtifactAttached> | ||
<shadedClassifierName>allinone</shadedClassifierName> | ||
<filters> | ||
<filter> | ||
<artifact>*:*</artifact> | ||
<excludes> | ||
<exclude>META-INF/*.SF</exclude> | ||
<exclude>META-INT/*.DSA</exclude> | ||
<exclude>META-INT/*.RSA</exclude> | ||
</excludes> | ||
</filter> | ||
</filters> | ||
<transformers> | ||
<transformer | ||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
<mainClass>cn.edu.ruc.iir.pard.server.PardServer</mainClass> | ||
</transformer> | ||
</transformers> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
Oops, something went wrong.