[GitHub] [pulsar] laxpio commented on issue #5704: revert terminate topic

2019-11-20 Thread GitBox
laxpio commented on issue #5704: revert terminate topic 
URL: https://github.com/apache/pulsar/issues/5704#issuecomment-556960575
 
 
   case 1:
   update/modify route function,before update function,need restrict message 
write to the topic,prevent dirty data from being written to other topics
   case 2:
   Misoperation


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


With regards,
Apache Git Services


[GitHub] [pulsar] jinxfei commented on issue #5637: Is there any plan for a pure golang client?

2019-11-20 Thread GitBox
jinxfei commented on issue #5637: Is there any plan for a pure golang client?
URL: https://github.com/apache/pulsar/issues/5637#issuecomment-556959087
 
 
   > would like to close this issue. @jinxfei please feel free to reopen it.
   
   Thank you for the information!


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


With regards,
Apache Git Services


[GitHub] [pulsar] laxpio commented on issue #5694: PositionImpl init throws NullPointerException

2019-11-20 Thread GitBox
laxpio commented on issue #5694: PositionImpl init throws NullPointerException
URL: https://github.com/apache/pulsar/issues/5694#issuecomment-556958133
 
 
   the readPosition will be  null when ledger list is null or can not find the 
nextValidPosition 
   the code as follow:
   
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
   ```
   public void asyncReadEntries(final int numberOfEntriesToRead, final 
ReadEntriesCallback callback,
   final Object ctx) {
   checkArgument(numberOfEntriesToRead > 0);
   if (isClosed()) {
   callback.readEntriesFailed(new ManagedLedgerException("Cursor 
was already closed"), ctx);
   return;
   }
   
   PENDING_READ_OPS_UPDATER.incrementAndGet(this);
   OpReadEntry op = OpReadEntry.create(this, 
PositionImpl.get(readPosition), numberOfEntriesToRead, callback, ctx);
   ledger.asyncReadEntries(op);
   }
   ```
   
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java
   ```
   public static OpReadEntry create(ManagedCursorImpl cursor, PositionImpl 
readPositionRef, int count,
   ReadEntriesCallback callback, Object ctx) {
   OpReadEntry op = RECYCLER.get();
   op.readPosition = 
cursor.ledger.startReadOperationOnLedger(readPositionRef);
   op.cursor = cursor;
   op.count = count;
   op.callback = callback;
   op.entries = Lists.newArrayList();
   op.ctx = ctx;
   op.nextReadPosition = PositionImpl.get(op.readPosition);
   return op;
   }
   ```
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai closed issue #5656: [CLIENT SDK] The KeyShared is only supported in java SDK and not in python

2019-11-20 Thread GitBox
jiazhai closed issue #5656: [CLIENT SDK] The KeyShared is only supported in 
java SDK and not in python
URL: https://github.com/apache/pulsar/issues/5656
 
 
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] Jennifer88huang commented on issue #5651: [docs] Update Pulsar SQL configuration and deployment

2019-11-20 Thread GitBox
Jennifer88huang commented on issue #5651: [docs] Update Pulsar SQL 
configuration and deployment
URL: https://github.com/apache/pulsar/pull/5651#issuecomment-556951223
 
 
   run java8 tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] sky-big commented on issue #5659: Fix prometheus access control not enough in kubernetes

2019-11-20 Thread GitBox
sky-big commented on issue #5659: Fix prometheus access control not enough in 
kubernetes
URL: https://github.com/apache/pulsar/pull/5659#issuecomment-556944484
 
 
   > > why broker unit test failed?
   > 
   > @sky-big the apache jenkins CI environment is flaky. The community is 
working on moving Jenkins to Github Actions. once it is done, we hope to have a 
much stable CI pipeline
   
   nice


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


With regards,
Apache Git Services


[pulsar] branch master updated: Fix consumer of python queue size is zero (#5706)

2019-11-20 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


View the commit online:
https://github.com/apache/pulsar/commit/fa029700d3edbc398356f6b74cad1120649d2494

The following commit(s) were added to refs/heads/master by this push:
 new fa02970  Fix consumer of python queue size is zero (#5706)
fa02970 is described below

commit fa029700d3edbc398356f6b74cad1120649d2494
Author: tuteng 
AuthorDate: Thu Nov 21 14:41:39 2019 +0800

Fix consumer of python queue size is zero (#5706)

Fixes https://github.com/apache/pulsar/issues/5634


Master Issue: https://github.com/apache/pulsar/issues/5634

### Motivation

In java clients, when we call the `receive`, we will block it until a 
message arrives. in python clients, when we call the `receive` function, we add 
a delay parameter of 100ms. when the queue size is 0, the `receive` will have a 
strict check on the queue size, causing the following exception to be thrown

```
Traceback (most recent call last):
  File "tst.py", line 10, in 
msg = consumer.receive()
  File "/python3.7/site-packages/pulsar/__init__.py", line 930, in receive
msg = self._consumer.receive()
Exception: Pulsar error: InvalidConfiguration
```
### Modifications

* Removing timeout parameter in synchronous `receive`
* Add test for queue size is 0

### Verifying this change

Add Test
---
 pulsar-client-cpp/python/pulsar_test.py  | 17 +
 pulsar-client-cpp/python/src/consumer.cc |  4 +---
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/pulsar-client-cpp/python/pulsar_test.py 
b/pulsar-client-cpp/python/pulsar_test.py
index f31a7e1..3f8bc08 100755
--- a/pulsar-client-cpp/python/pulsar_test.py
+++ b/pulsar-client-cpp/python/pulsar_test.py
@@ -174,6 +174,23 @@ class PulsarTest(TestCase):
 consumer.unsubscribe()
 client.close()
 
+def test_consumer_queue_size_is_zero(self):
+client = Client(self.serviceUrl)
+consumer = 
client.subscribe('my-python-topic-consumer-init-queue-size-is-zero',
+'my-sub',
+consumer_type=ConsumerType.Shared,
+receiver_queue_size=0,
+initial_position=InitialPosition.Earliest)
+producer = 
client.create_producer('my-python-topic-consumer-init-queue-size-is-zero')
+producer.send(b'hello')
+time.sleep(0.1)
+msg = consumer.receive()
+self.assertTrue(msg)
+self.assertEqual(msg.data(), b'hello')
+
+consumer.unsubscribe()
+client.close()
+
 def test_message_properties(self):
 client = Client(self.serviceUrl)
 topic = 'my-python-test-message-properties'
diff --git a/pulsar-client-cpp/python/src/consumer.cc 
b/pulsar-client-cpp/python/src/consumer.cc
index 930b159..815282d 100644
--- a/pulsar-client-cpp/python/src/consumer.cc
+++ b/pulsar-client-cpp/python/src/consumer.cc
@@ -33,9 +33,7 @@ Message Consumer_receive(Consumer& consumer) {
 
 while (true) {
 Py_BEGIN_ALLOW_THREADS
-// Use 100ms timeout to periodically check whether the
-// interpreter was interrupted
-res = consumer.receive(msg, 100);
+res = consumer.receive(msg);
 Py_END_ALLOW_THREADS
 
 if (res != ResultTimeout) {



[GitHub] [pulsar] sijie closed issue #5634: Python consumer does not accept receiver_queue_size=0

2019-11-20 Thread GitBox
sijie closed issue #5634: Python consumer does not accept receiver_queue_size=0
URL: https://github.com/apache/pulsar/issues/5634
 
 
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie merged pull request #5706: [client]Fix consumer of python queue size is zero

2019-11-20 Thread GitBox
sijie merged pull request #5706: [client]Fix consumer of python queue size is 
zero
URL: https://github.com/apache/pulsar/pull/5706
 
 
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on issue #5659: Fix prometheus access control not enough in kubernetes

2019-11-20 Thread GitBox
sijie commented on issue #5659: Fix prometheus access control not enough in 
kubernetes
URL: https://github.com/apache/pulsar/pull/5659#issuecomment-556942370
 
 
   > why broker unit test failed? 
   
   @sky-big the apache jenkins CI environment is flaky. The community is 
working on moving Jenkins to Github Actions. once it is done, we hope to have a 
much stable CI pipeline


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on issue #5659: Fix prometheus access control not enough in kubernetes

2019-11-20 Thread GitBox
sijie commented on issue #5659: Fix prometheus access control not enough in 
kubernetes
URL: https://github.com/apache/pulsar/pull/5659#issuecomment-556942424
 
 
   run integration tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] gaoran10 commented on issue #5702: [pulsar-sql]Expose configurations of managed ledger and bookkeeper client.

2019-11-20 Thread GitBox
gaoran10 commented on issue #5702: [pulsar-sql]Expose configurations of managed 
ledger and bookkeeper client.
URL: https://github.com/apache/pulsar/pull/5702#issuecomment-556938106
 
 
   run integration tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on issue #5651: [docs] Update Pulsar SQL configuration and deployment

2019-11-20 Thread GitBox
sijie commented on issue #5651: [docs] Update Pulsar SQL configuration and 
deployment
URL: https://github.com/apache/pulsar/pull/5651#issuecomment-556937758
 
 
   run java8 tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] gaoran10 commented on issue #5702: [pulsar-sql]Expose configurations of managed ledger and bookkeeper client.

2019-11-20 Thread GitBox
gaoran10 commented on issue #5702: [pulsar-sql]Expose configurations of managed 
ledger and bookkeeper client.
URL: https://github.com/apache/pulsar/pull/5702#issuecomment-556934516
 
 
   run integration tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5677: [Issue 5676][C++ client] Expose redelivery count

2019-11-20 Thread GitBox
jiazhai commented on issue #5677: [Issue 5676][C++ client] Expose redelivery 
count
URL: https://github.com/apache/pulsar/pull/5677#issuecomment-556910678
 
 
   run cpp tests.
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5676: [C++ client] Expose redelivery count

2019-11-20 Thread GitBox
jiazhai commented on issue #5676: [C++ client] Expose redelivery count
URL: https://github.com/apache/pulsar/issues/5676#issuecomment-556910532
 
 
   Thanks @frejonb for the contribute.


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5678: all-messages-shared subscription mode

2019-11-20 Thread GitBox
jiazhai commented on issue #5678: all-messages-shared subscription mode
URL: https://github.com/apache/pulsar/issues/5678#issuecomment-556910350
 
 
   I would like to close this issue. welcome to open other issue when meet new 
problem.


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai closed issue #5678: all-messages-shared subscription mode

2019-11-20 Thread GitBox
jiazhai closed issue #5678: all-messages-shared subscription mode
URL: https://github.com/apache/pulsar/issues/5678
 
 
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5678: all-messages-shared subscription mode

2019-11-20 Thread GitBox
jiazhai commented on issue #5678: all-messages-shared subscription mode
URL: https://github.com/apache/pulsar/issues/5678#issuecomment-556910247
 
 
   @ssrkr you are right. use a new `subscriptionName ` for each consumer could 
achieve the fan-out use case. 


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5672: [C++ client] Deadletter queue functionality

2019-11-20 Thread GitBox
jiazhai commented on issue #5672: [C++ client] Deadletter queue functionality
URL: https://github.com/apache/pulsar/issues/5672#issuecomment-556909657
 
 
   @frejonb, 👍 welcome and feel free to do it. :)


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5683: Cannot create topic under sample/standalone/ns1

2019-11-20 Thread GitBox
jiazhai commented on issue #5683: Cannot create topic under 
sample/standalone/ns1
URL: https://github.com/apache/pulsar/issues/5683#issuecomment-556907862
 
 
   @zymap @candlerb Would you like to fix this?


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5687: Failed to enable State API in K8s installation

2019-11-20 Thread GitBox
jiazhai commented on issue #5687: Failed to enable State API in K8s installation
URL: https://github.com/apache/pulsar/issues/5687#issuecomment-556906543
 
 
   Thanks @pedro93 for reporting this. :) since you have already root caused 
this issue, would you like to provide a fix for this?


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5690: Elasticsearch 5.x Sink connector incompatible

2019-11-20 Thread GitBox
jiazhai commented on issue #5690: Elasticsearch 5.x Sink connector incompatible
URL: https://github.com/apache/pulsar/issues/5690#issuecomment-556906177
 
 
   @tuteng to take a look


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5694: PositionImpl init throws NullPointerException

2019-11-20 Thread GitBox
jiazhai commented on issue #5694: PositionImpl init throws NullPointerException
URL: https://github.com/apache/pulsar/issues/5694#issuecomment-556905473
 
 
   @laxpio Thanks for reporting this. How about return a NULL when passed in 
NULL?


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


With regards,
Apache Git Services


[GitHub] [pulsar] codelipenghui commented on issue #5680: [transaction-coordinator] Implementation of transaction coordinator client.

2019-11-20 Thread GitBox
codelipenghui commented on issue #5680: [transaction-coordinator] 
Implementation of transaction coordinator client.
URL: https://github.com/apache/pulsar/pull/5680#issuecomment-556905062
 
 
   retest this please


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5695: Go: Segfault on messageId serialize after getting it from producer

2019-11-20 Thread GitBox
jiazhai commented on issue #5695: Go: Segfault on messageId serialize after 
getting it from producer
URL: https://github.com/apache/pulsar/issues/5695#issuecomment-556904008
 
 
   @lspgn Thanks for the reporting. 
   @wolfstudy Would you please take a look of this?


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


With regards,
Apache Git Services


[GitHub] [pulsar] zymap commented on a change in pull request #5376: [Issue 3009][docs] Add presto sql REST APIs doc

2019-11-20 Thread GitBox
zymap commented on a change in pull request #5376: [Issue 3009][docs] Add 
presto sql REST APIs doc
URL: https://github.com/apache/pulsar/pull/5376#discussion_r348881507
 
 

 ##
 File path: site2/docs/sql-rest-api.md
 ##
 @@ -0,0 +1,196 @@
+---
+id: sql-rest-api
+title: Pulsar SQL REST APIs
+sidebar_label: REST APIs
+---
+
+## Overview
+
+This describes the resources that make up the Presto REST API v1. If you have 
any problems or request, please create a Github issue to contact us.
+
+## Current version
+
+All requests should use the v1 version of REST API to request the presto 
service. You need to use explicitly URL `http://presto.service:8081/v1` to 
request service.
 
 Review comment:
   will fix.


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5710: Add publish rate limit for each broker to avoid OOM

2019-11-20 Thread GitBox
jiazhai commented on issue #5710: Add publish rate limit for each broker to 
avoid OOM
URL: https://github.com/apache/pulsar/pull/5710#issuecomment-556903507
 
 
   updated with latest master to resolve conflict. 


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


With regards,
Apache Git Services


svn commit: r36853 [1/2] - in /dev/pulsar/pulsar-2.4.2-candidate-1: ./ DEB/ RPMS/ RPMS/repodata/ connectors/

2019-11-20 Thread rxl
Author: rxl
Date: Thu Nov 21 03:24:55 2019
New Revision: 36853

Log:
Staging artifacts and signature for Pulsar release 2.4.2

Added:
dev/pulsar/pulsar-2.4.2-candidate-1/
dev/pulsar/pulsar-2.4.2-candidate-1/DEB/
dev/pulsar/pulsar-2.4.2-candidate-1/DEB/Packages.gz   (with props)
dev/pulsar/pulsar-2.4.2-candidate-1/DEB/Packages.gz.asc
dev/pulsar/pulsar-2.4.2-candidate-1/DEB/Packages.gz.sha512
dev/pulsar/pulsar-2.4.2-candidate-1/DEB/apache-pulsar-client-dev.deb   
(with props)
dev/pulsar/pulsar-2.4.2-candidate-1/DEB/apache-pulsar-client-dev.deb.asc
dev/pulsar/pulsar-2.4.2-candidate-1/DEB/apache-pulsar-client-dev.deb.sha512
dev/pulsar/pulsar-2.4.2-candidate-1/DEB/apache-pulsar-client.deb   (with 
props)
dev/pulsar/pulsar-2.4.2-candidate-1/DEB/apache-pulsar-client.deb.asc
dev/pulsar/pulsar-2.4.2-candidate-1/DEB/apache-pulsar-client.deb.sha512
dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/apache-pulsar-client-2.4.2-1.x86_64.rpm
   (with props)

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/apache-pulsar-client-2.4.2-1.x86_64.rpm.asc

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/apache-pulsar-client-2.4.2-1.x86_64.rpm.sha512

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/apache-pulsar-client-debuginfo-2.4.2-1.x86_64.rpm
   (with props)

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/apache-pulsar-client-debuginfo-2.4.2-1.x86_64.rpm.asc

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/apache-pulsar-client-debuginfo-2.4.2-1.x86_64.rpm.sha512

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/apache-pulsar-client-devel-2.4.2-1.x86_64.rpm
   (with props)

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/apache-pulsar-client-devel-2.4.2-1.x86_64.rpm.asc

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/apache-pulsar-client-devel-2.4.2-1.x86_64.rpm.sha512
dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/1b064aa2de549db4bea4cddeb0abb14fb32ac232e0915624738e0293680f8053-primary.xml.gz
   (with props)

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/1b064aa2de549db4bea4cddeb0abb14fb32ac232e0915624738e0293680f8053-primary.xml.gz.asc

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/1b064aa2de549db4bea4cddeb0abb14fb32ac232e0915624738e0293680f8053-primary.xml.gz.sha512

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/23b8adfe244a2eec89b5437dd723f5eec120031e7ac7292a661faefda4e7ee95-primary.sqlite.bz2
   (with props)

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/23b8adfe244a2eec89b5437dd723f5eec120031e7ac7292a661faefda4e7ee95-primary.sqlite.bz2.asc

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/23b8adfe244a2eec89b5437dd723f5eec120031e7ac7292a661faefda4e7ee95-primary.sqlite.bz2.sha512

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/9709cd001333998f8d49a33454fc077dd142a1a37dfa8db657723fc10a56a5c6-other.sqlite.bz2
   (with props)

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/9709cd001333998f8d49a33454fc077dd142a1a37dfa8db657723fc10a56a5c6-other.sqlite.bz2.asc

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/9709cd001333998f8d49a33454fc077dd142a1a37dfa8db657723fc10a56a5c6-other.sqlite.bz2.sha512

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/a2f06eb1b8b0bba0ebf27333c9e6695b4532f99ca737b22f8dac6e3b5bd62417-other.xml.gz
   (with props)

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/a2f06eb1b8b0bba0ebf27333c9e6695b4532f99ca737b22f8dac6e3b5bd62417-other.xml.gz.asc

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/a2f06eb1b8b0bba0ebf27333c9e6695b4532f99ca737b22f8dac6e3b5bd62417-other.xml.gz.sha512

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/b0db49db80ca61ea239cef560f1ae749e4951ce18ea16408847fcea5ee9b1832-filelists.sqlite.bz2
   (with props)

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/b0db49db80ca61ea239cef560f1ae749e4951ce18ea16408847fcea5ee9b1832-filelists.sqlite.bz2.asc

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/b0db49db80ca61ea239cef560f1ae749e4951ce18ea16408847fcea5ee9b1832-filelists.sqlite.bz2.sha512

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/cb2779b2f938ab1aaa4cbf59641cdc30de8e92c6ba59c1b6b73a63ef2263c143-filelists.xml.gz
   (with props)

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/cb2779b2f938ab1aaa4cbf59641cdc30de8e92c6ba59c1b6b73a63ef2263c143-filelists.xml.gz.asc

dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/cb2779b2f938ab1aaa4cbf59641cdc30de8e92c6ba59c1b6b73a63ef2263c143-filelists.xml.gz.sha512
dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/repomd.xml
dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/repomd.xml.asc
dev/pulsar/pulsar-2.4.2-candidate-1/RPMS/repodata/repomd.xml.sha512
dev/pulsar/pulsar-2.4.2-candidate-1/apache-pulsar-2.4.2-bin.tar.gz   (with 
props)
dev/pulsar/pulsar-2.4.2-candidate-1/apache-pulsar-2.4.2-bin.tar.gz.asc
dev/pulsar/pulsar-2.4.2-candidate-1/apache-pulsar-2.4.2-bin.tar.gz.sha512
dev/pulsar/pulsar-2.4.2

svn commit: r36853 [2/2] - in /dev/pulsar/pulsar-2.4.2-candidate-1: ./ DEB/ RPMS/ RPMS/repodata/ connectors/

2019-11-20 Thread rxl
Added: 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-jdbc-2.4.2.nar.sha512
==
--- 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-jdbc-2.4.2.nar.sha512 
(added)
+++ 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-jdbc-2.4.2.nar.sha512 
Thu Nov 21 03:24:55 2019
@@ -0,0 +1 @@
+6f9e0503634f4e2d7f134cb2a9fd7064cf22d963804c0e0ed0e3728fcc1811f4eb8273901a2c685876f042c1769cd67335a6a1b5c414f2804703accc1c24895a
  ./connectors/pulsar-io-jdbc-2.4.2.nar

Added: dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-2.4.2.nar
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-2.4.2.nar
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-2.4.2.nar.asc
==
--- 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-2.4.2.nar.asc 
(added)
+++ 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-2.4.2.nar.asc 
Thu Nov 21 03:24:55 2019
@@ -0,0 +1,11 @@
+-BEGIN PGP SIGNATURE-
+
+iQEzBAABCAAdFiEECKAwg6lvwuBMnJwMNzDEKhaq4kMFAl3VPiAACgkQNzDEKhaq
+4kOJJAf+Kw45Nd3v1HI3tELv0qckaMEh7ZlZmKWz84h+fHNTyNg9g4+FDCuq370c
+I5QoNM3kGermfcI9uEyKti6+ZQn0IxHyT/TLzyJzE/1aJVly3qG/A3f91EvVrlNm
+sFAXzDoUFngG+WRQlL6OX0UL7lEBUSUbppTmJe3WnkfTjRlyfEbqgJRqyey0nIHc
+uPTZpc6DdkFDMPxpW9bs/18hK5ovtIuRqdtkVKTtvxEzw0xQAaAe2IA3TTSRgkJF
+FcQDW7j7R5aY1LGHHqiU8FbskOq3uGhvdVBhJuO3BtdSN+4PRggLhv48daq9mqyw
+XClT59ko/+5cL7BoLeDOwlvOJUfF/A==
+=dCB1
+-END PGP SIGNATURE-

Added: 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-2.4.2.nar.sha512
==
--- 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-2.4.2.nar.sha512 
(added)
+++ 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-2.4.2.nar.sha512 
Thu Nov 21 03:24:55 2019
@@ -0,0 +1 @@
+f863c4a0a99d35f44333a4bbc128922dbec487c2980be85e5ba85baf14479f071d4e18d1cc25f4d810050fbd9884b23519e52cbc3dc645f0caaf1620f557cedd
  ./connectors/pulsar-io-kafka-2.4.2.nar

Added: 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-connect-adaptor-2.4.2.nar
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-connect-adaptor-2.4.2.nar
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-connect-adaptor-2.4.2.nar.asc
==
--- 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-connect-adaptor-2.4.2.nar.asc
 (added)
+++ 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-connect-adaptor-2.4.2.nar.asc
 Thu Nov 21 03:24:55 2019
@@ -0,0 +1,11 @@
+-BEGIN PGP SIGNATURE-
+
+iQEzBAABCAAdFiEECKAwg6lvwuBMnJwMNzDEKhaq4kMFAl3VPiUACgkQNzDEKhaq
+4kNX9wf/VXDcJEcpetKOdSPbI9vs0UiRxDJZgRXDVPZ9y8PWSKq1do79MvC4FqpE
+GoK2o6T5RFhm76uhikfbvKsEKWM2kGDXRvq+0q7HXdmUtjF6b/yLQ1Apya4QVDf3
+pqw3D/0kDrEhWDPBcxtcsZdRL2GNm4DUlGJC5oxKq+CHIObF2eHJrXWUGi+KlokS
+Gj65ga7zqkCv8gJYYBStJ8+72Lj0P96PCpyXUrVecCa4+c2Go97KbkWMIoiYQs8T
+A0y9HRx6qQq8BgLKrzClO4zyv+MfnHcgLL5C+8EenAKenILuktOw50db2JUJGiiy
+Jjfj+N9XD+JPAAX/xX65k/eZ2QgGjg==
+=968k
+-END PGP SIGNATURE-

Added: 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-connect-adaptor-2.4.2.nar.sha512
==
--- 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-connect-adaptor-2.4.2.nar.sha512
 (added)
+++ 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kafka-connect-adaptor-2.4.2.nar.sha512
 Thu Nov 21 03:24:55 2019
@@ -0,0 +1 @@
+ffd816aeeb40024dfe5a7a265b32ca32c262622e9554a0d808a7a9aff2b02229c98429dfbbe4234da08c5096e8a7127016d9e5ca69be3ad2576fbccb69a77488
  ./connectors/pulsar-io-kafka-connect-adaptor-2.4.2.nar

Added: 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kinesis-2.4.2.nar
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kinesis-2.4.2.nar
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-2.4.2-candidate-1/connectors/pulsar-io-kinesis-2.4.2.nar.asc
==
--- 
dev/pulsar/pulsar-2.4.2-candidate-1/

[GitHub] [pulsar] lxkaka opened a new issue #5711: through pulsar proxy visit api return 502

2019-11-20 Thread GitBox
lxkaka opened a new issue #5711: through pulsar proxy visit api return 502
URL: https://github.com/apache/pulsar/issues/5711
 
 
   **Describe the bug**
   through proxy call admin api return error_code 502
   ```
   curl -i http://proxy-address/admin/v2/persistent/public/default
   HTTP/1.1 502 Bad Gateway
   Date: Thu, 21 Nov 2019 03:09:30 GMT
   Content-Type: text/html;charset=iso-8859-1
   Content-Length: 355
   Connection: keep-alive
   Cache-Control: must-revalidate,no-cache,no-store
   
   
   
   
   Error 502 Bad Gateway
   
   HTTP ERROR 502
   Problem accessing /admin/v2/persistent/public/default. Reason:
   Bad Gatewayhttp://eclipse.org/jetty";>Powered 
by Jetty:// 9.4.12.v20180830
   
   
   
   ```
   
   **Expected behavior**
   expect return 200 and valid response
   
   **Environment **
- deploy in k8s and image is `puslar-all:2.4.1`
   
   **Additional context**
   pulsar proxy logs
   ```
   at io.netty.channel.unix.FileDescriptor.readAddress(..)(Unknown Source) 
~[io.netty-netty-all-4.1.32.Final.jar:4.1.32.Final]
   02:24:39.865 [pulsar-discovery-io-2-1] WARN  
org.apache.pulsar.proxy.server.ProxyConnection - [/172.19.25.180:46476] Got 
exception NativeIoException : syscall:read(..) failed: Connection reset by peer
   02:24:39.865 [pulsar-discovery-io-2-1] INFO  
org.apache.pulsar.proxy.server.ProxyConnection - [/172.19.25.180:46476] 
Connection closed
   02:24:40.057 [pulsar-discovery-io-2-1] INFO  
org.apache.pulsar.proxy.server.ProxyConnection - [/172.19.25.229:53780] New 
connection opened
   02:24:40.057 [pulsar-discovery-io-2-1] WARN  
io.netty.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, 
and it reached at the tail of the pipeline. It usually means the last handler 
in the pipeline did not handle the exception.
   io.netty.channel.unix.Errors$NativeIoException: syscall:read(..) failed: 
Connection reset by peer
at io.netty.channel.unix.FileDescriptor.readAddress(..)(Unknown Source) 
~[io.netty-netty-all-4.1.32.Final.jar:4.1.32.Final]
   02:24:40.057 [pulsar-discovery-io-2-1] WARN  
org.apache.pulsar.proxy.server.ProxyConnection - [/172.19.25.229:53780] Got 
exception NativeIoException : syscall:read(..) failed: Connection reset by peer
   02:24:40.057 [pulsar-discovery-io-2-1] INFO  
org.apache.pulsar.proxy.server.ProxyConnection - [/172.19.25.229:53780] 
Connection closed
   02:24:40.067 [pulsar-discovery-io-2-1] INFO  
org.apache.pulsar.proxy.server.ProxyConnection - [/192.168.64.129:44812] New 
connection opened
   02:24:40.067 [pulsar-discovery-io-2-1] WARN  
io.netty.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, 
and it reached at the tail of the pipeline. It usually means the last handler 
in the pipeline did not handle the exception.
   io.netty.channel.unix.Errors$NativeIoException: syscall:read(..) failed: 
Connection reset by peer
   ```
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] zymap commented on issue #5613: [PIP-50] Package management implementation (part-1)

2019-11-20 Thread GitBox
zymap commented on issue #5613: [PIP-50] Package management implementation 
(part-1)
URL: https://github.com/apache/pulsar/pull/5613#issuecomment-556889252
 
 
   @sijie  PTAL. Thanks.


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai closed issue #5703: Apache Netbeans 11.1 Not Opening

2019-11-20 Thread GitBox
jiazhai closed issue #5703: Apache Netbeans 11.1 Not Opening
URL: https://github.com/apache/pulsar/issues/5703
 
 
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5703: Apache Netbeans 11.1 Not Opening

2019-11-20 Thread GitBox
jiazhai commented on issue #5703: Apache Netbeans 11.1 Not Opening
URL: https://github.com/apache/pulsar/issues/5703#issuecomment-556887888
 
 
   @danvixent Is this a mistaken? would like to close it. please feel free to 
reopen if is indeed a pulsar 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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5704: revert terminate topic

2019-11-20 Thread GitBox
jiazhai commented on issue #5704: revert terminate topic 
URL: https://github.com/apache/pulsar/issues/5704#issuecomment-556884325
 
 
   @laxpio Thanks for open this issue. Do you mind share a little of your use 
case? why a topic is terminated but need to revert? 


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


With regards,
Apache Git Services


[pulsar] branch master updated (2de6a0f -> 39f37c9)

2019-11-20 Thread zhaijia
This is an automated email from the ASF dual-hosted git repository.

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


from 2de6a0f  [Doc] Add HBase sink connector guide (#5671)
 add 39f37c9  [issues 5698]Handle replicator producer as generated name 
producer (#5701)

No new revisions were added by this update.

Summary of changes:
 .../pulsar/broker/service/AbstractTopic.java   | 11 +---
 .../pulsar/broker/service/PersistentTopicTest.java | 30 +++---
 2 files changed, 35 insertions(+), 6 deletions(-)



[GitHub] [pulsar] jiazhai closed issue #5698: Geo replicator has ProducerBusyException

2019-11-20 Thread GitBox
jiazhai closed issue #5698: Geo replicator has ProducerBusyException
URL: https://github.com/apache/pulsar/issues/5698
 
 
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai merged pull request #5701: [issues 5698]Handle replicator producer as generated name producer

2019-11-20 Thread GitBox
jiazhai merged pull request #5701: [issues 5698]Handle replicator producer as 
generated name producer
URL: https://github.com/apache/pulsar/pull/5701
 
 
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] codelipenghui commented on a change in pull request #5680: [transaction-coordinator] Implementation of transaction coordinator client.

2019-11-20 Thread GitBox
codelipenghui commented on a change in pull request #5680: 
[transaction-coordinator] Implementation of transaction coordinator client.
URL: https://github.com/apache/pulsar/pull/5680#discussion_r348869994
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
 ##
 @@ -1399,6 +1402,84 @@ protected void 
handleGetOrCreateSchema(CommandGetOrCreateSchema commandGetOrCrea
 });
 }
 
+@Override
+protected void handleNewTxn(CommandNewTxn command) {
+if (log.isDebugEnabled()) {
+log.debug("Receive new txn request {} to transaction meta store {} 
from {}.", command.getRequestId(), command.getTcId(), remoteAddress);
+}
+
service.pulsar().getTransactionMetadataStoreService().newTransaction(TransactionCoordinatorID.get(command.getTcId()))
+.whenComplete(((txnID, ex) -> {
+if (ex == null) {
+if (log.isDebugEnabled()) {
+log.debug("Send response {} for new txn request {}", 
command.getTcId(),  command.getRequestId());
+}
+
ctx.writeAndFlush(Commands.newTxnResponse(command.getRequestId(), 
txnID.getLeastSigBits(), txnID.getMostSigBits()));
+} else {
+if (log.isDebugEnabled()) {
+log.debug("Send response error for new txn request 
{}", command.getRequestId(), ex);
+}
+
ctx.writeAndFlush(Commands.newTxnResponse(command.getRequestId(), 
txnID.getMostSigBits(), BrokerServiceException.getClientErrorCode(ex), 
ex.getMessage()));
 
 Review comment:
   Oh, can't use txnID.getMostSigBits() here because exception occur, so we 
don't have the response txnID from meta store, i will change it 
command.getTcId().


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5702: [pulsar-sql]Expose configurations of managed ledger and bookkeeper client.

2019-11-20 Thread GitBox
jiazhai commented on issue #5702: [pulsar-sql]Expose configurations of managed 
ledger and bookkeeper client.
URL: https://github.com/apache/pulsar/pull/5702#issuecomment-556868948
 
 
   run integration tests
   
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5706: [client]Fix consumer of python queue size is zero

2019-11-20 Thread GitBox
jiazhai commented on issue #5706: [client]Fix consumer of python queue size is 
zero
URL: https://github.com/apache/pulsar/pull/5706#issuecomment-556868246
 
 
   run integration tests
   
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5709: Support multiple topic subscriptions across multiple namespace

2019-11-20 Thread GitBox
jiazhai commented on issue #5709: Support multiple topic subscriptions across 
multiple namespace
URL: https://github.com/apache/pulsar/issues/5709#issuecomment-556866421
 
 
   Seems this not need to much change, maybe remove the namespace checking, and 
check if all the the tests passed.


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5710: Add publish rate limit for each broker to avoid OOM

2019-11-20 Thread GitBox
jiazhai commented on issue #5710: Add publish rate limit for each broker to 
avoid OOM
URL: https://github.com/apache/pulsar/pull/5710#issuecomment-556864011
 
 
   run java8 tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] jiazhai commented on issue #5710: Add publish rate limit for each broker to avoid OOM

2019-11-20 Thread GitBox
jiazhai commented on issue #5710: Add publish rate limit for each broker to 
avoid OOM
URL: https://github.com/apache/pulsar/pull/5710#issuecomment-556863849
 
 
   Thanks @rdhabalia and @sijie for the attention on this.


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


With regards,
Apache Git Services


[GitHub] [pulsar] codelipenghui commented on a change in pull request #5680: [transaction-coordinator] Implementation of transaction coordinator client.

2019-11-20 Thread GitBox
codelipenghui commented on a change in pull request #5680: 
[transaction-coordinator] Implementation of transaction coordinator client.
URL: https://github.com/apache/pulsar/pull/5680#discussion_r348869994
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
 ##
 @@ -1399,6 +1402,84 @@ protected void 
handleGetOrCreateSchema(CommandGetOrCreateSchema commandGetOrCrea
 });
 }
 
+@Override
+protected void handleNewTxn(CommandNewTxn command) {
+if (log.isDebugEnabled()) {
+log.debug("Receive new txn request {} to transaction meta store {} 
from {}.", command.getRequestId(), command.getTcId(), remoteAddress);
+}
+
service.pulsar().getTransactionMetadataStoreService().newTransaction(TransactionCoordinatorID.get(command.getTcId()))
+.whenComplete(((txnID, ex) -> {
+if (ex == null) {
+if (log.isDebugEnabled()) {
+log.debug("Send response {} for new txn request {}", 
command.getTcId(),  command.getRequestId());
+}
+
ctx.writeAndFlush(Commands.newTxnResponse(command.getRequestId(), 
txnID.getLeastSigBits(), txnID.getMostSigBits()));
+} else {
+if (log.isDebugEnabled()) {
+log.debug("Send response error for new txn request 
{}", command.getRequestId(), ex);
+}
+
ctx.writeAndFlush(Commands.newTxnResponse(command.getRequestId(), 
txnID.getMostSigBits(), BrokerServiceException.getClientErrorCode(ex), 
ex.getMessage()));
 
 Review comment:
   Oh, i here can't use txnID.getMostSigBits(), because exception occur here, 
so we don't have the response txnID from meta store, i will change it 
command.getTcId().


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


With regards,
Apache Git Services


[GitHub] [pulsar] sky-big commented on issue #5659: Fix prometheus access control not enough in kubernetes

2019-11-20 Thread GitBox
sky-big commented on issue #5659: Fix prometheus access control not enough in 
kubernetes
URL: https://github.com/apache/pulsar/pull/5659#issuecomment-556842051
 
 
   retest again!


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


With regards,
Apache Git Services


[GitHub] [pulsar] aahmed-se commented on issue #5642: Add Github workflow for gated checkin

2019-11-20 Thread GitBox
aahmed-se commented on issue #5642: Add Github workflow for gated checkin
URL: https://github.com/apache/pulsar/pull/5642#issuecomment-556784218
 
 
   run java8 tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] aahmed-se commented on issue #5642: Add Github workflow for gated checkin

2019-11-20 Thread GitBox
aahmed-se commented on issue #5642: Add Github workflow for gated checkin
URL: https://github.com/apache/pulsar/pull/5642#issuecomment-556783943
 
 
   run cpp tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] pouledodue closed issue #4937: Retrieve schema instance from schema info for type 'NONE'

2019-11-20 Thread GitBox
pouledodue closed issue #4937: Retrieve schema instance from schema info for 
type 'NONE' 
URL: https://github.com/apache/pulsar/issues/4937
 
 
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] tuteng commented on issue #5706: [client]Fix consumer of python queue size is zero

2019-11-20 Thread GitBox
tuteng commented on issue #5706: [client]Fix consumer of python queue size is 
zero
URL: https://github.com/apache/pulsar/pull/5706#issuecomment-556630275
 
 
   run integration tests
   
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] aahmed-se commented on issue #5690: Elasticsearch 5.x Sink connector incompatible

2019-11-20 Thread GitBox
aahmed-se commented on issue #5690: Elasticsearch 5.x Sink connector 
incompatible
URL: https://github.com/apache/pulsar/issues/5690#issuecomment-556543674
 
 
   this probably requires another version of the connector should be part of a 
large discussion of managing the growing list of connectors.


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


With regards,
Apache Git Services


[GitHub] [pulsar] aahmed-se commented on issue #5703: Apache Netbeans 11.1 Not Opening

2019-11-20 Thread GitBox
aahmed-se commented on issue #5703: Apache Netbeans 11.1 Not Opening
URL: https://github.com/apache/pulsar/issues/5703#issuecomment-556542205
 
 
   How is this relevant for apache pulsar ?


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on issue #4941: Unable to delete topic when both consumer (subscription) and reader has been connected

2019-11-20 Thread GitBox
sijie commented on issue #4941: Unable to delete topic when both consumer 
(subscription) and reader has been connected
URL: https://github.com/apache/pulsar/issues/4941#issuecomment-556437704
 
 
   > why the Reader is seeing any previously published data, when retentions on 
the namespace are zero (both time and size), and all messages were 
acknowledged. This is confusing.
   
   @youurayy the data is deleted segment by segment. unless the whole segment 
is deleted, the reader will see the messages of the segment that is not deleted.


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie closed issue #4941: Unable to delete topic when both consumer (subscription) and reader has been connected

2019-11-20 Thread GitBox
sijie closed issue #4941: Unable to delete topic when both consumer 
(subscription) and reader has been connected
URL: https://github.com/apache/pulsar/issues/4941
 
 
   


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on issue #4941: Unable to delete topic when both consumer (subscription) and reader has been connected

2019-11-20 Thread GitBox
sijie commented on issue #4941: Unable to delete topic when both consumer 
(subscription) and reader has been connected
URL: https://github.com/apache/pulsar/issues/4941#issuecomment-556436622
 
 
   The problem (inconsistent range) has been fixed as part of fixing #5621.


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on issue #5706: [client]Fix consumer of python queue size is zero

2019-11-20 Thread GitBox
sijie commented on issue #5706: [client]Fix consumer of python queue size is 
zero
URL: https://github.com/apache/pulsar/pull/5706#issuecomment-556402583
 
 
   run integration tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5376: [Issue 3009][docs] Add presto sql REST APIs doc

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5376: [Issue 3009][docs] Add 
presto sql REST APIs doc
URL: https://github.com/apache/pulsar/pull/5376#discussion_r348745396
 
 

 ##
 File path: site2/docs/sql-rest-api.md
 ##
 @@ -0,0 +1,196 @@
+---
+id: sql-rest-api
+title: Pulsar SQL REST APIs
+sidebar_label: REST APIs
+---
+
+## Overview
+
+This describes the resources that make up the Presto REST API v1. If you have 
any problems or request, please create a Github issue to contact us.
+
+## Current version
+
+All requests should use the v1 version of REST API to request the presto 
service. You need to use explicitly URL `http://presto.service:8081/v1` to 
request service.
+
+Also, the header `X-Presto-User` is required when you send a `POST` request.
+
+```properties
+X-Presto-User: username
+```
+
+For more information about headers, see the [presto/PrestoHeaders.java at 
master · prestodb/presto · 
GitHub](https://github.com/prestodb/presto/blob/master/presto-client/src/main/java/com/facebook/presto/client/PrestoHeaders.java)
+
+## Schema
+
+You can type statement in the HTTP body. And all data is received as JSON that 
might contain a `nextUri` link. If there is no `nextUri` link, then the query 
is finished (either successfully completed or failed). Otherwise., keep 
following the `nextUri` link.
+
+**Example**: Execute `show catalogs`.
+
+```powershell
+➜  ~ curl --header "X-Presto-User: test-user" --request POST --data 'show 
catalogs' http://localhost:8081/v1/statement | json_pp
 
 Review comment:
   what is `json_pp`? do users need to install `json_pp` when running this 
example?


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5376: [Issue 3009][docs] Add presto sql REST APIs doc

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5376: [Issue 3009][docs] Add 
presto sql REST APIs doc
URL: https://github.com/apache/pulsar/pull/5376#discussion_r348744045
 
 

 ##
 File path: site2/docs/sql-rest-api.md
 ##
 @@ -0,0 +1,196 @@
+---
+id: sql-rest-api
+title: Pulsar SQL REST APIs
+sidebar_label: REST APIs
+---
+
+## Overview
+
+This describes the resources that make up the Presto REST API v1. If you have 
any problems or request, please create a Github issue to contact us.
+
+## Current version
+
+All requests should use the v1 version of REST API to request the presto 
service. You need to use explicitly URL `http://presto.service:8081/v1` to 
request service.
 
 Review comment:
   presto.service is a placeholder, right? People need to change this 
placeholder. So you have to document it clearly.


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5376: [Issue 3009][docs] Add presto sql REST APIs doc

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5376: [Issue 3009][docs] Add 
presto sql REST APIs doc
URL: https://github.com/apache/pulsar/pull/5376#discussion_r348744614
 
 

 ##
 File path: site2/docs/sql-rest-api.md
 ##
 @@ -0,0 +1,196 @@
+---
+id: sql-rest-api
+title: Pulsar SQL REST APIs
+sidebar_label: REST APIs
+---
+
+## Overview
+
+This describes the resources that make up the Presto REST API v1. If you have 
any problems or request, please create a Github issue to contact us.
+
+## Current version
+
+All requests should use the v1 version of REST API to request the presto 
service. You need to use explicitly URL `http://presto.service:8081/v1` to 
request service.
+
+Also, the header `X-Presto-User` is required when you send a `POST` request.
+
+```properties
+X-Presto-User: username
+```
+
+For more information about headers, see the [presto/PrestoHeaders.java at 
master · prestodb/presto · 
GitHub](https://github.com/prestodb/presto/blob/master/presto-client/src/main/java/com/facebook/presto/client/PrestoHeaders.java)
 
 Review comment:
   "presto/PrestoHeaders.java at master · prestodb/presto · GitHub" 
   
   why do we need "at master · prestodb/presto · GitHub"?


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5376: [Issue 3009][docs] Add presto sql REST APIs doc

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5376: [Issue 3009][docs] Add 
presto sql REST APIs doc
URL: https://github.com/apache/pulsar/pull/5376#discussion_r348745677
 
 

 ##
 File path: site2/docs/sql-rest-api.md
 ##
 @@ -0,0 +1,196 @@
+---
+id: sql-rest-api
+title: Pulsar SQL REST APIs
+sidebar_label: REST APIs
+---
+
+## Overview
+
+This describes the resources that make up the Presto REST API v1. If you have 
any problems or request, please create a Github issue to contact us.
+
+## Current version
+
+All requests should use the v1 version of REST API to request the presto 
service. You need to use explicitly URL `http://presto.service:8081/v1` to 
request service.
+
+Also, the header `X-Presto-User` is required when you send a `POST` request.
+
+```properties
+X-Presto-User: username
+```
+
+For more information about headers, see the [presto/PrestoHeaders.java at 
master · prestodb/presto · 
GitHub](https://github.com/prestodb/presto/blob/master/presto-client/src/main/java/com/facebook/presto/client/PrestoHeaders.java)
+
+## Schema
+
+You can type statement in the HTTP body. And all data is received as JSON that 
might contain a `nextUri` link. If there is no `nextUri` link, then the query 
is finished (either successfully completed or failed). Otherwise., keep 
following the `nextUri` link.
+
+**Example**: Execute `show catalogs`.
+
+```powershell
+➜  ~ curl --header "X-Presto-User: test-user" --request POST --data 'show 
catalogs' http://localhost:8081/v1/statement | json_pp
+{
+   "infoUri" : 
"http://localhost:8081/ui/query.html?20191113_033653_6_dg6hb";,
+   "stats" : {
+  "queued" : true,
+  "nodes" : 0,
+  "userTimeMillis" : 0,
+  "cpuTimeMillis" : 0,
+  "wallTimeMillis" : 0,
+  "processedBytes" : 0,
+  "processedRows" : 0,
+  "runningSplits" : 0,
+  "queuedTimeMillis" : 0,
+  "queuedSplits" : 0,
+  "completedSplits" : 0,
+  "totalSplits" : 0,
+  "scheduled" : false,
+  "peakMemoryBytes" : 0,
+  "state" : "QUEUED",
+  "elapsedTimeMillis" : 0
+   },
+   "id" : "20191113_033653_6_dg6hb",
+   "nextUri" : 
"http://localhost:8081/v1/statement/20191113_033653_6_dg6hb/1";
+}
+
+➜  ~ curl http://localhost:8081/v1/statement/20191113_033653_6_dg6hb/1 | 
json_pp
+{
+   "infoUri" : 
"http://localhost:8081/ui/query.html?20191113_033653_6_dg6hb";,
+   "nextUri" : 
"http://localhost:8081/v1/statement/20191113_033653_6_dg6hb/2";,
+   "id" : "20191113_033653_6_dg6hb",
+   "stats" : {
+  "state" : "PLANNING",
+  "totalSplits" : 0,
+  "queued" : false,
+  "userTimeMillis" : 0,
+  "completedSplits" : 0,
+  "scheduled" : false,
+  "wallTimeMillis" : 0,
+  "runningSplits" : 0,
+  "queuedSplits" : 0,
+  "cpuTimeMillis" : 0,
+  "processedRows" : 0,
+  "processedBytes" : 0,
+  "nodes" : 0,
+  "queuedTimeMillis" : 1,
+  "elapsedTimeMillis" : 2,
+  "peakMemoryBytes" : 0
+   }
+}
+
+➜  ~ curl http://localhost:8081/v1/statement/20191113_033653_6_dg6hb/2 | 
json_pp
+{
+   "id" : "20191113_033653_6_dg6hb",
+   "data" : [
+  [
+ "pulsar"
+  ],
+  [
+ "system"
+  ]
+   ],
+   "infoUri" : 
"http://localhost:8081/ui/query.html?20191113_033653_6_dg6hb";,
+   "columns" : [
+  {
+ "typeSignature" : {
+"rawType" : "varchar",
+"arguments" : [
+   {
+  "kind" : "LONG_LITERAL",
+  "value" : 6
+   }
+],
+"literalArguments" : [],
+"typeArguments" : []
+ },
+ "name" : "Catalog",
+ "type" : "varchar(6)"
+  }
+   ],
+   "stats" : {
+  "wallTimeMillis" : 104,
+  "scheduled" : true,
+  "userTimeMillis" : 14,
+  "progressPercentage" : 100,
+  "totalSplits" : 19,
+  "nodes" : 1,
+  "cpuTimeMillis" : 16,
+  "queued" : false,
+  "queuedTimeMillis" : 1,
+  "state" : "FINISHED",
+  "peakMemoryBytes" : 0,
+  "elapsedTimeMillis" : 111,
+  "processedBytes" : 0,
+  "processedRows" : 0,
+  "queuedSplits" : 0,
+  "rootStage" : {
+ "cpuTimeMillis" : 1,
+ "runningSplits" : 0,
+ "state" : "FINISHED",
+ "completedSplits" : 1,
+ "subStages" : [
+{
+   "cpuTimeMillis" : 14,
+   "runningSplits" : 0,
+   "state" : "FINISHED",
+   "completedSplits" : 17,
+   "subStages" : [
+  {
+ "wallTimeMillis" : 7,
+ "subStages" : [],
+ "stageId" : "2",
+ "done" : true,
+ "nodes" : 1,
+ "totalSplits" : 1,
+ "processedBytes" : 22,
+ "processedRows" : 2,
+ "queuedSplits" : 0,
+ "userTimeMillis" : 1,
+ "c

[GitHub] [pulsar] sijie commented on a change in pull request #5376: [Issue 3009][docs] Add presto sql REST APIs doc

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5376: [Issue 3009][docs] Add 
presto sql REST APIs doc
URL: https://github.com/apache/pulsar/pull/5376#discussion_r348745055
 
 

 ##
 File path: site2/docs/sql-rest-api.md
 ##
 @@ -0,0 +1,196 @@
+---
+id: sql-rest-api
+title: Pulsar SQL REST APIs
+sidebar_label: REST APIs
+---
+
+## Overview
+
+This describes the resources that make up the Presto REST API v1. If you have 
any problems or request, please create a Github issue to contact us.
+
+## Current version
+
+All requests should use the v1 version of REST API to request the presto 
service. You need to use explicitly URL `http://presto.service:8081/v1` to 
request service.
+
+Also, the header `X-Presto-User` is required when you send a `POST` request.
+
+```properties
+X-Presto-User: username
+```
+
+For more information about headers, see the [presto/PrestoHeaders.java at 
master · prestodb/presto · 
GitHub](https://github.com/prestodb/presto/blob/master/presto-client/src/main/java/com/facebook/presto/client/PrestoHeaders.java)
+
+## Schema
+
+You can type statement in the HTTP body. And all data is received as JSON that 
might contain a `nextUri` link. If there is no `nextUri` link, then the query 
is finished (either successfully completed or failed). Otherwise., keep 
following the `nextUri` link.
 
 Review comment:
   ```suggestion
   You can type statement in the HTTP body. And all data is received as JSON 
that might contain a `nextUri` link. If there is no `nextUri` link, then the 
query is finished (either successfully completed or failed). Otherwise, keep 
following the `nextUri` link.
   ```


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5376: [Issue 3009][docs] Add presto sql REST APIs doc

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5376: [Issue 3009][docs] Add 
presto sql REST APIs doc
URL: https://github.com/apache/pulsar/pull/5376#discussion_r348745126
 
 

 ##
 File path: site2/docs/sql-rest-api.md
 ##
 @@ -0,0 +1,196 @@
+---
+id: sql-rest-api
+title: Pulsar SQL REST APIs
+sidebar_label: REST APIs
+---
+
+## Overview
+
+This describes the resources that make up the Presto REST API v1. If you have 
any problems or request, please create a Github issue to contact us.
+
+## Current version
+
+All requests should use the v1 version of REST API to request the presto 
service. You need to use explicitly URL `http://presto.service:8081/v1` to 
request service.
+
+Also, the header `X-Presto-User` is required when you send a `POST` request.
+
+```properties
+X-Presto-User: username
+```
+
+For more information about headers, see the [presto/PrestoHeaders.java at 
master · prestodb/presto · 
GitHub](https://github.com/prestodb/presto/blob/master/presto-client/src/main/java/com/facebook/presto/client/PrestoHeaders.java)
+
+## Schema
+
+You can type statement in the HTTP body. And all data is received as JSON that 
might contain a `nextUri` link. If there is no `nextUri` link, then the query 
is finished (either successfully completed or failed). Otherwise., keep 
following the `nextUri` link.
 
 Review comment:
   What does "keep following" mean 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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5376: [Issue 3009][docs] Add presto sql REST APIs doc

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5376: [Issue 3009][docs] Add 
presto sql REST APIs doc
URL: https://github.com/apache/pulsar/pull/5376#discussion_r348744312
 
 

 ##
 File path: site2/docs/sql-rest-api.md
 ##
 @@ -0,0 +1,196 @@
+---
+id: sql-rest-api
+title: Pulsar SQL REST APIs
+sidebar_label: REST APIs
+---
+
+## Overview
+
+This describes the resources that make up the Presto REST API v1. If you have 
any problems or request, please create a Github issue to contact us.
+
+## Current version
+
+All requests should use the v1 version of REST API to request the presto 
service. You need to use explicitly URL `http://presto.service:8081/v1` to 
request service.
+
+Also, the header `X-Presto-User` is required when you send a `POST` request.
 
 Review comment:
   what is the username? How does users figure out their username? 


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


With regards,
Apache Git Services


[GitHub] [pulsar] youurayy commented on issue #4941: Unable to delete topic when both consumer (subscription) and reader has been connected

2019-11-20 Thread GitBox
youurayy commented on issue #4941: Unable to delete topic when both consumer 
(subscription) and reader has been connected
URL: https://github.com/apache/pulsar/issues/4941#issuecomment-556385715
 
 
   @sijie - I think this is not a `component/client` issue (since the 
subscription cannot be deleted through the admin cli either)


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5680: [transaction-coordinator] Implementation of transaction coordinator client.

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5680: [transaction-coordinator] 
Implementation of transaction coordinator client.
URL: https://github.com/apache/pulsar/pull/5680#discussion_r348704078
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/TransactionMetadataStoreService.java
 ##
 @@ -50,29 +55,80 @@ public 
TransactionMetadataStoreService(TransactionMetadataStoreProvider transact
 this.transactionMetadataStoreProvider = 
transactionMetadataStoreProvider;
 }
 
+public void start() {
+
pulsarService.getNamespaceService().addNamespaceBundleOwnershipListener(new 
NamespaceBundleOwnershipListener() {
+@Override
+public void onLoad(NamespaceBundle bundle) {
+
pulsarService.getNamespaceService().getOwnedTopicListForNamespaceBundle(bundle)
+.whenComplete((topics, ex) -> {
+if (ex == null) {
+for (String topic : topics) {
+TopicName name = TopicName.get(topic);
+if 
(TopicName.TRANSACTION_COORDINATOR_ASSIGN.getLocalName()
+
.equals(TopicName.get(name.getPartitionedTopicName()).getLocalName())
+&& name.isPartitioned()) {
+
addTransactionMetadataStore(TransactionCoordinatorID.get(name.getPartitionIndex()));
+}
+}
+} else {
+LOG.error("Get owned topic list error when trigger 
bundle {} onload.", bundle, ex);
+}
+});
+}
+@Override
+public void unLoad(NamespaceBundle bundle) {
+
pulsarService.getNamespaceService().getOwnedTopicListForNamespaceBundle(bundle)
+.whenComplete((topics, ex) -> {
+if (ex == null) {
+for (String topic : topics) {
+TopicName name = TopicName.get(topic);
+if 
(TopicName.TRANSACTION_COORDINATOR_ASSIGN.getLocalName()
+
.equals(TopicName.get(name.getPartitionedTopicName()).getLocalName())
+&& name.isPartitioned()) {
+
removeTransactionMetadataStore(TransactionCoordinatorID.get(name.getPartitionIndex()));
+}
+}
+} else {
+LOG.error("Get owned topic list error when trigger 
bundle {} unLoad.", bundle, ex);
 
 Review comment:
   ```suggestion
   LOG.error("Failed to get owned topic list error 
when triggering un-loading bundle {}.", bundle, ex);
   ```


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5680: [transaction-coordinator] Implementation of transaction coordinator client.

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5680: [transaction-coordinator] 
Implementation of transaction coordinator client.
URL: https://github.com/apache/pulsar/pull/5680#discussion_r348705010
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
 ##
 @@ -1399,6 +1402,84 @@ protected void 
handleGetOrCreateSchema(CommandGetOrCreateSchema commandGetOrCrea
 });
 }
 
+@Override
+protected void handleNewTxn(CommandNewTxn command) {
+if (log.isDebugEnabled()) {
+log.debug("Receive new txn request {} to transaction meta store {} 
from {}.", command.getRequestId(), command.getTcId(), remoteAddress);
+}
+
service.pulsar().getTransactionMetadataStoreService().newTransaction(TransactionCoordinatorID.get(command.getTcId()))
+.whenComplete(((txnID, ex) -> {
+if (ex == null) {
+if (log.isDebugEnabled()) {
+log.debug("Send response {} for new txn request {}", 
command.getTcId(),  command.getRequestId());
+}
+
ctx.writeAndFlush(Commands.newTxnResponse(command.getRequestId(), 
txnID.getLeastSigBits(), txnID.getMostSigBits()));
+} else {
+if (log.isDebugEnabled()) {
+log.debug("Send response error for new txn request 
{}", command.getRequestId(), ex);
+}
+
ctx.writeAndFlush(Commands.newTxnResponse(command.getRequestId(), 
txnID.getMostSigBits(), BrokerServiceException.getClientErrorCode(ex), 
ex.getMessage()));
 
 Review comment:
   it seems that least-sig-bits is not sent back as part of the error response?


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5680: [transaction-coordinator] Implementation of transaction coordinator client.

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5680: [transaction-coordinator] 
Implementation of transaction coordinator client.
URL: https://github.com/apache/pulsar/pull/5680#discussion_r348705522
 
 

 ##
 File path: 
pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/coordinator/TransactionMetaStoreAssignTest.java
 ##
 @@ -0,0 +1,73 @@
+/**
+ * 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.
+ */
+package org.apache.pulsar.broker.transaction.coordinator;
+
+import org.apache.pulsar.broker.PulsarService;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+public class TransactionMetaStoreAssignTest extends 
TransactionMetaStoreTestBase {
 
 Review comment:
   ```suggestion
   public class TransactionMetaStoreAssignmentTest extends 
TransactionMetaStoreTestBase {
   ```


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on issue #5677: [Issue 5676][C++ client] Expose redelivery count

2019-11-20 Thread GitBox
sijie commented on issue #5677: [Issue 5676][C++ client] Expose redelivery count
URL: https://github.com/apache/pulsar/pull/5677#issuecomment-556297658
 
 
   run cpp tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5680: [transaction-coordinator] Implementation of transaction coordinator client.

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5680: [transaction-coordinator] 
Implementation of transaction coordinator client.
URL: https://github.com/apache/pulsar/pull/5680#discussion_r348703578
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/TransactionMetadataStoreService.java
 ##
 @@ -50,29 +55,80 @@ public 
TransactionMetadataStoreService(TransactionMetadataStoreProvider transact
 this.transactionMetadataStoreProvider = 
transactionMetadataStoreProvider;
 }
 
+public void start() {
+
pulsarService.getNamespaceService().addNamespaceBundleOwnershipListener(new 
NamespaceBundleOwnershipListener() {
+@Override
+public void onLoad(NamespaceBundle bundle) {
+
pulsarService.getNamespaceService().getOwnedTopicListForNamespaceBundle(bundle)
+.whenComplete((topics, ex) -> {
+if (ex == null) {
+for (String topic : topics) {
+TopicName name = TopicName.get(topic);
+if 
(TopicName.TRANSACTION_COORDINATOR_ASSIGN.getLocalName()
+
.equals(TopicName.get(name.getPartitionedTopicName()).getLocalName())
+&& name.isPartitioned()) {
+
addTransactionMetadataStore(TransactionCoordinatorID.get(name.getPartitionIndex()));
+}
+}
+} else {
+LOG.error("Get owned topic list error when trigger 
bundle {} onload.", bundle, ex);
 
 Review comment:
   ```suggestion
   LOG.error("Failed to get owned topic list when 
triggering on-loading bundle {}.", bundle, ex);
   ```


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on issue #5710: Add publish rate limit for each broker to avoid OOM

2019-11-20 Thread GitBox
sijie commented on issue #5710: Add publish rate limit for each broker to avoid 
OOM
URL: https://github.com/apache/pulsar/pull/5710#issuecomment-556267324
 
 
   @rdhabalia commented at #5513 with the instructions to reproduce. 


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on issue #5513: Publish rate limit on broker to avoid OOM

2019-11-20 Thread GitBox
sijie commented on issue #5513: Publish rate limit on broker to avoid OOM
URL: https://github.com/apache/pulsar/issues/5513#issuecomment-556266528
 
 
   @rdhabalia 
   
   We are able to reproduce OOM problem with master code-base (including your 
code change and doesn't enable publish-rate limiting). 
   
   The steps to reproduce:
   
   1) setup a bookkeeper cluster with 10 nodes. Each node has one SSD disk for 
both journal and ledger directory.
   2) setup a broker with 10 nodes.
   3) create a topic with 20 partitions.
   4) launch a flink job with a data-generator source (without throttling) and 
a flink pulsar sink (https://github.com/streamnative/pulsar-flink), with 
parallelism == 20. The producer setting in the pulsar sink is the default 
producer setting.
   5) run the flink job for a while. you can observe the OOM very quickly.
   
   The heapdump of broker shows a lot of pending entries because the flink job 
is producing more than the bookkeeper cluster can accept. so all the entries 
are accumulating at the broker and cause broker crash due to OOM.
   
   The expectation is broker should degrade when reaching its capacity 
limitation and give back pressure to the clients. Broker shouldn't crash due to 
OOM.
   
   If we don't provide the capability as Jia proposed in #5710, pulsar can't be 
used in high-volume ingestion workload.


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


With regards,
Apache Git Services


[GitHub] [pulsar] ypt edited a comment on issue #3906: Multi-Topic subscription across tenant and namespace in Java client

2019-11-20 Thread GitBox
ypt edited a comment on issue #3906: Multi-Topic subscription across tenant and 
namespace in Java client
URL: https://github.com/apache/pulsar/issues/3906#issuecomment-556229652
 
 
   +1. I also just ran into this. Reading the docs, I had assumed that I was 
able to create a consumer that could consume topics across different 
namespaces, but in trying to do so with the Java client, I'm seeing a 
`java.lang.IllegalArgumentException: Topics should have same namespace` 
exception.
   
   For what it's worth, my usage looks something like the following:
   
   ```kt
   client.newConsumer()
   .topics(listOf(
   "persistent://tenant/namespace-1/topic",
   "persistent://tenant/namespace-2/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


With regards,
Apache Git Services


[GitHub] [pulsar] ypt edited a comment on issue #3906: Multi-Topic subscription across tenant and namespace in Java client

2019-11-20 Thread GitBox
ypt edited a comment on issue #3906: Multi-Topic subscription across tenant and 
namespace in Java client
URL: https://github.com/apache/pulsar/issues/3906#issuecomment-556229652
 
 
   +1. I also just ran into this. Reading the docs, I had assumed that I was 
able to create a consumer that could consume topics across different 
namespaces, but in trying to do so with the Java client, I'm seeing an 
`java.lang.IllegalArgumentException: Topics should have same namespace` 
exception.
   
   For what it's worth, my usage looks something like the following:
   
   ```kt
   client.newConsumer()
   .topics(listOf(
   "persistent://tenant/namespace-1/topic",
   "persistent://tenant/namespace-2/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


With regards,
Apache Git Services


[GitHub] [pulsar] ypt commented on issue #3906: Multi-Topic subscription across tenant and namespace in Java client

2019-11-20 Thread GitBox
ypt commented on issue #3906: Multi-Topic subscription across tenant and 
namespace in Java client
URL: https://github.com/apache/pulsar/issues/3906#issuecomment-556229652
 
 
   +1. I also just ran into this. Reading the docs, I had assumed that I was 
able to create a consumer that could consume topics across different 
namespaces, but in trying to do so with the Java client, I'm seeing an 
`java.lang.IllegalArgumentException: Topics should have same namespace` 
exception.
   
   For what it's worth, my usage looks something like the following:
   
   ```kt
   client.client.newConsumer()
   .topics(listOf(
   "persistent://tenant/namespace-1/topic",
   "persistent://tenant/namespace-2/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


With regards,
Apache Git Services


[GitHub] [pulsar] rdhabalia commented on issue #5710: Add publish rate limit for each broker to avoid OOM

2019-11-20 Thread GitBox
rdhabalia commented on issue #5710: Add publish rate limit for each broker to 
avoid OOM
URL: https://github.com/apache/pulsar/pull/5710#issuecomment-55678
 
 
   I am not sure if we really have OOM issue. I think I left a comment on #5513 
and trying to understand how can we reproduce it.?


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


With regards,
Apache Git Services


[GitHub] [pulsar] jerrypeng commented on issue #5628: Fix: Netty threads may still linger after client close

2019-11-20 Thread GitBox
jerrypeng commented on issue #5628: Fix: Netty threads may still linger after 
client close
URL: https://github.com/apache/pulsar/pull/5628#issuecomment-556162771
 
 
   rerun integration tests
   rerun java8 tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] codelipenghui commented on issue #5702: [pulsar-sql]Expose configurations of managed ledger and bookkeeper client.

2019-11-20 Thread GitBox
codelipenghui commented on issue #5702: [pulsar-sql]Expose configurations of 
managed ledger and bookkeeper client.
URL: https://github.com/apache/pulsar/pull/5702#issuecomment-556110410
 
 
   run integration tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5572: Fix create consumer on partitioned topic while disable topic auto creation.

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5572: Fix create consumer on 
partitioned topic while disable topic auto creation.
URL: https://github.com/apache/pulsar/pull/5572#discussion_r348630391
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
 ##
 @@ -394,6 +394,7 @@ protected void internalCreatePartitionedTopic(int 
numPartitions) {
 String path = ZkAdminPaths.partitionedTopicPath(topicName);
 byte[] data = jsonMapper().writeValueAsBytes(new 
PartitionedTopicMetadata(numPartitions));
 zkCreateOptimistic(path, data);
+tryCreatePartitions(numPartitions);
 // we wait for the data to be synced in all quorums and the 
observers
 Thread.sleep(PARTITIONED_TOPIC_WAIT_SYNC_TIME_MS);
 
 Review comment:
   This is a really bad behavior. We can try to use zookeeper.sync to force the 
data to be synced to all quorums.


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5572: Fix create consumer on partitioned topic while disable topic auto creation.

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5572: Fix create consumer on 
partitioned topic while disable topic auto creation.
URL: https://github.com/apache/pulsar/pull/5572#discussion_r348632183
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java
 ##
 @@ -270,6 +270,30 @@ public void updatePartitionedTopic(
 internalUpdatePartitionedTopic(numPartitions, updateLocalTopicOnly);
 }
 
+
+@POST
+@Path("/{tenant}/{namespace}/{topic}/createMissedPartitions")
+@ApiOperation(value = "Create missed partitions of an existing partitioned 
topic.", notes = "It only try to create missed partitions of existing 
non-global partitioned-topic")
 
 Review comment:
   Also it might be worth pointing out that this call is a best-effort 
operation. If it fails to create a partition, it doesn't throw any exceptions.


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5572: Fix create consumer on partitioned topic while disable topic auto creation.

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5572: Fix create consumer on 
partitioned topic while disable topic auto creation.
URL: https://github.com/apache/pulsar/pull/5572#discussion_r348629570
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
 ##
 @@ -233,6 +233,23 @@ public void validatePoliciesReadOnlyAccess() {
 return namespaces;
 }
 
+protected void tryCreatePartitions(int numPartitions) {
+if (!topicName.isPersistent()) {
+return;
+}
+for (int i = 0; i < numPartitions; i++) {
+try {
+
zkCreateOptimistic(ZkAdminPaths.managedLedgerPath(topicName.getPartition(i)), 
new byte[0]);
+} catch (KeeperException.NodeExistsException e) {
+log.warn("[{}] Topic partition is already existing, doing 
nothing {}", clientAppId(), topicName.getPartition(i));
+} catch (KeeperException.BadVersionException e) {
+log.warn("[{}] Fail to create topic partition {}: concurrent 
modification", clientAppId(), topicName.getPartition(i));
 
 Review comment:
   do we need to handle bad version exception and retry the creation?


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5572: Fix create consumer on partitioned topic while disable topic auto creation.

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5572: Fix create consumer on 
partitioned topic while disable topic auto creation.
URL: https://github.com/apache/pulsar/pull/5572#discussion_r348629748
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
 ##
 @@ -233,6 +233,23 @@ public void validatePoliciesReadOnlyAccess() {
 return namespaces;
 }
 
+protected void tryCreatePartitions(int numPartitions) {
 
 Review comment:
   It would be great to write this function in async.


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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie commented on a change in pull request #5572: Fix create consumer on partitioned topic while disable topic auto creation.

2019-11-20 Thread GitBox
sijie commented on a change in pull request #5572: Fix create consumer on 
partitioned topic while disable topic auto creation.
URL: https://github.com/apache/pulsar/pull/5572#discussion_r348631828
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java
 ##
 @@ -270,6 +270,30 @@ public void updatePartitionedTopic(
 internalUpdatePartitionedTopic(numPartitions, updateLocalTopicOnly);
 }
 
+
+@POST
+@Path("/{tenant}/{namespace}/{topic}/createMissedPartitions")
+@ApiOperation(value = "Create missed partitions of an existing partitioned 
topic.", notes = "It only try to create missed partitions of existing 
non-global partitioned-topic")
 
 Review comment:
   ```suggestion
   @ApiOperation(value = "Create missed partitions of an existing 
partitioned topic.", notes = "It only tries to create missed partitions of 
existing non-global partitioned-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


With regards,
Apache Git Services


[GitHub] [pulsar] sijie merged pull request #5603: [Issue 5597][pulsar-client-java] retry when getPartitionedTopicMetadata failed

2019-11-20 Thread GitBox
sijie merged pull request #5603: [Issue 5597][pulsar-client-java] retry when 
getPartitionedTopicMetadata failed
URL: https://github.com/apache/pulsar/pull/5603
 
 
   


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


With regards,
Apache Git Services


[pulsar] branch branch-2.4 updated: [Issue 5597][pulsar-client-java] retry when getPartitionedTopicMetadata failed (#5603)

2019-11-20 Thread sijie
This is an automated email from the ASF dual-hosted git repository.

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


View the commit online:
https://github.com/apache/pulsar/commit/ee11e100d8a05296f1ddf0da6c4e52f63ca02294

The following commit(s) were added to refs/heads/branch-2.4 by this push:
 new ee11e10  [Issue 5597][pulsar-client-java] retry when 
getPartitionedTopicMetadata failed (#5603)
ee11e10 is described below

commit ee11e100d8a05296f1ddf0da6c4e52f63ca02294
Author: ltamber 
AuthorDate: Thu Nov 21 00:53:20 2019 +0800

[Issue 5597][pulsar-client-java] retry when getPartitionedTopicMetadata 
failed (#5603)

### Motivation

Fixes #5597

When using a multi-broker service url to create a producer, if the 
connection to the first broker failed, the creation will fail.

### Modification

Add backoff retries when getting partitioned metadata from brokers.
---
 .../stats/client/PulsarBrokerStatsClientTest.java  | 63 ++
 .../org/apache/pulsar/client/impl/HttpClient.java  |  6 ++-
 .../pulsar/client/impl/PulsarClientImpl.java   | 32 ++-
 3 files changed, 97 insertions(+), 4 deletions(-)

diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/stats/client/PulsarBrokerStatsClientTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/stats/client/PulsarBrokerStatsClientTest.java
index fca1485..00d95d1 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/stats/client/PulsarBrokerStatsClientTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/stats/client/PulsarBrokerStatsClientTest.java
@@ -31,6 +31,8 @@ import org.apache.pulsar.client.api.Consumer;
 import org.apache.pulsar.client.api.Message;
 import org.apache.pulsar.client.api.Producer;
 import org.apache.pulsar.client.api.ProducerConsumerBase;
+import org.apache.pulsar.client.api.PulsarClient;
+import org.apache.pulsar.client.api.PulsarClientException;
 import org.apache.pulsar.common.policies.data.PersistentTopicInternalStats;
 import 
org.apache.pulsar.common.policies.data.PersistentTopicInternalStats.CursorStats;
 import org.slf4j.Logger;
@@ -47,6 +49,7 @@ import java.util.concurrent.TimeUnit;
 import static org.mockito.Mockito.spy;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
 
 public class PulsarBrokerStatsClientTest extends ProducerConsumerBase {
 
@@ -132,5 +135,65 @@ public class PulsarBrokerStatsClientTest extends 
ProducerConsumerBase {
 log.info("-- Exiting {} test --", methodName);
 }
 
+@Test
+public void testGetPartitionedTopicMetaData() throws Exception {
+log.info("-- Starting {} test --", methodName);
+
+final String topicName = "persistent://my-property/my-ns/my-topic1";
+final String subscriptionName = "my-subscriber-name";
+
+
+
+try {
+String url = "http://localhost:51000,localhost:"; + 
BROKER_WEBSERVICE_PORT;
+if (isTcpLookup) {
+url = "pulsar://localhost:51000,localhost:" + BROKER_PORT;
+}
+PulsarClient client = newPulsarClient(url, 0);
+
+Consumer consumer = 
client.newConsumer().topic(topicName).subscriptionName(subscriptionName)
+.acknowledgmentGroupTime(0, TimeUnit.SECONDS).subscribe();
+Producer producer = 
client.newProducer().topic(topicName).create();
+
+consumer.close();
+producer.close();
+client.close();
+} catch (PulsarClientException pce) {
+log.error("create producer or consumer error: ", pce);
+fail();
+}
+
+log.info("-- Exiting {} test --", methodName);
+}
+
+@Test (timeOut = 4000)
+public void testGetPartitionedTopicDataTimeout() {
+log.info("-- Starting {} test --", methodName);
+
+final String topicName = "persistent://my-property/my-ns/my-topic1";
+
+String url = "http://localhost:51000,localhost:51001";;
+if (isTcpLookup) {
+url = "pulsar://localhost:51000,localhost:51001";
+}
+
+PulsarClient client;
+try {
+client = PulsarClient.builder()
+.serviceUrl(url)
+.statsInterval(0, TimeUnit.SECONDS)
+.operationTimeout(3, TimeUnit.SECONDS)
+.build();
+
+Producer producer = 
client.newProducer().topic(topicName).create();
+
+fail();
+} catch (PulsarClientException pce) {
+log.error("create producer error: ", pce);
+}
+
+log.info("-- Exiting {} test --", methodName);
+}
+
 private static final Logger log = 
LoggerFactory.getLogger(PulsarBrokerStatsClientTest.class);
 }
diff --git 
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/HttpClient.java 
b/pulsar-client/src/main/java/org/apache/

[GitHub] [pulsar] sijie merged pull request #5674: Parametrize grpc and metrics ports so that they can be configured

2019-11-20 Thread GitBox
sijie merged pull request #5674: Parametrize grpc and metrics ports so that 
they can be configured
URL: https://github.com/apache/pulsar/pull/5674
 
 
   


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


With regards,
Apache Git Services


[pulsar] branch master updated (22a70c2 -> c368c33)

2019-11-20 Thread sijie
This is an automated email from the ASF dual-hosted git repository.

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


from 22a70c2  [pulsar-io] improve hbase sink performance (#5705)
 add c368c33  Parametrize grpc and metrics ports so that they can be 
configured (#5674)

No new revisions were added by this update.

Summary of changes:
 .../runtime/kubernetes/KubernetesRuntime.java  | 25 +-
 .../kubernetes/KubernetesRuntimeFactory.java   |  7 ++
 .../kubernetes/KubernetesRuntimeFactoryConfig.java |  9 
 .../kubernetes/KubernetesRuntimeFactoryTest.java   |  2 ++
 .../runtime/kubernetes/KubernetesRuntimeTest.java  |  2 ++
 5 files changed, 35 insertions(+), 10 deletions(-)



[GitHub] [pulsar] sijie merged pull request #5671: [Doc] Add HBase sink connector guide

2019-11-20 Thread GitBox
sijie merged pull request #5671: [Doc] Add HBase sink connector guide
URL: https://github.com/apache/pulsar/pull/5671
 
 
   


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


With regards,
Apache Git Services


[pulsar] branch master updated (c368c33 -> 2de6a0f)

2019-11-20 Thread sijie
This is an automated email from the ASF dual-hosted git repository.

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


from c368c33  Parametrize grpc and metrics ports so that they can be 
configured (#5674)
 add 2de6a0f  [Doc] Add HBase sink connector guide (#5671)

No new revisions were added by this update.

Summary of changes:
 site2/docs/io-hbase-sink.md | 63 +
 1 file changed, 63 insertions(+)
 create mode 100644 site2/docs/io-hbase-sink.md



[GitHub] [pulsar] jiazhai opened a new pull request #5710: Add publish rate limit for each broker to avoid OOM

2019-11-20 Thread GitBox
jiazhai opened a new pull request #5710: Add publish rate limit for each broker 
to avoid OOM
URL: https://github.com/apache/pulsar/pull/5710
 
 
   
   Fixes #5513 
   
   ### Motivation
   
   Through #3985, user could set the publish rate for each topic, but the topic 
number for each broker is not limited, so there is case that a lot of topics 
served in same broker, and if each topic send too many message, it will cause 
the messages not able to send to BookKeeper in time,  and messages be hold in 
the direct memory of broker.  And cause Broker out of direct memory.
   
   ### Modifications
   
   - add broker publish rate limit base on #3985,
   - add unit test.
   
   ### Verifying this change
   unit test passed.


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


With regards,
Apache Git Services


[GitHub] [pulsar] tuteng opened a new issue #5709: Support multiple topic subscriptions across multiple namespace

2019-11-20 Thread GitBox
tuteng opened a new issue #5709: Support multiple topic subscriptions across 
multiple namespace
URL: https://github.com/apache/pulsar/issues/5709
 
 
   Currently, multiple topic subscriptions are supported in the same namespace. 
Some users want to support multi-topic subscriptions across multiple 
namespaces. The main consideration is authentication and authorization under 
multiple namespaces and multiple topics.


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


With regards,
Apache Git Services


[pulsar] annotated tag v2.4.2-candidate-1 updated (59cf167 -> 0d9b690)

2019-11-20 Thread rxl
This is an automated email from the ASF dual-hosted git repository.

rxl pushed a change to annotated tag v2.4.2-candidate-1
in repository https://gitbox.apache.org/repos/asf/pulsar.git.


*** WARNING: tag v2.4.2-candidate-1 was modified! ***

from 59cf167  (commit)
  to 0d9b690  (tag)
 tagging 59cf16773fad0c17a9784afc6c3df9b1f699a176 (commit)
 replaces v2.4.1
  by xiaolong.ran
  on Wed Nov 20 20:42:45 2019 +0800

- Log -
Release v2.4.2-candidate-1
-BEGIN PGP SIGNATURE-

iQJDBAABCAAtFiEEHqpd6S06DEdJ6YRttJ34KK/JpEIFAl3VNMUPHHJ4bEBhcGFj
aGUub3JnAAoJELSd+CivyaRCemcQAIDecqSRzL7oSIDusE1DWyD4A/Zxw2HkAfP0
zePKXAGHytrLE4YQSsaAKk2P4vsvLjL54JEfoKcxhKUrnVWPj3cyAVeH1oeix1B5
uRy0RWNWzQSJhaxo2i7TDpkl0Zo1IArIITJ9udURHKz2ssxeABn7czPW5u067yJZ
HNRLdqKPdrf2Sd0aY3CmUimEVYxMWIVmxg7h6NEHEiRoBRycfprkqEJHJNJFbBv3
wsYLD1JJoJDYFEilpelzz9IObLVR76bp6BjE1fE2SAF+0Z8gMovcJDeXY8PzUrsB
4d0XHmGK5kfIftsg/aEJVZ31uAwe4Nei3x/d0dAn292DCR+QsCkzCuxxWnxVmQqC
UUR+jOEkGqbJZ3YjhD4x7ab9+Y+Fz5EH3m/rjXCxdLbdc+mlo+LET00ZutX7jhk1
1cHpmYPBtWwD/jlOHQXA/SaA0YD0Yd9kkyr16tOTA3kzmfmYSXDE7r/NXt870u3v
+SkZmjtOnokt4IXfTqcLh5E8TPVEPIJ47B0vOB8Ty12etNUf9YYXEOxN+i03udQz
VCWHGeqpcBUJpL569FbSi/i9fsVTe/5oI9QZMX1JStZoHVwGwTnjR3XSNkE0T5Fz
1o/lJjDSOo1c9EiSVcMFmTiLbjtXNGxSN7D1e6dnfbsHDI1sTuCZW27kVedpDZd0
K+NlLLQM
=8IDo
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:



[pulsar] branch branch-2.4 updated (cc74632 -> 59cf167)

2019-11-20 Thread rxl
This is an automated email from the ASF dual-hosted git repository.

rxl pushed a change to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/pulsar.git.


from cc74632  Fix:PulsarKafkaProducer is not thread safe (#4745)
 new 1a427f2  ### Motivation (#4999)
 new 1b31ace  add different cache flags for size() and toString() (#5040)
 new c0054f2  Reload zk cache asynchronously (#5049)
 new 30bf216  [bookkeeper] Don't return DEFAULT_RACK if 
ZkBookieRackAffinityMapping can't resolve network location (#5067)
 new 43bfae3  modify BatcherBuilder interface and it's subs to implement 
java.io.Serializable (#5068)
 new e05c095  Use "info" as the default root logger level (#5079)
 new 6a59450  Add the schema admin api (#4800)
 new 4c98dba  Add checkstyle validation and fix style violations in the 
common module (#4989)
 new 2992ca7  [admin] DeleteBookieRack should remove the rack info from 
zookeeper (#5084)
 new 88ab1e2  [bookkeeper] allow configuring region aware placement related 
settings (#5100)
 new cbcd298  Remove failed stale producer from the connection (#4741)
 new f17ada4  Test cleanup and simplification (#4799)
 new 3e8b33c  Fix storage size always 0 without subscription. (#5108)
 new f777fd1  Fix: windowed functions were broken when we changed java 
function instance to use classloaders (#5117)
 new dc61cdf  Throw an error if the key was not specified for querying 
state (#5145)
 new f0571b1  Broker fails to start with function worker enabled and broker 
client using TLS (#5151)
 new cb6fcbd  Fixed spark receiver to account for all the consumer config 
options (#5152)
 new b1651a9  [pulsar-broker] Close RateLimiter instance (#5155)
 new f19d2f5  Fix exception type check order bug (#5174)
 new 10bc14f  [pulsar-broker] Fix bug that message delivery stops after 
resetting cursor for failover subscription (#5185)
 new 1775513  Get schema info with topic partition (#4751)
 new 45eb10a  Add schema admin api  get schema info with schema version 
(#4877)
 new 85a5b18  Modify rest api post schema compatibility strategy (#4950)
 new 97627f2  Process requests asynchronously on some REST APIs (1) (#4765)
 new f24c1b0  Process requests asynchronously on some REST APIs (2) (#4778)
 new e52b15b  [Issue #4756][broker] Process requests asynchronously on some 
REST APIs (3) (#4795)
 new 0481904  Add more config for auto-topic-creation (#4963)
 new d546f67  Ensure getting list of topics for namespace is handled 
asynchronously (#5188)
 new 850b123  Fix bug that fails to search namespace bundle due to NPE 
(#5191)
 new 90ec8e1  Make some member variables of Dispatcher volatile (#5193)
 new 73abddf  Added missing enum value KeyShared on python wrapper (#5196)
 new e9c0195  Ensure consumer background tasks are cancelled after 
subscribe failures (#5204)
 new 1168709  Upgrade dependencies for security fixes (#5232)
 new 0150b1f  Bug in Message Deduplication that may cause incorrect 
client/broker interaction (#5243)
 new 34c645c  [Issue #5234][pulsar-client-cpp] Fix memory leak caused by 
deadline_timer holding object reference (#5246)
 new aec7cc0  Fix client backoff (#5261)
 new a4a742d  Fix Cmake to build _pulsar for osx (#5263)
 new f6d78b3  Improve error handling logic for effectively once (#5271)
 new e70924e  fix behavior when getting a key from functions state that 
doesn't exist (#5272)
 new e12ac7f  Fixed race condition while triggering message redelivery 
after an ack-timeout event (#5276)
 new b0c6a5f  [Java-Client] Fix producer blocked after send an over size 
message while batch enabled #5282
 new 8b33ff2  Fix memory leak caused by not being executed ClientConnection 
destructor (#5286)
 new 63b09e7  [pulsar-broker] Close previous dispatcher when subscription 
type changes (#5288)
 new 85af2f0  Don't attempt to append on read-only cursor ledger (#5297)
 new 8ca502c  [pulsar-broker] Fix: invalidate cache on zk-cache timeout 
(#5298)
 new 2c32db6  [doc] Add a documentation page for metrics reference (#4910)
 new 6e02e9c  Doc release 2.4.0 (#4666)
 new 37d7de0  update website for 2.4.1 release (#5080)
 new 5c614d8  fix typo in metrics (#5299)
 new 4f55878  [pulsar-proxy] add debug log + fix thread-factory name (#5302)
 new dcc7a93  Fix bad_weak_ptr error when closing producer (#5315)
 new ce8fc4f  Merge Request for #4809: provide a convenient method for C++ 
client producer batch container (#4885)
 new f08c936  [Issue: 3161][Go client] Return Message ID for send (#4811)
 new 37c093e  [Cpp] Fixed negative ack tracker constructor sequence (#5453)
 new c89fb48  Allow to specify delivery delay in C++ client (#5317)
 new a358009  [pulsar-broker] Disable stickyRead by default (#5321)
 new a4a8eeb  Fix bk write failure part 2 (#5322)
 new edbb353  Fix instability in Pulsar 

[GitHub] [pulsar] codelipenghui commented on issue #5680: [transaction-coordinator] Implementation of transaction coordinator client.

2019-11-20 Thread GitBox
codelipenghui commented on issue #5680: [transaction-coordinator] 
Implementation of transaction coordinator client.
URL: https://github.com/apache/pulsar/pull/5680#issuecomment-555966675
 
 
   run cpp tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] codelipenghui commented on issue #4955: [PIP-39] Introduce system topic and topic policies service

2019-11-20 Thread GitBox
codelipenghui commented on issue #4955: [PIP-39] Introduce system topic and 
topic policies service
URL: https://github.com/apache/pulsar/pull/4955#issuecomment-555966346
 
 
   run java8 tests
   run integration tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] codelipenghui commented on a change in pull request #5570: Transaction log implemention

2019-11-20 Thread GitBox
codelipenghui commented on a change in pull request #5570: Transaction log 
implemention
URL: https://github.com/apache/pulsar/pull/5570#discussion_r348377382
 
 

 ##
 File path: 
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/TransactionMetadataStore.java
 ##
 @@ -58,43 +69,56 @@
  * it returns {@link TxnID} as the identifier for identifying the
  * transaction.
  */
-CompletableFuture newTransaction();
+CompletableFuture newTransactionAsync();
 
 /**
- * Add the produced partitions to transaction identified by txnid.
+ * Create a new transaction in the transaction metadata store.
  *
- * @param txnid transaction id
+ * @param timeOut the timeout time
 
 Review comment:
   ```suggestion
* @param timeOut the timeout duration of the transaction in mills
   ```


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


With regards,
Apache Git Services


[GitHub] [pulsar] codelipenghui commented on a change in pull request #5570: Transaction log implemention

2019-11-20 Thread GitBox
codelipenghui commented on a change in pull request #5570: Transaction log 
implemention
URL: https://github.com/apache/pulsar/pull/5570#discussion_r348391180
 
 

 ##
 File path: 
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/exceptions/TxnStoreStateUpdateException.java
 ##
 @@ -0,0 +1,42 @@
+/**
+ * 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.
+ */
+package org.apache.pulsar.transaction.coordinator.exceptions;
+
+import org.apache.pulsar.transaction.coordinator.TransactionMetadataStore;
+
+/**
+ * Exception is thrown when update the state incorrect in transaction store.
+ */
+public class TxnStoreStateUpdateException extends CoordinatorException {
 
 Review comment:
   Do we need this exception? i think the meta store should handle the state 
change internal


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


With regards,
Apache Git Services


[GitHub] [pulsar] codelipenghui commented on a change in pull request #5570: Transaction log implemention

2019-11-20 Thread GitBox
codelipenghui commented on a change in pull request #5570: Transaction log 
implemention
URL: https://github.com/apache/pulsar/pull/5570#discussion_r348376518
 
 

 ##
 File path: 
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/TransactionMetadataStore.java
 ##
 @@ -32,24 +33,34 @@
 public interface TransactionMetadataStore {
 
 /**
- * Query the {@link TxnStatus} of a given transaction txnid.
+ * The state of the transactionMetadataStore {@link 
TransactionMetadataStore}.
+ */
+enum State {
+NONE,
+INITIALIZING,
+READY,
+CLOSE
+}
+
+/**
+ * Query the {@link TxnStatus} of a given transaction txnId.
  *
- * @param txnid transaction id
+ * @param txnID {@link TxnID} for get transaction status
  * @return a future represents the result of this operation.
  * it returns {@link TxnStatus} of the given transaction.
  */
-default CompletableFuture getTxnStatus(TxnID txnid) {
-return getTxnMeta(txnid).thenApply(txnMeta -> txnMeta.status());
+default CompletableFuture getTxnStatus(TxnID txnID) {
+return getTxnMetaAsync(txnID).thenApply(TxnMeta::status);
 }
 
 Review comment:
   It's better to rename to `getTxnStatusAsync` since all async method end with 
Async


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


With regards,
Apache Git Services


[GitHub] [pulsar] codelipenghui commented on issue #4955: [PIP-39] Introduce system topic and topic policies service

2019-11-20 Thread GitBox
codelipenghui commented on issue #4955: [PIP-39] Introduce system topic and 
topic policies service
URL: https://github.com/apache/pulsar/pull/4955#issuecomment-555949238
 
 
   run java8 tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] codelipenghui commented on issue #5680: [transaction-coordinator] Implementation of transaction coordinator client.

2019-11-20 Thread GitBox
codelipenghui commented on issue #5680: [transaction-coordinator] 
Implementation of transaction coordinator client.
URL: https://github.com/apache/pulsar/pull/5680#issuecomment-555948267
 
 
   run cpp tests
   run java8 tests


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


With regards,
Apache Git Services


[GitHub] [pulsar] codelipenghui commented on issue #5702: [pulsar-sql]Expose configurations of managed ledger and bookkeeper client.

2019-11-20 Thread GitBox
codelipenghui commented on issue #5702: [pulsar-sql]Expose configurations of 
managed ledger and bookkeeper client.
URL: https://github.com/apache/pulsar/pull/5702#issuecomment-555947748
 
 
   run cpp tests
   run integration tests


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


With regards,
Apache Git Services


  1   2   >