Skip to content

Commit

Permalink
Function localrun improved (apache#4453)
Browse files Browse the repository at this point in the history
* fix localrun and add tests

* minor fix

* Improving localrun for functions

* improving impl and adding tests

* add missing modules
  • Loading branch information
jerrypeng authored Jun 5, 2019
1 parent ef834ae commit f56d30d
Show file tree
Hide file tree
Showing 9 changed files with 1,655 additions and 284 deletions.
2 changes: 1 addition & 1 deletion bin/function-localrunner
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fi
OPTS="$OPTS -Dpulsar.functions.java.instance.jar=${JAVA_INSTANCE_JAR}"
OPTS="$OPTS -Dpulsar.functions.python.instance.file=${PY_INSTANCE_FILE}"

MAINCLASS="org.apache.pulsar.functions.runtime.LocalRunner"
MAINCLASS="org.apache.pulsar.functions.LocalRunner"

#Change to PULSAR_HOME to support relative paths
cd "$PULSAR_HOME"
Expand Down
13 changes: 13 additions & 0 deletions distribution/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,19 @@
</exclusions>
</dependency>

<!-- local-runner -->
<dependency>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-functions-local-runner-original</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- grpc -->
<dependency>
<groupId>io.grpc</groupId>
Expand Down
7 changes: 7 additions & 0 deletions pulsar-broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-functions-local-runner-original</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<!-- functions related dependencies (end) -->

<dependency>
Expand Down

Large diffs are not rendered by default.

374 changes: 374 additions & 0 deletions pulsar-functions/localrun-shaded/pom.xml

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions pulsar-functions/localrun/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?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.pulsar</groupId>
<artifactId>pulsar-functions</artifactId>
<version>2.4.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

<artifactId>pulsar-functions-local-runner-original</artifactId>
<name>Pulsar Functions :: Local Runner original</name>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-functions-runtime</artifactId>
<version>${project.parent.version}</version>
</dependency>

<!-- logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-client-original</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</dependency>

<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit f56d30d

Please sign in to comment.