Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #2

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions READLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mvn install -Pcore-modules,-main -DskipTests -Dcheckstyle.skip=true
4 changes: 3 additions & 1 deletion bin/function-localrunner
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ else
JAVA=$JAVA_HOME/bin/java
fi

PULSAR_MEM=${PULSAR_MEM:-"-Xmx128m -XX:MaxDirectMemorySize=128m"}
PULSAR_MEM=${PULSAR_MEM:-"-Xmx128m -XX:MaxDirectMemorySize=128m -XX:+UnlockExperimentalVMOptions"}

# Garbage collection options
PULSAR_GC=${PULSAR_GC:-"-XX:+UseZGC -XX:+PerfDisableSharedMem -XX:+AlwaysPreTouch"}
Expand Down Expand Up @@ -147,6 +147,8 @@ fi
OPTS="$OPTS -Dpulsar.functions.java.instance.jar=${JAVA_INSTANCE_JAR}"
OPTS="$OPTS -Dpulsar.functions.python.instance.file=${PY_INSTANCE_FILE}"

echo $OPTS

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

#Change to PULSAR_HOME to support relative paths
Expand Down
2 changes: 1 addition & 1 deletion build/build_java_test_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ SQUASH_PARAM=""
if [[ "$(docker version -f '{{.Server.Experimental}}' 2>/dev/null)" == "true" ]]; then
SQUASH_PARAM="-Ddocker.squash=true"
fi
mvn -am -pl tests/docker-images/java-test-image -Pcore-modules,-main,integrationTests,docker \
mvn -am -pl tests/docker-images/java-test-image -Pcore-modules,-main,docker \
-Dmaven.test.skip=true -DskipSourceReleaseAssembly=true -Dspotbugs.skip=true -Dlicense.skip=true $SQUASH_PARAM \
"$@" install
28 changes: 19 additions & 9 deletions conf/broker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
# * my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 (will default to ZooKeeper when the schema is not specified)
# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181/my-chroot-path (to add a ZK chroot path)
metadataStoreUrl=
metadataStoreUrl=etcd://192.168.3.228:2379/ledgers

# /ledgers/available
# /ledgers/cookies


# Configuration file path for metadata store. It's supported by RocksdbMetadataStore and EtcdMetadataStore for now
metadataStoreConfigPath=
Expand Down Expand Up @@ -66,9 +70,14 @@ bindAddress=0.0.0.0
# Extra bind addresses for the service: <listener_name>:<scheme>://<host>:<port>,[...]
bindAddresses=

<<<<<<< HEAD
# Hostname or IP address the service advertises to the outside world. If not set, the value of InetAddress.getLocalHost().getHostName() is used.
advertisedAddress=192.168.3.228
=======
# Hostname or IP address the service advertises to the outside world.
# If not set, the value of InetAddress.getLocalHost().getCanonicalHostName() is used.
advertisedAddress=
>>>>>>> e1c0ad395c19c99369e733f44a2426de5c465787

# Used to specify multiple advertised listeners for the broker.
# The value must format as <listener_name>:pulsar://<host>:<port>,
Expand Down Expand Up @@ -119,7 +128,7 @@ enableBusyWait=false
isRunningStandalone=

# Name of the cluster to which this broker belongs to
clusterName=
clusterName=lan

# The maximum number of tenants that each pulsar cluster can create
# This configuration is not precise control, in a concurrent scenario, the threshold will be exceeded
Expand Down Expand Up @@ -1048,13 +1057,13 @@ bookkeeperExplicitLacIntervalInMills=0
### --- Managed Ledger --- ###

# Number of bookies to use when creating a ledger
managedLedgerDefaultEnsembleSize=2
managedLedgerDefaultEnsembleSize=1

# Number of copies to store for each message
managedLedgerDefaultWriteQuorum=2
managedLedgerDefaultWriteQuorum=1

# Number of guaranteed copies (acks to wait before write is complete)
managedLedgerDefaultAckQuorum=2
managedLedgerDefaultAckQuorum=1

# with OpportunisticStriping=true the ensembleSize is adapted automatically to writeQuorum
# in case of lack of enough bookies
Expand Down Expand Up @@ -1415,10 +1424,10 @@ exposeBundlesMetricsInPrometheus=false
### --- Functions --- ###

# Enable Functions Worker Service in Broker
functionsWorkerEnabled=false
functionsWorkerEnabled=true

#Enable Functions Worker to use packageManagement Service to store package.
functionsWorkerEnablePackageManagement=false
functionsWorkerEnablePackageManagement=true

### --- Broker Web Stats --- ###

Expand Down Expand Up @@ -1594,10 +1603,11 @@ transactionPendingAckBatchedWriteMaxDelayInMillis=1
### --- Packages management service configuration variables (begin) --- ###

# Enable the packages management service or not
enablePackagesManagement=false
enablePackagesManagement=true

# The packages management service storage service provide
packagesManagementStorageProvider=org.apache.pulsar.packages.management.storage.bookkeeper.BookKeeperPackagesStorageProvider
#packagesManagementStorageProvider=org.apache.pulsar.packages.management.storage.bookkeeper.BookKeeperPackagesStorageProvider
packagesManagementStorageProvider=org.apache.pulsar.packages.management.storage.filesystem.FileSystemPackagesStorageProvider

# When the packages storage provider is bookkeeper, you can use this configuration to
# control the number of replicas for storing the package
Expand Down
4 changes: 2 additions & 2 deletions conf/functions_worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ functionRuntimeFactoryConfigs:
# location of log files for functions
logDirectory: logs/
# change the jar location only when you put the java instance jar in a different location
javaInstanceJarLocation:
javaInstanceJarLocation: conf/instances/java-instance.jar
# change the python instance location only when you put the python instance jar in a different location
pythonInstanceLocation:
pythonInstanceLocation: conf/instances/python-instance
# change the extra dependencies location:
extraFunctionDependenciesDir:

Expand Down
Binary file added conf/instances/java-instance.jar
Binary file not shown.
Loading