Skip to content

Commit

Permalink
Bugcix (#12)
Browse files Browse the repository at this point in the history
* Create pulsar-functions module (#1)

* Create pulsar-functions module

* rename `sdk` package to `api`

* Added the first cut of the Java interface for Pulsar functions (#2)

* Make Spawner class public, Use Lombok for getter/setter
  • Loading branch information
srkukarni authored and sijie committed Mar 4, 2018
1 parent e30808c commit 5e76557
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
*/
package org.apache.pulsar.functions.spawner;

import java.io.ByteArrayOutputStream;
import java.util.concurrent.TimeoutException;

/**
* An interface that represents the result of a function call.
*/
public interface ExecutionResult {

Exception getUserException();

TimeoutException getTimeoutException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,17 @@
*/
package org.apache.pulsar.functions.spawner;

import lombok.*;

/**
* This represents the config related to the resource limits of function calls
*/
@Data
@Setter
@Getter
@EqualsAndHashCode
@ToString
class LimitsConfig {
private int timeBudgetInMs;
private int maxMemory;

public int getTimeBudgetInMs() {
return timeBudgetInMs;
}

public void setTimeBudgetInMs(int timeBudgetInMs) {
this.timeBudgetInMs = timeBudgetInMs;
}

public int getMaxMemory() {
return maxMemory;
}

public void setMaxMemory(int maxMemory) {
this.maxMemory = maxMemory;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,13 @@
*/
package org.apache.pulsar.functions.spawner;

import org.apache.pulsar.client.api.*;
import org.apache.pulsar.functions.instance.JavaExecutionResult;
import org.apache.pulsar.functions.instance.JavaInstance;

import org.apache.pulsar.functions.instance.JavaInstanceConfig;
import org.apache.pulsar.functions.runtime.container.FunctionContainer;
import org.apache.pulsar.functions.runtime.container.ThreadFunctionContainerFactory;
import org.apache.pulsar.functions.runtime.functioncache.FunctionCacheManager;
import org.apache.pulsar.functions.runtime.functioncache.FunctionCacheManagerImpl;
import org.apache.pulsar.functions.subscribermanager.SubscriberManager;

class Spawner {
public class Spawner {
private LimitsConfig limitsConfig;
private AssignmentInfo assignmentInfo;
private String pulsarBrokerRootUrl;
Expand Down

0 comments on commit 5e76557

Please sign in to comment.