[GitHub] [pulsar] sijie commented on pull request #6825: support async send msg return sequenceId when throw Exception

2020-04-28 Thread GitBox


sijie commented on pull request #6825:
URL: https://github.com/apache/pulsar/pull/6825#issuecomment-620984369


   /pulsarbot run-failure-checks



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] sijie commented on pull request #6764: fix Get schema by version can get the deleted schema info #6754

2020-04-28 Thread GitBox


sijie commented on pull request #6764:
URL: https://github.com/apache/pulsar/pull/6764#issuecomment-620983763


   /pulsarbot run-failure-checks



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[pulsar] branch master updated: [Issue 6793][broker] Add config of maxNumPartitionsPerPartitionedTopic (#6794)

2020-04-28 Thread sijie
This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new 9030e84  [Issue 6793][broker] Add config of 
maxNumPartitionsPerPartitionedTopic (#6794)
9030e84 is described below

commit 9030e84fddf6c4764924c3ad6aca6b72d192c103
Author: Yuri Mizushima 
AuthorDate: Wed Apr 29 13:31:32 2020 +0900

[Issue 6793][broker] Add config of maxNumPartitionsPerPartitionedTopic 
(#6794)

Fixes #6793

### Motivation
Now broker, can't set max number of partitions per partitioned topic. So we 
can't prevent to create partitioned topic by many partitions from server side.
In this PR, introduce limit of max partitions to broker and to be able to 
control it.

### Modifications
Add `maxNumPartitionsPerPartitionedTopic` config to broker and compare with 
numPartitions at create or update partitioned topic.
If the config is set to `0`(is default), then disable the check.
---
 conf/broker.conf   |  4 
 conf/standalone.conf   |  4 
 .../apache/pulsar/broker/ServiceConfiguration.java |  7 ++
 .../apache/pulsar/broker/admin/AdminResource.java  |  6 +
 .../pulsar/broker/admin/impl/NamespacesBase.java   |  4 
 .../broker/admin/impl/PersistentTopicsBase.java|  4 
 .../apache/pulsar/broker/admin/v1/Namespaces.java  |  1 +
 .../broker/admin/v1/NonPersistentTopics.java   |  1 +
 .../pulsar/broker/admin/v1/PersistentTopics.java   |  2 ++
 .../apache/pulsar/broker/admin/v2/Namespaces.java  |  1 +
 .../broker/admin/v2/NonPersistentTopics.java   |  1 +
 .../pulsar/broker/admin/v2/PersistentTopics.java   |  3 ++-
 .../pulsar/broker/service/BrokerService.java   |  4 +++-
 .../apache/pulsar/broker/admin/AdminApiTest2.java  | 26 +-
 .../BrokerServiceAutoTopicCreationTest.java| 18 +++
 site2/docs/reference-configuration.md  |  2 ++
 16 files changed, 85 insertions(+), 3 deletions(-)

diff --git a/conf/broker.conf b/conf/broker.conf
index ef1cb89..2c5d6b9 100644
--- a/conf/broker.conf
+++ b/conf/broker.conf
@@ -353,6 +353,10 @@ messagePublishBufferCheckIntervalInMillis=100
 # Use 0 or negative number to disable the check
 retentionCheckIntervalInSeconds=120
 
+# Max number of partitions per partitioned topic
+# Use 0 or negative number to disable the check
+maxNumPartitionsPerPartitionedTopic=0
+
 ### --- Authentication --- ###
 # Role names that are treated as "proxy roles". If the broker sees a request 
with
 #role as proxyRoles - it will demand to see a valid original principal.
diff --git a/conf/standalone.conf b/conf/standalone.conf
index 43138f8..0fd80a3 100644
--- a/conf/standalone.conf
+++ b/conf/standalone.conf
@@ -221,6 +221,10 @@ maxConsumersPerTopic=0
 # Using a value of 0, is disabling maxConsumersPerSubscription-limit check.
 maxConsumersPerSubscription=0
 
+# Max number of partitions per partitioned topic
+# Use 0 or negative number to disable the check
+maxNumPartitionsPerPartitionedTopic=0
+
 ### --- Authentication --- ###
 # Role names that are treated as "proxy roles". If the broker sees a request 
with
 #role as proxyRoles - it will demand to see a valid original principal.
diff --git 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
index fafeeb0..2b0b0e8 100644
--- 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
+++ 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
@@ -645,6 +645,13 @@ public class ServiceConfiguration implements 
PulsarConfiguration {
 )
 private int retentionCheckIntervalInSeconds = 120;
 
+@FieldContext(
+category = CATEGORY_SERVER,
+doc = "The number of partitions per partitioned topic.\n"
++ "If try to create or update partitioned topics by exceeded 
number of partitions, then fail."
+)
+private int maxNumPartitionsPerPartitionedTopic = 0;
+
 / --- Messaging Protocols --- /
 
 @FieldContext(
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
index cafb183..eedcd80 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
@@ -727,6 +727,7 @@ public abstract class AdminResource extends 
PulsarWebResource {
 }
 
 protected void internalCreatePartitionedTopic(AsyncResponse asyncResponse, 
int numPartitions) {
+final int maxPartitions = 
pulsar().getConfig().getMaxNumPartitionsPerPartitionedTopic();
  

[pulsar] branch master updated: [broker] Expose BookKeeper GetBookieInfo settings (#6800)

2020-04-28 Thread sijie
This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new c8d0c68  [broker] Expose BookKeeper GetBookieInfo settings (#6800)
c8d0c68 is described below

commit c8d0c686881e2adcfe02948b29a8c0cc4bb10fa9
Author: Addison Higham 
AuthorDate: Tue Apr 28 22:29:29 2020 -0600

[broker] Expose BookKeeper GetBookieInfo settings (#6800)

Bookkeeper has settings to allow for periodic calls to refresh the
bookie info. In dynamic environments (like when running on k8s) fetching
the bookie info more often can be helpful to ensure the brokers stay up
to date on the list of bookies even in the event of zookeeper watch
issues.

Co-authored-by: Addison Higham 
---
 conf/broker.conf   | 5 +
 .../main/java/org/apache/pulsar/broker/ServiceConfiguration.java   | 7 +++
 .../java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java | 2 ++
 site2/docs/reference-configuration.md  | 2 ++
 4 files changed, 16 insertions(+)

diff --git a/conf/broker.conf b/conf/broker.conf
index 8aebf10..ef1cb89 100644
--- a/conf/broker.conf
+++ b/conf/broker.conf
@@ -515,6 +515,11 @@ bookkeeperClientHealthCheckIntervalSeconds=60
 bookkeeperClientHealthCheckErrorThresholdPerInterval=5
 bookkeeperClientHealthCheckQuarantineTimeInSeconds=1800
 
+# Specify options for the GetBookieInfo check. These settings can be useful
+# to help ensure the list of bookies is up to date on the brokers.
+bookkeeperGetBookieInfoIntervalSeconds=86400
+bookkeeperGetBookieInfoRetryIntervalSeconds=60
+
 # Enable rack-aware bookie selection policy. BK will chose bookies from 
different racks when
 # forming a new bookie ensemble
 bookkeeperClientRackawarePolicyEnabled=true
diff --git 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
index 030e838..fafeeb0 100644
--- 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
+++ 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
@@ -900,6 +900,13 @@ public class ServiceConfiguration implements 
PulsarConfiguration {
 doc = "Enable bookie secondary-isolation group if 
bookkeeperClientIsolationGroups doesn't have enough bookie available."
 )
 private String bookkeeperClientSecondaryIsolationGroups;
+
+@FieldContext(category = CATEGORY_STORAGE_BK, doc = "Set the interval to 
periodically check bookie info")
+private int bookkeeperClientGetBookieInfoIntervalSeconds = 60 * 60 * 24; 
// defaults to 24 hours
+
+@FieldContext(category = CATEGORY_STORAGE_BK, doc = "Set the interval to 
retry a failed bookie info lookup")
+private int bookkeeperClientGetBookieInfoRetryIntervalSeconds = 60;
+
 @FieldContext(category = CATEGORY_STORAGE_BK, doc = "Enable/disable having 
read operations for a ledger to be sticky to "
 + "a single bookie.\n" +
 "If this flag is enabled, the client will use one single bookie 
(by " +
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java
index 095ecd0..37e8494 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java
@@ -123,6 +123,8 @@ public class BookKeeperClientFactoryImpl implements 
BookKeeperClientFactory {
 
 
bkConf.setReorderReadSequenceEnabled(conf.isBookkeeperClientReorderReadSequenceEnabled());
 
bkConf.setExplictLacInterval(conf.getBookkeeperExplicitLacIntervalInMills());
+
bkConf.setGetBookieInfoIntervalSeconds(conf.getBookkeeperClientGetBookieInfoIntervalSeconds(),
 TimeUnit.SECONDS);
+
bkConf.setGetBookieInfoRetryIntervalSeconds(conf.getBookkeeperClientGetBookieInfoRetryIntervalSeconds(),
 TimeUnit.SECONDS);
 
 return bkConf;
 }
diff --git a/site2/docs/reference-configuration.md 
b/site2/docs/reference-configuration.md
index 6bc94ae..d0fe84f 100644
--- a/site2/docs/reference-configuration.md
+++ b/site2/docs/reference-configuration.md
@@ -186,6 +186,8 @@ Pulsar brokers are responsible for handling incoming 
messages from producers, di
 |bookkeeperClientIsolationGroups| Enable bookie isolation by specifying a list 
of bookie groups to choose from. Any bookie outside the specified groups will 
not be used by the broker  ||
 |bookkeeperClientSecondaryIsolationGroups| Enable bookie secondary-isolation 
group if bookkeeperClientIsolationGroups doesn't have enough bookie available.  
||
 |bookkeeperClientMinAvaila

[pulsar] branch master updated: update topicName document to avoid confusion (#6816)

2020-04-28 Thread sijie
This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new 8aee353  update topicName document to avoid confusion (#6816)
8aee353 is described below

commit 8aee353d5b000c80be5cc281e6b574bd62ba5531
Author: hangc0276 
AuthorDate: Wed Apr 29 12:27:51 2020 +0800

update topicName document to avoid confusion (#6816)

Fix #6620

### changes
1. update topic name document
2. update code annotation in TopicName.java to avoid topic name confusion
---
 .../src/main/java/org/apache/pulsar/common/naming/TopicName.java  | 4 ++--
 site2/docs/getting-started-pulsar.md  | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java 
b/pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java
index 2b5a1e3..5ec0d58 100644
--- a/pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java
+++ b/pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java
@@ -136,8 +136,8 @@ public class TopicName implements ServiceUnitId {
 // new:tenant/namespace/
 // legacy: tenant/cluster/namespace/
 // Examples of localName:
-// 1. some/name/xyz//
-// 2. /xyz-123/feeder-2
+// 1. some, name, xyz
+// 2. xyz-123, feeder-2
 
 
 parts = Splitter.on("/").limit(4).splitToList(rest);
diff --git a/site2/docs/getting-started-pulsar.md 
b/site2/docs/getting-started-pulsar.md
index 043ac4b..6ba815e 100644
--- a/site2/docs/getting-started-pulsar.md
+++ b/site2/docs/getting-started-pulsar.md
@@ -32,6 +32,7 @@ Two important changes have been made in Pulsar 2.0:
 * There is no longer a [cluster component](#no-cluster)
 * Properties have been [renamed to tenants](#tenants)
 * You can use a [flexible](#flexible-topic-naming) naming system to shorten 
many topic names
+* `/` is not allowed in topic name
 
  No cluster component
 



[GitHub] [pulsar] laxpio opened a new issue #6839: command "pulsar-admin functions list" unavailable in run function-worker separately

2020-04-28 Thread GitBox


laxpio opened a new issue #6839:
URL: https://github.com/apache/pulsar/issues/6839


   **Describe the bug**
   run function-worker separately, pulsar-admin functions list cmd unavailable
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. run function-worker separately
   2. run pulsar-admin functions list cmd, get functions list
   3. return result "Reason: HTTP 503 Service Unavailable"
   4. set --admin-url as functions-work ip:port
   5. after run cmd,return result "Reason: HTTP 404 Not Found"
   
   **Expected behavior**
   broker.conf set functionsWorkerEnabled=false
   
   Pulsar Version:2.4.1
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] sijie opened a new issue #6838: java.lang.OutOfMemoryError: GC overhead limit exceeded' is observed when creating producers on a non-existent topic

2020-04-28 Thread GitBox


sijie opened a new issue #6838:
URL: https://github.com/apache/pulsar/issues/6838


   **Describe the bug**
   
if we try to create producer for a non-existent topic the ProducerImpl 
object is hanging in the dump. Although producer creation fails but we see that 
ProducerImpl object corresponding to each producing action hanging in the dump. 
This behavior will lead to OOM in microservice which by mistake tries to 
produce consistently to a non-existent topic.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] sijie commented on issue #6836: PULSAR_PID_DIR setting does not appear to work

2020-04-28 Thread GitBox


sijie commented on issue #6836:
URL: https://github.com/apache/pulsar/issues/6836#issuecomment-620942678


   @frankjkelly if you are running the process in foreground, it will not 
generate any pid file. The pid file is only generated only when you run the 
components using `bin/pulsar-daemon`.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] sijie commented on issue #6834: Apache pulsar Encryption failed using ecdsa

2020-04-28 Thread GitBox


sijie commented on issue #6834:
URL: https://github.com/apache/pulsar/issues/6834#issuecomment-620942360


   In 2.5.1, we made a few changes regarding to FIPS support. This class has 
been moved to a separated module and the client already depends on it. So 
ideally if you are using maven, you should be able to resolve all the 
dependencies. 
   
   @kjaggann how did you run your code?
   
   @trexinc are you using maven to build your project?
   
   @jiazhai please take a look at this issue.
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] btsken opened a new issue #6837: Can't query in S3 tired storage by using pulsar SQL(presto)

2020-04-28 Thread GitBox


btsken opened a new issue #6837:
URL: https://github.com/apache/pulsar/issues/6837


   **Describe the bug**
   I'm using apachepulsar/pulsar-all:2.5.1 image. When I query topic and enable 
offload in conf/presto/catalog/pulsar.properties, I'll get below error.
   
   ```
   2020-04-24T07:40:52.124ZINFO
Query-20200424_074049_0_7eak2-146   
org.apache.bookkeeper.mledger.offload.OffloaderUtilsFound offloader 
OffloaderDefinition(name=filesystem, description=fileSystem based offloader 
implementation, 
offloaderFactoryClass=org.apache.bookkeeper.mledger.offload.filesystem.FileSystemLedgerOffloaderFactory)
 from /pulsar/offloaders/tiered-storage-file-system-2.5.1.nar
   2020-04-24T07:40:52.381ZINFO
Query-20200424_074049_0_7eak2-146   
org.apache.bookkeeper.mledger.offload.OffloaderUtilsFound and loaded 2 
offloaders
   2020-04-24T07:40:52.400ZERROR   
Query-20200424_074049_0_7eak2-146   
org.apache.pulsar.sql.presto.PulsarConnectorCache   Failed to create 
offloader:
   2020-04-24T07:40:52.400ZERROR   
Query-20200424_074049_0_7eak2-146   
org.apache.pulsar.sql.presto.PulsarSplitManager Failed to get splits
   java.lang.RuntimeException: java.lang.RuntimeException: Either 
s3ManagedLedgerOffloadRegion or s3ManagedLedgerOffloadServiceEndpoint must be 
set if s3 offload enabled
   at 
org.apache.pulsar.sql.presto.PulsarConnectorCache.initManagedLedgerOffloader(PulsarConnectorCache.java:178)
   at 
org.apache.pulsar.sql.presto.PulsarConnectorCache.(PulsarConnectorCache.java:86)
   at 
org.apache.pulsar.sql.presto.PulsarConnectorCache.getConnectorCache(PulsarConnectorCache.java:92)
   at 
org.apache.pulsar.sql.presto.PulsarSplitManager.getSplitsNonPartitionedTopic(PulsarSplitManager.java:235)
   at 
org.apache.pulsar.sql.presto.PulsarSplitManager.getSplits(PulsarSplitManager.java:133)
   at 
com.facebook.presto.split.SplitManager.getSplits(SplitManager.java:64)
   at 
com.facebook.presto.sql.planner.DistributedExecutionPlanner$Visitor.visitTableScan(DistributedExecutionPlanner.java:146)
   at 
com.facebook.presto.sql.planner.DistributedExecutionPlanner$Visitor.visitTableScan(DistributedExecutionPlanner.java:122)
   at 
com.facebook.presto.sql.planner.plan.TableScanNode.accept(TableScanNode.java:136)
   at 
com.facebook.presto.sql.planner.DistributedExecutionPlanner.doPlan(DistributedExecutionPlanner.java:108)
   at 
com.facebook.presto.sql.planner.DistributedExecutionPlanner.doPlan(DistributedExecutionPlanner.java:113)
   at 
com.facebook.presto.sql.planner.DistributedExecutionPlanner.plan(DistributedExecutionPlanner.java:85)
   at 
com.facebook.presto.execution.SqlQueryExecution.planDistribution(SqlQueryExecution.java:385)
   at 
com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:287)
   at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   at java.lang.Thread.run(Thread.java:748)
   Caused by: java.lang.RuntimeException: Either s3ManagedLedgerOffloadRegion 
or s3ManagedLedgerOffloadServiceEndpoint must be set if s3 offload enabled
   at 
org.apache.pulsar.sql.presto.PulsarConnectorCache.initManagedLedgerOffloader(PulsarConnectorCache.java:171)
   ... 16 more
   ```
   but in sql-worker logs, it print
   
   ```
   2020-04-27T00:51:04.328ZINFOmainBootstrap   
pulsar.offloader-properties  {} 
{s3ManagedLedgerOffloadBucket=pulsar-topic-offload, 
s3ManagedLedgerOffloadRegion=Default, 
s3ManagedLedgerOffloadServiceEndpoint=http://12.34.56.78:}
   ```
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. docker run -it -p 6650:6650 -p 8080:8080 -p 8081:8081 -p 8443:8443 -p 
6651:6651 apachepulsar/pulsar-all:2.5.1
   2. enter container
   3. ./bin/pulsar standalone
   4. ./bin/pulsar-client consume public/default/eat -s ken -n 0
   5. vim conf/presto/catalog/pulsar.properties
   ```
   pulsar.offloaders-directory = /pulsar/offloaders
   pulsar.managed-ledger-offload-max-threads = 2
   pulsar.offloader-properties = \
 {"s3ManagedLedgerOffloadBucket": "offload-bucket", \
 "s3ManagedLedgerOffloadRegion": "us-west-2", \
 "s3ManagedLedgerOffloadServiceEndpoint": "http://s3.amazonaws.com"}
   ```
   6. export AWS_ACCESS_KEY_ID=
   export AWS_SECRET_ACCESS_KEY=XXX
   ./bin/pulsar sql-worker run
   7. ./bin/pulsar sql
   8. select * from pulsar."public/default".eat;
   
   **Expected behavior**
   get data in "public/default".eat
   
   **Desktop (please complete the following information):**
- OS: ubuntu
   
   ps 2.4.2 can work!
   



This is an automated message 

[GitHub] [pulsar] sijie commented on issue #6833: deploy pulsar dev,test,pro cluster at the same time , i hope the pulsar-Operator just like tidb-Operator

2020-04-28 Thread GitBox


sijie commented on issue #6833:
URL: https://github.com/apache/pulsar/issues/6833#issuecomment-620941170


   @lookhua Currently if you are looking for solutions to deploy Pulsar in 
kubernetes, you can use Helm chart - 
https://github.com/apache/pulsar-helm-chart. We are also developing operators 
and will open-source them at some time.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[pulsar-manager] branch master updated: Using volumes instead of binding mounts (#295)

2020-04-28 Thread guangning
This is an automated email from the ASF dual-hosted git repository.

guangning pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-manager.git


The following commit(s) were added to refs/heads/master by this push:
 new dec1923  Using volumes instead of binding mounts (#295)
dec1923 is described below

commit dec19237a138b4e966ac34caa6792723b72a88b2
Author: Mehran Poursadeghi 
AuthorDate: Wed Apr 29 05:11:57 2020 +0430

Using volumes instead of binding mounts (#295)

### Motivation

Docker volumes are better than binding mounts.

### Modifications

Change install through docker docs

### Verifying this change

- [x] Make sure that the change passes the `./gradlew build` checks.
---
 README.md | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 44931b6..6fadff7 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,8 @@ is able to talk to the brokers and bookies in your Pulsar 
cluster.
 docker run -d -it \
 -p 6650:6650 \
 -p 8080:8080 \
--v $PWD/data:/pulsar/data \
+-v pulsardata:/pulsar/data \
+-v pulsarconf:/pulsar/conf \
 --name pulsar-standalone \
 apachepulsar/pulsar:latest \
 bin/pulsar standalone
@@ -48,7 +49,7 @@ is able to talk to the brokers and bookies in your Pulsar 
cluster.
 -e USERNAME=pulsar \
 -e PASSWORD=pulsar \
 -e LOG_LEVEL=DEBUG \
--v $PWD:/data \
+-v pulsarui:/data \
 --link pulsar-standalone \
 apachepulsar/pulsar-manager:v0.1.0
 ```
@@ -66,7 +67,8 @@ is able to talk to the brokers and bookies in your Pulsar 
cluster.
 * `PASSWORD`: the password of PostgreSQL.
 
 * `LOG_LEVEL`: level of log.
-
+
+* `pulsarui`: docker volume to store PostgresSQL data.
 
 ### Use Docker Compose
 



[GitHub] [pulsar] frankjkelly opened a new issue #6836: PULSAR_PID_DIR setting does not appear to work

2020-04-28 Thread GitBox


frankjkelly opened a new issue #6836:
URL: https://github.com/apache/pulsar/issues/6836


   **Describe the bug**
   Setting PULSAR_PID_DIR="/tmp" but I see no "obvious" pid file in /tmp 
directory
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1) Set PULSAR_PID_DIR e.g. in my Docker file
   ```
   ENV PULSAR_PID_DIR="/tmp"
   RUN export PULSAR_PID_DIR
   ```
   2) Start Pulsar
   ```
   echo "PULSAR_PID_DIR=${PULSAR_PID_DIR}"
   
   /pulsar/bin/pulsar standalone 
   ```
   3) Wait
   4) Check /tmp
   
   **Expected behavior**
   I would expect some kind of pid file (not sure what filename to expect as 
it's not specified in the docs) e.g. ```pulsar.pid```
   
   **Screenshots**
   ```
   root@407af679359d:/pulsar# env | grep PULSAR
   PULSAR_PID_DIR=/tmp
   PULSAR_ROOT_LOGGER=INFO,CONSOLE
   PULSAR_MEM=-Xmx512m -XX:MaxDirectMemorySize=512m
   root@407af679359d:/pulsar# ls -la /tmp
   total 8276
   drwxrwxrwt 1 root root4096 Apr 28 21:37 .
   drwxr-xr-x 1 root root4096 Apr 28 21:37 ..
   drwxr-xr-x 1 root root4096 Apr 28 21:37 hsperfdata_root
   drwxr-xr-x 2 root root4096 Apr 28 21:37 jna-3506402
   -rw-r--r-- 1 root root  203184 Apr 28 21:37 liblz4-java3029699341358424792.so
   -rw-r--r-- 1 root root 8045305 Apr 28 21:37 
librocksdbjni3787942843072736013.so
   drwxr-xr-x 2 root root4096 Apr 28 21:37 native3657826586678648839
   -rw-r--r-- 1 root root2217 Apr 28 21:37 stderr.log
   -rw-r--r-- 1 root root  189104 Apr 28 21:37 stdout.log
   root@407af679359d:/pulsar# ps -ef | grep pulsar
   root 1 0  0 21:37 ?00:00:00 sh -c /pulsar-start.sh
   root 7 1  0 21:37 ?00:00:00 /bin/sh /pulsar-start.sh
   root 8 7 99 21:37 ?00:00:52 
/usr/local/openjdk-8/bin/java -cp /pulsar/conf:::/pulsar/lib/*: 
-Dlog4j.configurationFile=log4j2.yaml -Djute.maxbuffer=10485760 
-Djava.net.preferIPv4Stack=true -Dpulsar.allocator.exit_on_oom=true 
-Dio.netty.recycler.maxCapacity.default=1000 
-Dio.netty.recycler.linkCapacity=1024 -Xmx512m -XX:MaxDirectMemorySize=512m 
-XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled 
-XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis 
-XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 
-XX:+DisableExplicitGC -XX:-ResizePLAB -Dpulsar.log.appender=RoutingAppender 
-Dpulsar.log.dir=/pulsar/logs -Dpulsar.log.level=info 
-Dpulsar.routing.appender.default=Console 
-Dpulsar.functions.process.container.log.dir=/pulsar/logs 
-Dpulsar.functions.java.instance.jar=/pulsar/instances/java-instance.jar 
-Dpulsar.functions.python.instance.file=/pulsar/instances/python-instance/python_instance_main.py
 -Dpulsar.functions.extra.dependencies.dir=/pulsar/instances/deps 
-Dpulsar.functions.instance.classpath=/pulsar/conf:::/pulsar/lib/*: 
-javaagent:/pulsar/lib/org.aspectj-aspectjweaver-1.9.2.jar 
-Dzookeeper.4lw.commands.whitelist=* -Dzookeeper.snapshot.trust.empty=true 
-Dpulsar.log.file=pulsar-standalone.log 
org.apache.pulsar.PulsarStandaloneStarter --config /pulsar/conf/standalone.conf
   root   622   132  0 21:38 pts/000:00:00 grep pulsar
   root@407af679359d:/pulsar# whoami
   root
   ```
   
   **Desktop (please complete the following information):**
   ```
   root@407af679359d:/pulsar# uname --all
   Linux 407af679359d 4.19.76-linuxkit #1 SMP Thu Oct 17 19:31:58 UTC 2019 
x86_64 GNU/Linux
   ```
   
   **Additional context**
   Add any other context about the problem here.
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] vzhikserg opened a new pull request #6835: [Issue 5215,4601,5215][pulsar-io] Add jdbc sinks: postgres, mariadb, clickhouse

2020-04-28 Thread GitBox


vzhikserg opened a new pull request #6835:
URL: https://github.com/apache/pulsar/pull/6835


   Fixes #5215  #4601 #5215
   
   ### Motivation
   
   Right now, the number of supported JDBC connectors is rather limited. There 
are a couple of open issues related to the missing connectors. 
   
   ### Modifications
   
   As a base for this pull request, I took the 
[changes](https://github.com/apache/pulsar/pull/5624) from @huangdx0726 
Unfortunately,  I was not able to reach him to merge my changes to his branch, 
so I created a new one.
   
   The main modification is a split of one JDBC module into a bunch of them. 
One module serves as a core and provide the main logic of the connector. Other 
modules are real connectors and add only an appropriate JDBC driver.
   
   ### Verifying this change
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
 - Dependencies (does it add or upgrade a dependency): (yes)
 - The default values of configurations: (yes)
 - Anything that affects deployment: (yes / don't know)
   
   ### Documentation
   
 - Does this pull request introduce a new feature? (yes)
 - If yes, how is the feature documented? (docs / JavaDocs)
   
   I would like to confirm that this is the right way and after that, I can 
change existing documentation for the MySQL and SQLite connectors, and add docs 
for the newly added connectors.
   
   One more question is related to the MySQL connector and the #6656 Does it 
mean that we need to remove the MySQL connector?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] kjaggann commented on issue #6834: Apache pulsar Encryption failed using ecdsa

2020-04-28 Thread GitBox


kjaggann commented on issue #6834:
URL: https://github.com/apache/pulsar/issues/6834#issuecomment-620825539


   But how is it related to MessageCrypto should i add any method related to 
messagecryptobc to encrypt



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] kjaggann edited a comment on issue #6834: Apache pulsar Encryption failed using ecdsa

2020-04-28 Thread GitBox


kjaggann edited a comment on issue #6834:
URL: https://github.com/apache/pulsar/issues/6834#issuecomment-620811813


   I have already added org.apache.pulsar.client.impl.crypto.MessageCryptoBc 
version 2.5.1 
   should i make any more changes to my code 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] kjaggann commented on issue #6834: Apache pulsar Encryption failed using ecdsa

2020-04-28 Thread GitBox


kjaggann commented on issue #6834:
URL: https://github.com/apache/pulsar/issues/6834#issuecomment-620811813


   I have aready added org.apache.pulsar.client.impl.crypto.MessageCryptoBc 
version 2.5.1 
   should i make any more changes to y code 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] kjaggann commented on a change in pull request #6763: [docs] Fix encryption examples

2020-04-28 Thread GitBox


kjaggann commented on a change in pull request #6763:
URL: https://github.com/apache/pulsar/pull/6763#discussion_r416855801



##
File path: site2/docs/security-encryption.md
##
@@ -78,18 +78,20 @@ class RawFileKeyReader implements CryptoKeyReader {
 return keyInfo;
 }
 }
-PulsarClient pulsarClient = PulsarClient.create("http://localhost:8080";);
 
-ProducerConfiguration prodConf = new ProducerConfiguration();
-prodConf.setCryptoKeyReader(new RawFileKeyReader("test_ecdsa_pubkey.pem", 
"test_ecdsa_privkey.pem"));
-prodConf.addEncryptionKey("myappkey");
+PulsarClient pulsarClient = 
PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build();
 
-Producer producer = 
pulsarClient.createProducer("persistent://my-tenant/my-ns/my-topic", prodConf);
+Producer producer = pulsarClient.newProducer()
+.topic("persistent://my-tenant/my-ns/my-topic")
+.addEncryptionKey("myappkey")

Review comment:
   I have already added that dependency 
   however i have raised a ticket for this 
   
   ISSUE-6834: Apache pulsar Encryption failed using ecdsa
   





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] trexinc commented on issue #6834: Apache pulsar Encryption failed using ecdsa

2020-04-28 Thread GitBox


trexinc commented on issue #6834:
URL: https://github.com/apache/pulsar/issues/6834#issuecomment-620781054


   Not sure how you got those errors. With 2.5.1 I get:
   Class not found for org.apache.pulsar.client.impl.crypto.MessageCryptoBc
   Which can be resolved by adding the following dependency 
   compile group: 'org.apache.pulsar', name: 'pulsar-client-messagecrypto-bc', 
version: '2.5.1'



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] trexinc commented on a change in pull request #6763: [docs] Fix encryption examples

2020-04-28 Thread GitBox


trexinc commented on a change in pull request #6763:
URL: https://github.com/apache/pulsar/pull/6763#discussion_r416829051



##
File path: site2/docs/security-encryption.md
##
@@ -78,18 +78,20 @@ class RawFileKeyReader implements CryptoKeyReader {
 return keyInfo;
 }
 }
-PulsarClient pulsarClient = PulsarClient.create("http://localhost:8080";);
 
-ProducerConfiguration prodConf = new ProducerConfiguration();
-prodConf.setCryptoKeyReader(new RawFileKeyReader("test_ecdsa_pubkey.pem", 
"test_ecdsa_privkey.pem"));
-prodConf.addEncryptionKey("myappkey");
+PulsarClient pulsarClient = 
PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build();
 
-Producer producer = 
pulsarClient.createProducer("persistent://my-tenant/my-ns/my-topic", prodConf);
+Producer producer = pulsarClient.newProducer()
+.topic("persistent://my-tenant/my-ns/my-topic")
+.addEncryptionKey("myappkey")

Review comment:
   Well, it works fine if you add this dependency:
   compile group: 'org.apache.pulsar', name: 'pulsar-client-messagecrypto-bc', 
version: '2.5.1'
   
   Don't know if this a bug or this is how it is supposed to be now with the 
whole addition of bcfips support.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] trexinc commented on a change in pull request #6763: [docs] Fix encryption examples

2020-04-28 Thread GitBox


trexinc commented on a change in pull request #6763:
URL: https://github.com/apache/pulsar/pull/6763#discussion_r416821931



##
File path: site2/docs/security-encryption.md
##
@@ -78,18 +78,20 @@ class RawFileKeyReader implements CryptoKeyReader {
 return keyInfo;
 }
 }
-PulsarClient pulsarClient = PulsarClient.create("http://localhost:8080";);
 
-ProducerConfiguration prodConf = new ProducerConfiguration();
-prodConf.setCryptoKeyReader(new RawFileKeyReader("test_ecdsa_pubkey.pem", 
"test_ecdsa_privkey.pem"));
-prodConf.addEncryptionKey("myappkey");
+PulsarClient pulsarClient = 
PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build();
 
-Producer producer = 
pulsarClient.createProducer("persistent://my-tenant/my-ns/my-topic", prodConf);
+Producer producer = pulsarClient.newProducer()
+.topic("persistent://my-tenant/my-ns/my-topic")
+.addEncryptionKey("myappkey")

Review comment:
   Yep, this seems to be completely broken in 2.5.1. Works fine in 2.5.0.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] kjaggann commented on a change in pull request #6763: [docs] Fix encryption examples

2020-04-28 Thread GitBox


kjaggann commented on a change in pull request #6763:
URL: https://github.com/apache/pulsar/pull/6763#discussion_r416814675



##
File path: site2/docs/security-encryption.md
##
@@ -78,18 +78,20 @@ class RawFileKeyReader implements CryptoKeyReader {
 return keyInfo;
 }
 }
-PulsarClient pulsarClient = PulsarClient.create("http://localhost:8080";);
 
-ProducerConfiguration prodConf = new ProducerConfiguration();
-prodConf.setCryptoKeyReader(new RawFileKeyReader("test_ecdsa_pubkey.pem", 
"test_ecdsa_privkey.pem"));
-prodConf.addEncryptionKey("myappkey");
+PulsarClient pulsarClient = 
PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build();
 
-Producer producer = 
pulsarClient.createProducer("persistent://my-tenant/my-ns/my-topic", prodConf);
+Producer producer = pulsarClient.newProducer()
+.topic("persistent://my-tenant/my-ns/my-topic")
+.addEncryptionKey("myappkey")

Review comment:
   I used secured  AES key generated from this method
Key key;
SecureRandom rand = new SecureRandom();
KeyGenerator generator = KeyGenerator.getInstance("AES");
generator.init(256, rand);
key = generator.generateKey();
   and  created a producer
   Producer producer = client.newProducer()

.topic("persistent://my-tenant/my-namespace/my-topic-1")
.cryptoKeyReader(new 
RawFileKeyReader("src/main/resources/test_ecdsa_pubkey.pem", 
"src/main/resources/test_ecdsa_privkey.pem"))
.addEncryptionKey("key")
.enableBatching(false)
.create();
   
   But i got this exception
   org.apache.pulsar.client.api.PulsarClientException: 
java.util.concurrent.ExecutionException: 
org.apache.pulsar.client.api.PulsarClientException: 
java.lang.NoSuchMethodError: 'org.apache.pulsar.shade.io.netty.buffer.ByteBuf 
org.apache.pulsar.client.api.MessageCrypto.encrypt(java.util.Set, 
org.apache.pulsar.client.api.CryptoKeyReader, java.util.function.Supplier, 
org.apache.pulsar.shade.io.netty.buffer.ByteBuf)'
   
   
--
   I followed the document 
   





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] ChethanUK commented on issue #5447: Apache Beam support for Pulsar

2020-04-28 Thread GitBox


ChethanUK commented on issue #5447:
URL: https://github.com/apache/pulsar/issues/5447#issuecomment-620764772


   > Apache Beam -> Pulsar
   
   Cool, :)



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] guyv edited a comment on issue #6818: pulsar-client vulnerability CVE-2015-5237 (shaded protobuf-java:2.4.1)

2020-04-28 Thread GitBox


guyv edited a comment on issue #6818:
URL: https://github.com/apache/pulsar/issues/6818#issuecomment-620760265


   @gaoran10  client version I use is 2.5.1. But I see the same issue exists on 
the master branch (2.6.0-SNAPSHOT)
   
   To be clear, it is about: 
   see: https://github.com/apache/pulsar/blob/master/pom.xml#L149
   
   The shaded version is 2.4.1
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] guyv commented on issue #6818: pulsar-client vulnerability CVE-2015-5237 (shaded protobuf-java:2.4.1)

2020-04-28 Thread GitBox


guyv commented on issue #6818:
URL: https://github.com/apache/pulsar/issues/6818#issuecomment-620760265


   client version I use is 2.5.1. But I see the same issue exists on the master 
branch (2.6.0-SNAPSHOT)
   
   To be clear, it is about: 
   see: https://github.com/apache/pulsar/blob/master/pom.xml#L149
   
   The shaded version is 2.4.1
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] trexinc commented on a change in pull request #6763: [docs] Fix encryption examples

2020-04-28 Thread GitBox


trexinc commented on a change in pull request #6763:
URL: https://github.com/apache/pulsar/pull/6763#discussion_r416798954



##
File path: site2/docs/security-encryption.md
##
@@ -78,18 +78,20 @@ class RawFileKeyReader implements CryptoKeyReader {
 return keyInfo;
 }
 }
-PulsarClient pulsarClient = PulsarClient.create("http://localhost:8080";);
 
-ProducerConfiguration prodConf = new ProducerConfiguration();
-prodConf.setCryptoKeyReader(new RawFileKeyReader("test_ecdsa_pubkey.pem", 
"test_ecdsa_privkey.pem"));
-prodConf.addEncryptionKey("myappkey");
+PulsarClient pulsarClient = 
PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build();
 
-Producer producer = 
pulsarClient.createProducer("persistent://my-tenant/my-ns/my-topic", prodConf);
+Producer producer = pulsarClient.newProducer()
+.topic("persistent://my-tenant/my-ns/my-topic")
+.addEncryptionKey("myappkey")

Review comment:
   Its just a “tag” for the key. So the consumer knows with which key to 
decrypt. As basically every producer can use a different encryption key





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] kjaggann commented on a change in pull request #6763: [docs] Fix encryption examples

2020-04-28 Thread GitBox


kjaggann commented on a change in pull request #6763:
URL: https://github.com/apache/pulsar/pull/6763#discussion_r416796519



##
File path: site2/docs/security-encryption.md
##
@@ -78,18 +78,20 @@ class RawFileKeyReader implements CryptoKeyReader {
 return keyInfo;
 }
 }
-PulsarClient pulsarClient = PulsarClient.create("http://localhost:8080";);
 
-ProducerConfiguration prodConf = new ProducerConfiguration();
-prodConf.setCryptoKeyReader(new RawFileKeyReader("test_ecdsa_pubkey.pem", 
"test_ecdsa_privkey.pem"));
-prodConf.addEncryptionKey("myappkey");
+PulsarClient pulsarClient = 
PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build();
 
-Producer producer = 
pulsarClient.createProducer("persistent://my-tenant/my-ns/my-topic", prodConf);
+Producer producer = pulsarClient.newProducer()
+.topic("persistent://my-tenant/my-ns/my-topic")
+.addEncryptionKey("myappkey")

Review comment:
   what will be the myappkey





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] kjaggann opened a new issue #6834: Apache pulsar Encryption failed using ecdsa

2020-04-28 Thread GitBox


kjaggann opened a new issue #6834:
URL: https://github.com/apache/pulsar/issues/6834


   
   Trying to send encrypted messages from producer 
   but got this exception:
   
--
   org.apache.pulsar.client.api.PulsarClientException: 
java.util.concurrent.ExecutionException: 
org.apache.pulsar.client.api.PulsarClientException: 
java.lang.NoSuchMethodError: 'org.apache.pulsar.shade.io.netty.buffer.ByteBuf 
org.apache.pulsar.client.api.MessageCrypto.encrypt(java.util.Set, 
org.apache.pulsar.client.api.CryptoKeyReader, java.util.function.Supplier, 
org.apache.pulsar.shade.io.netty.buffer.ByteBuf)'
at 
org.apache.pulsar.client.api.PulsarClientException.unwrap(PulsarClientException.java:719)
at 
org.apache.pulsar.client.impl.ProducerBase.send(ProducerBase.java:117)
at 
org.apache.pulsar.client.impl.TypedMessageBuilderImpl.send(TypedMessageBuilderImpl.java:89)
at org.apache.pulsar.client.impl.ProducerBase.send(ProducerBase.java:63)
at com.vz.vmb.PulsarProducer.main(PulsarProducer.java:59)
   Caused by: java.util.concurrent.ExecutionException: 
org.apache.pulsar.client.api.PulsarClientException: 
java.lang.NoSuchMethodError: 'org.apache.pulsar.shade.io.netty.buffer.ByteBuf 
org.apache.pulsar.client.api.MessageCrypto.encrypt(java.util.Set, 
org.apache.pulsar.client.api.CryptoKeyReader, java.util.function.Supplier, 
org.apache.pulsar.shade.io.netty.buffer.ByteBuf)'
at 
java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at 
java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
at 
org.apache.pulsar.client.impl.ProducerBase.send(ProducerBase.java:115)
... 3 more
   Caused by: org.apache.pulsar.client.api.PulsarClientException: 
java.lang.NoSuchMethodError: 'org.apache.pulsar.shade.io.netty.buffer.ByteBuf 
org.apache.pulsar.client.api.MessageCrypto.encrypt(java.util.Set, 
org.apache.pulsar.client.api.CryptoKeyReader, java.util.function.Supplier, 
org.apache.pulsar.shade.io.netty.buffer.ByteBuf)'
at 
org.apache.pulsar.client.impl.ProducerImpl.sendAsync(ProducerImpl.java:477)
at 
org.apache.pulsar.client.impl.ProducerImpl.internalSendAsync(ProducerImpl.java:269)
at 
org.apache.pulsar.client.impl.ProducerBase.send(ProducerBase.java:108)
... 3 more
   Caused by: java.lang.NoSuchMethodError: 
'org.apache.pulsar.shade.io.netty.buffer.ByteBuf 
org.apache.pulsar.client.api.MessageCrypto.encrypt(java.util.Set, 
org.apache.pulsar.client.api.CryptoKeyReader, java.util.function.Supplier, 
org.apache.pulsar.shade.io.netty.buffer.ByteBuf)'
at 
org.apache.pulsar.client.impl.ProducerImpl.encryptMessage(ProducerImpl.java:567)
at 
org.apache.pulsar.client.impl.ProducerImpl.sendAsync(ProducerImpl.java:446)
... 5 more
   
   
--
   Followed the Encryption from the apache pulsar documentation and the 
sampleProducerConsumerTest class from pulsar client.
   Generated a public key and the private key 
   created a Pulsarclient object
   
--
   client = PulsarClient.builder()

.serviceUrl("pulsar+ssl:x:6651/")

.tlsTrustCertsFilePath("src/main/resources/ca.cert.pem")
.enableTls(true)

.authentication("org.apache.pulsar.client.impl.auth.AuthenticationTls", 
authParams).build();
   
   Producer producer = client.newProducer()

.topic("persistent://tenant/namespace/nonprod-topic-1")
.cryptoKeyReader(new 
RawFileKeyReader("src/main/resources/test_ecdsa_pubkey.pem", 
"src/main/resources/test_ecdsa_privkey.pem"))

.addEncryptionKey("src/main/resources/test_ecdsa_pubkey.pem")
.enableBatching(false)
.create();
   
   String message = "Test Messages";
int i = 2;
while(true) {
i = i + 1;
message = message + " Mesage # " + i;
   
producer.send(message.getBytes());
System.out.println("Printing the Messages " + 
message);
producer.flush();
if (i == 100) {
break;
}
}
producer.close();
client.close();
   
   **To Reproduce**
   Steps to reproduce t

[GitHub] [pulsar] wolfstudy commented on pull request #6776: [Docs] Fix the Create subscribtion swagger of PersistentTopic

2020-04-28 Thread GitBox


wolfstudy commented on pull request #6776:
URL: https://github.com/apache/pulsar/pull/6776#issuecomment-620691797


   /pulsarbot run-failure-checks



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] surendra-k commented on issue #6821: Pulsar+SSL Java client issue (TLS encryption) via Nginx

2020-04-28 Thread GitBox


surendra-k commented on issue #6821:
URL: https://github.com/apache/pulsar/issues/6821#issuecomment-620601371


   some issue between Nginx and pulsar broker (internal issue), not relevant to 
Java pulsar-client, closing the issue.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] zplinuxlover commented on pull request #6775: change `org.apache.pulsar.broker.admin.impl.NamespacesBase` code

2020-04-28 Thread GitBox


zplinuxlover commented on pull request #6775:
URL: https://github.com/apache/pulsar/pull/6775#issuecomment-620585230


   /pulsarbot run-failure-checks



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] fracasula commented on issue #189: Dead-Letter Queues

2020-04-28 Thread GitBox


fracasula commented on issue #189:
URL: https://github.com/apache/pulsar/issues/189#issuecomment-620568030


   Hey guys, are there any plans to add DLQ support in the Golang CGo based 
library? I see that it's supported in the pure Golang one which we are not 
using though due to your disclaimer saying that  feature parity and stability 
has not been reached.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] darksungg commented on issue #6832: Cannot connect to multiple geo-replicated partitioned topics via consumer

2020-04-28 Thread GitBox


darksungg commented on issue #6832:
URL: https://github.com/apache/pulsar/issues/6832#issuecomment-620552379


   Found the problem, not mentioned in docs : 
   
   this.client = PulsarClient.builder()
   .serviceUrl(serviceUrl)
   .connectionsPerBroker(12)
   .connectionTimeout(2, TimeUnit.SECONDS)
   .operationTimeout(2, TimeUnit.SECONDS)
   .keepAliveInterval(300, TimeUnit.SECONDS)
   .ioThreads(12)
   .listenerThreads(12)
   .build();
   
   You need multiple threads if multipleTopicConsumer for client.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] TolulopeAwode commented on issue #6828: Nodejs- Pulsar-Client NPM issues

2020-04-28 Thread GitBox


TolulopeAwode commented on issue #6828:
URL: https://github.com/apache/pulsar/issues/6828#issuecomment-620532763


   Waiting anxiously for this fix. Thank you



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] gaoran10 edited a comment on issue #6818: pulsar-client vulnerability CVE-2015-5237 (shaded protobuf-java:2.4.1)

2020-04-28 Thread GitBox


gaoran10 edited a comment on issue #6818:
URL: https://github.com/apache/pulsar/issues/6818#issuecomment-620513436


   @guyv Hi, could you provide the pulsar client version? The jar 
`org.apache.pulsar:pulsar-client:jar:2.6.0-SNAPSHOT` dependency 
`com.google.protobuf:protobuf-java-util:jar:3.5.1`.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [pulsar] gaoran10 commented on issue #6818: pulsar-client vulnerability CVE-2015-5237 (shaded protobuf-java:2.4.1)

2020-04-28 Thread GitBox


gaoran10 commented on issue #6818:
URL: https://github.com/apache/pulsar/issues/6818#issuecomment-620513436


   @guyv Could you provide the pulsar client version? The jar 
`org.apache.pulsar:pulsar-client:jar:2.6.0-SNAPSHOT` dependency 
`com.google.protobuf:protobuf-java-util:jar:3.5.1`.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org