[GitHub] rdhabalia removed a comment on issue #2591: Fix: Compaction with last deleted keys not completing compaction

2018-09-17 Thread GitBox
rdhabalia removed a comment on issue #2591: Fix: Compaction with last deleted 
keys not completing compaction
URL: https://github.com/apache/incubator-pulsar/pull/2591#issuecomment-422259139
 
 
   rerun java8 tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] rdhabalia commented on issue #2591: Fix: Compaction with last deleted keys not completing compaction

2018-09-17 Thread GitBox
rdhabalia commented on issue #2591: Fix: Compaction with last deleted keys not 
completing compaction
URL: https://github.com/apache/incubator-pulsar/pull/2591#issuecomment-422259139
 
 
   rerun java8 tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] merlimat commented on issue #2580: [Python] Consolidated duplicated subscribe_*() methods into a single one

2018-09-17 Thread GitBox
merlimat commented on issue #2580: [Python] Consolidated duplicated 
subscribe_*() methods into a single one
URL: https://github.com/apache/incubator-pulsar/pull/2580#issuecomment-422238929
 
 
   run java8 tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie commented on issue #2589: Fail to deploy on Kubernetes cluster

2018-09-17 Thread GitBox
sijie commented on issue #2589: Fail to deploy on Kubernetes cluster
URL: 
https://github.com/apache/incubator-pulsar/issues/2589#issuecomment-422231515
 
 
   @realwanpengli 
   
   I see. so it is referencing the config map `broker-config`: 
https://github.com/apache/incubator-pulsar/blob/v2.0.1-incubating/deployment/kubernetes/generic/broker.yaml#L105
   
   and in the env is defined in the broker-config: 
https://github.com/apache/incubator-pulsar/blob/v2.0.1-incubating/deployment/kubernetes/generic/broker.yaml#L28
   
   so in that case, a quick workaround, try to remove the line from 
`broker.yaml` or define a new config map, don't uses the broker-config map


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] realwanpengli commented on issue #2589: Fail to deploy on Kubernetes cluster

2018-09-17 Thread GitBox
realwanpengli commented on issue #2589: Fail to deploy on Kubernetes cluster
URL: 
https://github.com/apache/incubator-pulsar/issues/2589#issuecomment-422230991
 
 
   @sijie But in v2.0.1, the line you mentioned is not existed in pulsar-admin 
pod.
   
   
https://github.com/apache/incubator-pulsar/blob/v2.0.1-incubating/deployment/kubernetes/generic/broker.yaml#L105


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] rdhabalia commented on issue #2591: Fix: Compaction with last deleted keys not completing compaction

2018-09-17 Thread GitBox
rdhabalia commented on issue #2591: Fix: Compaction with last deleted keys not 
completing compaction
URL: https://github.com/apache/incubator-pulsar/pull/2591#issuecomment-45857
 
 
   Have added test where all the records are deleted in the ledger.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] rdhabalia commented on issue #2503: add auto ack and timeout configurable

2018-09-17 Thread GitBox
rdhabalia commented on issue #2503: add auto ack and timeout configurable
URL: https://github.com/apache/incubator-pulsar/pull/2503#issuecomment-45549
 
 
   rerun java8 tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] srkukarni commented on issue #2600: [tests] make PersistentQueueE2ETest tolerant failures during deleting topic at cleanup

2018-09-17 Thread GitBox
srkukarni commented on issue #2600: [tests] make PersistentQueueE2ETest 
tolerant failures during deleting topic at cleanup
URL: https://github.com/apache/incubator-pulsar/pull/2600#issuecomment-422217016
 
 
   run cpp tests
   run integration tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] merlimat commented on issue #2597: [build] Fix docker organization parameter

2018-09-17 Thread GitBox
merlimat commented on issue #2597: [build] Fix docker organization parameter
URL: https://github.com/apache/incubator-pulsar/pull/2597#issuecomment-422210763
 
 
   run cpp tests
   run java8 tests
   run integration tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] merlimat removed a comment on issue #2597: [build] Fix docker organization parameter

2018-09-17 Thread GitBox
merlimat removed a comment on issue #2597: [build] Fix docker organization 
parameter
URL: https://github.com/apache/incubator-pulsar/pull/2597#issuecomment-422210655
 
 
   rerun tests please


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] merlimat commented on issue #2597: [build] Fix docker organization parameter

2018-09-17 Thread GitBox
merlimat commented on issue #2597: [build] Fix docker organization parameter
URL: https://github.com/apache/incubator-pulsar/pull/2597#issuecomment-422210655
 
 
   rerun tests please


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] merlimat commented on issue #2601: docs for 2.1.1-incubating release

2018-09-17 Thread GitBox
merlimat commented on issue #2601: docs for 2.1.1-incubating release
URL: https://github.com/apache/incubator-pulsar/pull/2601#issuecomment-422210162
 
 
   run java8 tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] merlimat opened a new pull request #2603: Share EventLoopGroup between Broker and BK client

2018-09-17 Thread GitBox
merlimat opened a new pull request #2603: Share EventLoopGroup between Broker 
and BK client
URL: https://github.com/apache/incubator-pulsar/pull/2603
 
 
   ### Motivation
   
   Share the Netty `EventLoopGroup` thread pool between Pulsar broker and 
BookKeeper client. 
   
   Since broker and bk client are running in same process, we can reduce the 
number of needed threads by having them sharing the same IO thread pool.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] merlimat opened a new pull request #2602: ManagedLedger should share BK worker pool threads

2018-09-17 Thread GitBox
merlimat opened a new pull request #2602: ManagedLedger should share BK worker 
pool threads
URL: https://github.com/apache/incubator-pulsar/pull/2602
 
 
   ### Motivation
   
   Currently, both BookKeeper client and ManagedLedger have their own worker 
thread pools. 
   There is no advantage in that and it just lead to having many "critical" 
threads and more context switches.
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


[incubator-pulsar.wiki] branch master updated: Updated Release process (markdown)

2018-09-17 Thread jerrypeng
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new faa092f  Updated Release process (markdown)
faa092f is described below

commit faa092f765b91901991e9c08073d4e6910bd0024
Author: Boyang Jerry Peng 
AuthorDate: Mon Sep 17 15:35:37 2018 -0700

Updated Release process (markdown)
---
 Release-process.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Release-process.md b/Release-process.md
index 3f1d1dd..0bf3005 100644
--- a/Release-process.md
+++ b/Release-process.md
@@ -327,6 +327,7 @@ $ twine upload pulsar_client-*.whl
 > - [VirtualBox](https://www.virtualbox.org/)
 > - [VirtualBox Extension Pack]
 > - [Vagrant](https://www.vagrantup.com/)
+> - [Vagrant-scp](https://github.com/invernizzi/vagrant-scp)
 >
 > And make sure your laptop have enough disk spaces (> 30GB) since the build 
 > scripts
 > will download MacOS images, launch them in VirtualBox and build the python



[GitHub] sijie commented on issue #2597: [build] Fix docker organization parameter

2018-09-17 Thread GitBox
sijie commented on issue #2597: [build] Fix docker organization parameter
URL: https://github.com/apache/incubator-pulsar/pull/2597#issuecomment-422188503
 
 
   run java8 tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] jerrypeng opened a new pull request #2601: docs for 2.1.1-incubating release

2018-09-17 Thread GitBox
jerrypeng opened a new pull request #2601: docs for 2.1.1-incubating release
URL: https://github.com/apache/incubator-pulsar/pull/2601
 
 
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie opened a new pull request #2600: [tests] make PersistentQueueE2ETest tolerant failures during deleting topic at cleanup

2018-09-17 Thread GitBox
sijie opened a new pull request #2600: [tests] make PersistentQueueE2ETest 
tolerant failures during deleting topic at cleanup
URL: https://github.com/apache/incubator-pulsar/pull/2600
 
 
   
   *Motivation*
   
   "Topic has active producers/subscriptions" can be thrown during deleting 
topic at cleanup.
   This kind of error can be ignored during cleaning up to make the tests more 
robust.
   
   *Changes*
   
   Make PersistentQueueE2ETest toelrant failures during cleaning up topics.
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie opened a new pull request #2599: [java-client] Issue #2384: ConnectionHandler: Log stack trace instead of printing

2018-09-17 Thread GitBox
sijie opened a new pull request #2599: [java-client] Issue #2384: 
ConnectionHandler: Log stack trace instead of printing
URL: https://github.com/apache/incubator-pulsar/pull/2599
 
 
   
   *Motivation*
   
   Fixes #2384.
   
   The pulsar java client is currently very noisy in case of connection loss 
and it cannot be muted, as the stack trace is printed with .printStackTrace(). 
Moving this to the logging system will allow developers to configure this 
behavior.
   
   *Changes*
   
   Remove `printStackTrace`.
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: r29454 - /release/incubator/pulsar/pulsar-2.1.1-incubating/

2018-09-17 Thread jerrypeng
Author: jerrypeng
Date: Mon Sep 17 20:45:49 2018
New Revision: 29454

Log:
Delete old release

Removed:
release/incubator/pulsar/pulsar-2.1.1-incubating/



svn commit: r29453 - /dev/incubator/pulsar/pulsar-2.1.1-incubating-candidate-1/ /release/incubator/pulsar/pulsar-2.1.1-incubating/

2018-09-17 Thread jerrypeng
Author: jerrypeng
Date: Mon Sep 17 20:44:42 2018
New Revision: 29453

Log:
Release v2.1.1-incubating

Added:
release/incubator/pulsar/pulsar-2.1.1-incubating/
  - copied from r29452, 
dev/incubator/pulsar/pulsar-2.1.1-incubating-candidate-1/
Removed:
dev/incubator/pulsar/pulsar-2.1.1-incubating-candidate-1/



[GitHub] sijie commented on issue #2568: MacOS: Could not find a version that satisfies the requirement pulsar-client==2.1.0

2018-09-17 Thread GitBox
sijie commented on issue #2568: MacOS: Could not find a version that satisfies 
the requirement pulsar-client==2.1.0
URL: 
https://github.com/apache/incubator-pulsar/issues/2568#issuecomment-422163989
 
 
   Closed this issue as question answered.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie closed issue #2568: MacOS: Could not find a version that satisfies the requirement pulsar-client==2.1.0

2018-09-17 Thread GitBox
sijie closed issue #2568: MacOS: Could not find a version that satisfies the 
requirement pulsar-client==2.1.0
URL: https://github.com/apache/incubator-pulsar/issues/2568
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


[incubator-pulsar] annotated tag v2.1.1-incubating updated (68faf85 -> e4883fb)

2018-09-17 Thread jerrypeng
This is an automated email from the ASF dual-hosted git repository.

jerrypeng pushed a change to annotated tag v2.1.1-incubating
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git.


*** WARNING: tag v2.1.1-incubating was modified! ***

from 68faf85  (commit)
  to e4883fb  (tag)
 tagging 68faf85083025b29bb6ab39028a1d467bd3d5217 (commit)
 replaces v2.1.0-incubating
  by Jerry Peng
  on Mon Sep 17 13:40:40 2018 -0700

- Log -
Release v2.1.1-incubating
-BEGIN PGP SIGNATURE-

iQJJBAABCAAzFiEEL9thAO9GOfHBOnjWxpUX5WIdf18FAlugEUgVHGplcnJ5cGVu
Z0BhcGFjaGUub3JnAAoJEMaVF+ViHX9fRnoP/RnsgnxUvlwnWXwFG5iDHfwVDGtX
t1RIe3N8aLgyDM1SmJtCjWkaLXscX54YgVKtpFnk7fpN/zbp/4jbqJDQ7appALMj
UauO8yaSP0LFWeHLDiU+WD1ZoE7N640Uqsw1ze7t3si61l8YWPprWMfkZesBqCv8
BPo4wpdjJAIXpIf5LHRHi7lGE7XHp8YwthUuDTtMcyxSaMQJBsLL4Y7EbOedj5ev
K0xE6R2lkTHngNcqNryY/AlCsKu0tthmjdJeWh9eAG/Ul5b+MLzajqBSCIjCgXpy
4tHojhJat9uyJGzVpNfbGDIM/nPS32lSzHunCv828tpeQDzKl2Ou/rzk20RUKTS4
9P3AP25F+3F3JxoHJjP2Mjra+QHjHDCzU2Pceh6sG/hY3yzKw4VYY9nNC3zrWYLr
31wx/RQga7FsqWni2hjDgCugIjqibuXYHWnvaxJMPGTZuNFUImBh7rfjGkZWTJUj
H2JCORHIfR8hDtdqQDIOzSCHBnqxWKRJj4d9X5SI+OsUqOqvRSf4XGESHNKl366d
KmIRB0WFwjjhYoWi9W4Q6TmjxO0EHHXgF4hZRxZe2NqhHY1QHy2l08/1JX1BVgua
C+xPdMoPwsocrTi0Fk/VpqFQUAKwQ5H/GEjH5MRBxG/kIC56q2voJUrmXeDXP68i
FPNvRXEuWPa084eC
=wGOA
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:



[GitHub] sijie commented on a change in pull request #2585: [tests] Make BrokerClientIntegrationTest testing behavior deterministic

2018-09-17 Thread GitBox
sijie commented on a change in pull request #2585: [tests] Make 
BrokerClientIntegrationTest testing behavior deterministic
URL: https://github.com/apache/incubator-pulsar/pull/2585#discussion_r218218701
 
 

 ##
 File path: 
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java
 ##
 @@ -333,12 +336,13 @@ public void 
testUnsupportedBatchMessageConsumer(SubscriptionType subType) throws
 // verification
 consumer1.setClientCnx(null);
 // (2) send batch-message which should not be able to consume: as 
broker will disconnect the consumer
-for (int i = 0; i < 10; i++) {
+CompletableFuture lastSendFuture = null;
+for (int i = 0; i < numMessagesPerBatch; i++) {
 String message = "my-message-" + i;
-batchProducer.sendAsync(message.getBytes());
+lastSendFuture = batchProducer.sendAsync(message.getBytes());
 }
 
 Review comment:
   changed to use producer.flush


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


[incubator-pulsar] branch master updated: [tests] Fix the synchronization problem at BrokerClientIntegrationTest.testMaxConcurrentTopicLoading (#2595)

2018-09-17 Thread mmerli
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 259275b  [tests] Fix the synchronization problem at 
BrokerClientIntegrationTest.testMaxConcurrentTopicLoading (#2595)
259275b is described below

commit 259275ba8df5750e64fa15781dc2a968959ce71f
Author: Sijie Guo 
AuthorDate: Mon Sep 17 13:36:50 2018 -0700

[tests] Fix the synchronization problem at 
BrokerClientIntegrationTest.testMaxConcurrentTopicLoading (#2595)

*Motivation*

Following exception is observed in one of the CI jobs.

```
java.lang.NullPointerException
at 
org.apache.pulsar.common.util.FutureUtil.waitForAll(FutureUtil.java:44)
at 
org.apache.pulsar.client.impl.BrokerClientIntegrationTest.testMaxConcurrentTopicLoading(BrokerClientIntegrationTest.java:601)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
at 
org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:54)
at 
org.testng.internal.InvokeMethodRunnable.run(InvokeMethodRunnable.java:44)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
```

The problem seems to be coming from improper synchronization in the tests.

*Changes*

Fix the synchronization problem in 
BrokerClientIntegrationTest.testMaxConcurrentTopicLoading
---
 .../pulsar/client/impl/BrokerClientIntegrationTest.java  | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java
index bf65fdd..0e47dfe 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java
@@ -583,7 +583,7 @@ public class BrokerClientIntegrationTest extends 
ProducerConsumerBase {
 ClientCnx cnx = producer.cnx();
 assertTrue(cnx.channel().isActive());
 ExecutorService executor = 
Executors.newFixedThreadPool(concurrentLookupRequests);
-List>> futures = 
Lists.newArrayList();
+final List>> futures = 
Lists.newArrayList();
 final int totalProducers = 10;
 CountDownLatch latch = new CountDownLatch(totalProducers);
 for (int i = 0; i < totalProducers; i++) {
@@ -591,14 +591,18 @@ public class BrokerClientIntegrationTest extends 
ProducerConsumerBase {
 final String randomTopicName1 = topicName + 
randomUUID().toString();
 final String randomTopicName2 = topicName + 
randomUUID().toString();
 // pass producer-name to avoid exception: producer is 
already connected to topic
-
futures.add(pulsarClient2.newProducer().topic(randomTopicName1).createAsync());
-
futures.add(pulsarClient.newProducer().topic(randomTopicName2).createAsync());
+synchronized (futures) {
+
futures.add(pulsarClient2.newProducer().topic(randomTopicName1).createAsync());
+
futures.add(pulsarClient.newProducer().topic(randomTopicName2).createAsync());
+}
 latch.countDown();
 });
 }
 
 latch.await();
-FutureUtil.waitForAll(futures).get();
+synchronized (futures) {
+FutureUtil.waitForAll(futures).get();
+}
 pulsarClient.close();
 pulsarClient2.close();
 } finally {



[GitHub] merlimat closed pull request #2595: [tests] Fix the synchronization problem at BrokerClientIntegrationTest.testMaxConcurrentTopicLoading

2018-09-17 Thread GitBox
merlimat closed pull request #2595: [tests] Fix the synchronization problem at 
BrokerClientIntegrationTest.testMaxConcurrentTopicLoading
URL: https://github.com/apache/incubator-pulsar/pull/2595
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java
index bf65fdd157..0e47dfe20b 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java
@@ -583,7 +583,7 @@ public void testMaxConcurrentTopicLoading() throws 
Exception {
 ClientCnx cnx = producer.cnx();
 assertTrue(cnx.channel().isActive());
 ExecutorService executor = 
Executors.newFixedThreadPool(concurrentLookupRequests);
-List>> futures = 
Lists.newArrayList();
+final List>> futures = 
Lists.newArrayList();
 final int totalProducers = 10;
 CountDownLatch latch = new CountDownLatch(totalProducers);
 for (int i = 0; i < totalProducers; i++) {
@@ -591,14 +591,18 @@ public void testMaxConcurrentTopicLoading() throws 
Exception {
 final String randomTopicName1 = topicName + 
randomUUID().toString();
 final String randomTopicName2 = topicName + 
randomUUID().toString();
 // pass producer-name to avoid exception: producer is 
already connected to topic
-
futures.add(pulsarClient2.newProducer().topic(randomTopicName1).createAsync());
-
futures.add(pulsarClient.newProducer().topic(randomTopicName2).createAsync());
+synchronized (futures) {
+
futures.add(pulsarClient2.newProducer().topic(randomTopicName1).createAsync());
+
futures.add(pulsarClient.newProducer().topic(randomTopicName2).createAsync());
+}
 latch.countDown();
 });
 }
 
 latch.await();
-FutureUtil.waitForAll(futures).get();
+synchronized (futures) {
+FutureUtil.waitForAll(futures).get();
+}
 pulsarClient.close();
 pulsarClient2.close();
 } finally {


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie opened a new pull request #2598: [tests] Flaky Test ZooKeeperCacheTest#testChildrenCacheZnodeCreatedAfterCache

2018-09-17 Thread GitBox
sijie opened a new pull request #2598:  [tests] Flaky Test 
ZooKeeperCacheTest#testChildrenCacheZnodeCreatedAfterCache
URL: https://github.com/apache/incubator-pulsar/pull/2598
 
 
   *Motivation*
   
   The problem is zookeeper watcher notification is non-deterministic. That 
says if you create N paths in zookeeper, you might receive
   x notification. x is between 1 and N. so the test is written in a very 
non-deterministic way.
   
   ```
   java.lang.AssertionError: expected [1] but found [2]
at org.testng.Assert.fail(Assert.java:96)
at org.testng.Assert.failNotEquals(Assert.java:776)
at org.testng.Assert.assertEqualsImpl(Assert.java:137)
at org.testng.Assert.assertEquals(Assert.java:118)
at org.testng.Assert.assertEquals(Assert.java:652)
at org.testng.Assert.assertEquals(Assert.java:662)
at 
org.apache.pulsar.zookeeper.ZookeeperCacheTest.testChildrenCacheZnodeCreatedAfterCache(ZookeeperCacheTest.java:214)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
at 
org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:54)
at 
org.testng.internal.InvokeMethodRunnable.run(InvokeMethodRunnable.java:44)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
   ```
   
   *Changes*
   
   rewrite the test to make it more robust.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie opened a new pull request #2597: [build] Fix docker organization parameter

2018-09-17 Thread GitBox
sijie opened a new pull request #2597: [build] Fix docker organization parameter
URL: https://github.com/apache/incubator-pulsar/pull/2597
 
 
   *Motivation*
   
   docker orgnization is missing for building test image. so the build will be 
failing with `-Pdocker`.
   
   *Changes*
   
   Move the docker organization parameter to root pom file.
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] ivankelly commented on a change in pull request #2591: Fix: Compaction with last deleted keys not completing compaction

2018-09-17 Thread GitBox
ivankelly commented on a change in pull request #2591: Fix: Compaction with 
last deleted keys not completing compaction
URL: https://github.com/apache/incubator-pulsar/pull/2591#discussion_r218200350
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/compaction/TwoPhaseCompactor.java
 ##
 @@ -217,10 +229,11 @@ private void phaseTwoLoop(RawReader reader, MessageId 
to, Map
 }
 } else {
 Pair keyAndSize = extractKeyAndSize(m);
+MessageId msg;
 if (keyAndSize == null) { // pass through messages 
without a key
 messageToAdd = Optional.of(m);
-} else if 
(latestForKey.get(keyAndSize.getLeft()).equals(id)
-   && keyAndSize.getRight() > 0) {
+} else if ((msg = 
latestForKey.get(keyAndSize.getLeft())) != null && msg.equals(id)
+&& keyAndSize.getRight() > 0) { // consider 
message only if present into latestForKey map
 
 Review comment:
   change it to a checkArgument()


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] rdhabalia commented on a change in pull request #2591: Fix: Compaction with last deleted keys not completing compaction

2018-09-17 Thread GitBox
rdhabalia commented on a change in pull request #2591: Fix: Compaction with 
last deleted keys not completing compaction
URL: https://github.com/apache/incubator-pulsar/pull/2591#discussion_r218200167
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/compaction/TwoPhaseCompactor.java
 ##
 @@ -217,10 +229,11 @@ private void phaseTwoLoop(RawReader reader, MessageId 
to, Map
 }
 } else {
 Pair keyAndSize = extractKeyAndSize(m);
+MessageId msg;
 if (keyAndSize == null) { // pass through messages 
without a key
 messageToAdd = Optional.of(m);
-} else if 
(latestForKey.get(keyAndSize.getLeft()).equals(id)
-   && keyAndSize.getRight() > 0) {
+} else if ((msg = 
latestForKey.get(keyAndSize.getLeft())) != null && msg.equals(id)
+&& keyAndSize.getRight() > 0) { // consider 
message only if present into latestForKey map
 
 Review comment:
   that's correct. it's redundant so, I think I will remove it as well.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] rdhabalia commented on a change in pull request #2591: Fix: Compaction with last deleted keys not completing compaction

2018-09-17 Thread GitBox
rdhabalia commented on a change in pull request #2591: Fix: Compaction with 
last deleted keys not completing compaction
URL: https://github.com/apache/incubator-pulsar/pull/2591#discussion_r218200057
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/compaction/TwoPhaseCompactor.java
 ##
 @@ -153,40 +163,42 @@ private void 
scheduleTimeout(CompletableFuture future) {
 });
 }
 
-private CompletableFuture phaseTwo(RawReader reader, MessageId from, 
MessageId to,
- Map 
latestForKey, BookKeeper bk) {
+private CompletableFuture phaseTwo(RawReader reader, MessageId from, 
MessageId to, MessageId lastReadId,
+Map latestForKey, BookKeeper bk) {
 Map metadata = ImmutableMap.of("compactedTopic", 
reader.getTopic().getBytes(UTF_8),
-   "compactedTo", 
to.toByteArray());
+"compactedTo", to.toByteArray());
 return createLedger(bk, metadata).thenCompose((ledger) -> {
-log.info("Commencing phase two of compaction for {}, from {} 
to {}, compacting {} keys to ledger {}",
- reader.getTopic(), from, to, latestForKey.size(), 
ledger.getId());
-return phaseTwoSeekThenLoop(reader, from, to, latestForKey, 
bk, ledger);
-});
+log.info("Commencing phase two of compaction for {}, from {} to 
{}, compacting {} keys to ledger {}",
+reader.getTopic(), from, to, latestForKey.size(), 
ledger.getId());
+return phaseTwoSeekThenLoop(reader, from, to, lastReadId, 
latestForKey, bk, ledger);
+});
 }
 
 private CompletableFuture phaseTwoSeekThenLoop(RawReader reader, 
MessageId from, MessageId to,
- Map latestForKey,
- BookKeeper bk, 
LedgerHandle ledger) {
+MessageId lastReadId, Map latestForKey, 
BookKeeper bk, LedgerHandle ledger) {
 CompletableFuture promise = new CompletableFuture<>();
 
-reader.seekAsync(from).thenCompose((v) -> {
-Semaphore outstanding = new Semaphore(MAX_OUTSTANDING);
-CompletableFuture loopPromise = new 
CompletableFuture();
-phaseTwoLoop(reader, to, latestForKey, ledger, outstanding, 
loopPromise);
-return loopPromise;
-}).thenCompose((v) -> closeLedger(ledger))
-.thenCompose((v) -> reader.acknowledgeCumulativeAsync(
- to, 
ImmutableMap.of(COMPACTED_TOPIC_LEDGER_PROPERTY, ledger.getId(
-.whenComplete((res, exception) -> {
+boolean emptyCompactedLedger = to == null;
 
 Review comment:
   sure, will add it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] rdhabalia commented on issue #2549: [Function] avoid creating assignment snapshot and publish individual assignment msg

2018-09-17 Thread GitBox
rdhabalia commented on issue #2549: [Function] avoid creating assignment 
snapshot and publish individual assignment msg
URL: https://github.com/apache/incubator-pulsar/pull/2549#issuecomment-422143170
 
 
   @sijie yes, I have fixed this test-failure in last commit and now tests are 
passing. I still have to address change on ##2591 before we merge this PR.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie opened a new pull request #2596: (WIP) [tests] improve, stabilize or disable unit tests

2018-09-17 Thread GitBox
sijie opened a new pull request #2596: (WIP) [tests] improve, stabilize or 
disable unit tests
URL: https://github.com/apache/incubator-pulsar/pull/2596
 
 
   serve as a master pr to fix or disable unit tests to bring CI to green.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie opened a new pull request #2595: [tests] Fix the synchronization problem at BrokerClientIntegrationTest.testMaxConcurrentTopicLoading

2018-09-17 Thread GitBox
sijie opened a new pull request #2595: [tests] Fix the synchronization problem 
at BrokerClientIntegrationTest.testMaxConcurrentTopicLoading
URL: https://github.com/apache/incubator-pulsar/pull/2595
 
 
   
   *Motivation*
   
   Following exception is observed in one of the CI jobs.
   
   ```
   java.lang.NullPointerException
at 
org.apache.pulsar.common.util.FutureUtil.waitForAll(FutureUtil.java:44)
at 
org.apache.pulsar.client.impl.BrokerClientIntegrationTest.testMaxConcurrentTopicLoading(BrokerClientIntegrationTest.java:601)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
at 
org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:54)
at 
org.testng.internal.InvokeMethodRunnable.run(InvokeMethodRunnable.java:44)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
   ```
   
   The problem seems to be coming from improper synchronization in the tests.
   
   *Changes*
   
   Fix the synchronization problem in 
BrokerClientIntegrationTest.testMaxConcurrentTopicLoading
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie commented on a change in pull request #2578: Add support for schema extraction from a jar

2018-09-17 Thread GitBox
sijie commented on a change in pull request #2578: Add support for schema 
extraction from a jar
URL: https://github.com/apache/incubator-pulsar/pull/2578#discussion_r218168735
 
 

 ##
 File path: 
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSchemas.java
 ##
 @@ -83,4 +88,44 @@ void run() throws Exception {
 }
 }
 
+@Parameters(commandDescription = "Provide the schema via a topic")
+private class PojoSchema extends CliCommand {
+@Parameter(description = "persistent://tenant/namespace/topic", 
required = true)
+private java.util.List params;
+
+@Parameter(names = { "-j", "--jar" }, description = "jar filepath", 
required = true)
+private String jarFilePath;
+
+@Parameter(names = { "-t", "--type" }, description = "type avro or 
json", required = true)
+private String type;
+
+@Parameter(names = { "-c", "--class-name" }, description = "class name 
of pojo", required = true)
+private String className;
+
+@Override
+void run() throws Exception {
+String topic = validateTopicName(params);
+
+File file  = new File(jarFilePath);
+ClassLoader cl = new URLClassLoader(new URL[]{ 
file.toURI().toURL() });
+
+Class cls = cl.loadClass(className);
+
+PostSchemaPayload input = new PostSchemaPayload();
+
+if (type.toLowerCase().equals("avro")) {
+input.setType("avro");
+
input.setSchema(SchemaExtractor.getAvroSchemaInfo(cls).toString());
 
 Review comment:
   it should be `new String(SchemaInfo#getSchema(), UTF_8)`


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie commented on issue #2585: [tests] Make BrokerClientIntegrationTest testing behavior deterministic

2018-09-17 Thread GitBox
sijie commented on issue #2585: [tests] Make BrokerClientIntegrationTest 
testing behavior deterministic
URL: https://github.com/apache/incubator-pulsar/pull/2585#issuecomment-422111850
 
 
   retest this please


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie commented on issue #2549: [Function] avoid creating assignment snapshot and publish individual assignment msg

2018-09-17 Thread GitBox
sijie commented on issue #2549: [Function] avoid creating assignment snapshot 
and publish individual assignment msg
URL: https://github.com/apache/incubator-pulsar/pull/2549#issuecomment-422111382
 
 
   I see failures in this PR, this sounds like related to the change here. 
@rdhabalia can you take a look?
   
   https://builds.apache.org/job/pulsar_precommit_java8/3664/
   
   ```
   
Test Result (3 failures / +2)
   
org.apache.pulsar.functions.worker.MembershipManagerTest.testCheckFailuresNoFailures
   
org.apache.pulsar.functions.worker.MembershipManagerTest.testCheckFailuresSomeFailures
   
org.apache.pulsar.functions.worker.MembershipManagerTest.testCheckFailuresSomeUnassigned
   
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] jerrypeng opened a new pull request #2594: Correcting SQL getting started title

2018-09-17 Thread GitBox
jerrypeng opened a new pull request #2594: Correcting SQL getting started title
URL: https://github.com/apache/incubator-pulsar/pull/2594
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


[incubator-pulsar] 01/01: Correcting SQL getting started title

2018-09-17 Thread jerrypeng
This is an automated email from the ASF dual-hosted git repository.

jerrypeng pushed a commit to branch jerrypeng-patch-1
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git

commit e4eb459d477d01edead131817e9c15b756ab7af7
Author: Boyang Jerry Peng 
AuthorDate: Mon Sep 17 10:49:35 2018 -0700

Correcting SQL getting started title
---
 site2/docs/sql-getting-started.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/site2/docs/sql-getting-started.md 
b/site2/docs/sql-getting-started.md
index cbadbed..f578444 100644
--- a/site2/docs/sql-getting-started.md
+++ b/site2/docs/sql-getting-started.md
@@ -1,7 +1,7 @@
 ---
 id: sql-getting-started
-title: Pulsar SQL Overview
-sidebar_label: Overview
+title: Pulsar SQL Getting Started
+sidebar_label: Getting Started
 ---
 
 It is super easy to start query data in Pulsar.  



[incubator-pulsar] branch jerrypeng-patch-1 created (now e4eb459)

2018-09-17 Thread jerrypeng
This is an automated email from the ASF dual-hosted git repository.

jerrypeng pushed a change to branch jerrypeng-patch-1
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git.


  at e4eb459  Correcting SQL getting started title

This branch includes the following new commits:

 new e4eb459  Correcting SQL getting started title

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[GitHub] sijie commented on issue #2587: [tests] improve connector related integration tests

2018-09-17 Thread GitBox
sijie commented on issue #2587: [tests] improve connector related integration 
tests
URL: https://github.com/apache/incubator-pulsar/pull/2587#issuecomment-422106026
 
 
   run java8 tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] merlimat commented on issue #2580: [Python] Consolidated duplicated subscribe_*() methods into a single one

2018-09-17 Thread GitBox
merlimat commented on issue #2580: [Python] Consolidated duplicated 
subscribe_*() methods into a single one
URL: https://github.com/apache/incubator-pulsar/pull/2580#issuecomment-422081330
 
 
   run cpp tests
   run integration tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] srkukarni commented on issue #2549: [Function] avoid creating assignment snapshot and publish individual assignment msg

2018-09-17 Thread GitBox
srkukarni commented on issue #2549: [Function] avoid creating assignment 
snapshot and publish individual assignment msg
URL: https://github.com/apache/incubator-pulsar/pull/2549#issuecomment-422079888
 
 
   run integration tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] srkukarni commented on issue #2587: [tests] improve connector related integration tests

2018-09-17 Thread GitBox
srkukarni commented on issue #2587: [tests] improve connector related 
integration tests
URL: https://github.com/apache/incubator-pulsar/pull/2587#issuecomment-422075457
 
 
   run java8 tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] srkukarni opened a new pull request #2593: Add support for running python functions with wheel file

2018-09-17 Thread GitBox
srkukarni opened a new pull request #2593: Add support for running python 
functions with wheel file
URL: https://github.com/apache/incubator-pulsar/pull/2593
 
 
   ### Motivation
   Currently running python functions require all function logic to be 
contained within one python file. This pr allows python wheel files to be 
submitted to be run as functions, thereby greatly increasing flexibility
   ### Modifications
   
   Describe the modifications you've done.
   
   ### Result
   
   After your change, what will change.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] dsambandam commented on issue #2576: Pulsar client consume command fails with java.lang.IllegalArgumentException: port out of range:-1

2018-09-17 Thread GitBox
dsambandam commented on issue #2576: Pulsar client consume command fails with 
java.lang.IllegalArgumentException: port out of range:-1
URL: 
https://github.com/apache/incubator-pulsar/issues/2576#issuecomment-422047799
 
 
   @sijie - Is this a bug as the command runs fine without any TLS Auth. Also, 
please suggest if there are any work around that I can try it out to consume 
data ?


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] jiazhai commented on issue #2543: Add ServiceUrlProvider and add method forceCloseConnection in PulsarC…

2018-09-17 Thread GitBox
jiazhai commented on issue #2543: Add ServiceUrlProvider and add method 
forceCloseConnection in PulsarC…
URL: https://github.com/apache/incubator-pulsar/pull/2543#issuecomment-422015904
 
 
   over all lgtm, it would be better provide more comments and examples as 
@sijie suggested.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie commented on issue #2587: [tests] improve connector related integration tests

2018-09-17 Thread GitBox
sijie commented on issue #2587: [tests] improve connector related integration 
tests
URL: https://github.com/apache/incubator-pulsar/pull/2587#issuecomment-421940159
 
 
   run java8 tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


[incubator-pulsar] branch asf-site updated: Updated site at revision a123380

2018-09-17 Thread mmerli
This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 4437db0  Updated site at revision a123380
4437db0 is described below

commit 4437db09cf6239e09015837aae352fbdadd2498c
Author: jenkins 
AuthorDate: Mon Sep 17 08:45:06 2018 +

Updated site at revision a123380
---
 content/img/docusaurus.svg   |  2 +-
 content/img/pulsar.svg   |  2 +-
 content/swagger/swagger.json | 44 ++--
 3 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/content/img/docusaurus.svg b/content/img/docusaurus.svg
index 1d8b516..f80b221 100644
--- a/content/img/docusaurus.svg
+++ b/content/img/docusaurus.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg"; 
display="block">http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; 
style="display: block;">http://www.w3.org/2000/svg"; viewBox="0 0 223.44 43.08">http://www.w3.org/2000/svg"; viewBox="0 0 223.44 
43.08">.cls-1{fill:#188fff;}.cls-2{fill:#464e56;}Asset
 2

[GitHub] ivankelly commented on a change in pull request #2591: Fix: Compaction with last deleted keys not completing compaction

2018-09-17 Thread GitBox
ivankelly commented on a change in pull request #2591: Fix: Compaction with 
last deleted keys not completing compaction
URL: https://github.com/apache/incubator-pulsar/pull/2591#discussion_r217978740
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/compaction/TwoPhaseCompactor.java
 ##
 @@ -153,40 +163,42 @@ private void 
scheduleTimeout(CompletableFuture future) {
 });
 }
 
-private CompletableFuture phaseTwo(RawReader reader, MessageId from, 
MessageId to,
- Map 
latestForKey, BookKeeper bk) {
+private CompletableFuture phaseTwo(RawReader reader, MessageId from, 
MessageId to, MessageId lastReadId,
+Map latestForKey, BookKeeper bk) {
 Map metadata = ImmutableMap.of("compactedTopic", 
reader.getTopic().getBytes(UTF_8),
-   "compactedTo", 
to.toByteArray());
+"compactedTo", to.toByteArray());
 return createLedger(bk, metadata).thenCompose((ledger) -> {
-log.info("Commencing phase two of compaction for {}, from {} 
to {}, compacting {} keys to ledger {}",
- reader.getTopic(), from, to, latestForKey.size(), 
ledger.getId());
-return phaseTwoSeekThenLoop(reader, from, to, latestForKey, 
bk, ledger);
-});
+log.info("Commencing phase two of compaction for {}, from {} to 
{}, compacting {} keys to ledger {}",
+reader.getTopic(), from, to, latestForKey.size(), 
ledger.getId());
+return phaseTwoSeekThenLoop(reader, from, to, lastReadId, 
latestForKey, bk, ledger);
+});
 }
 
 private CompletableFuture phaseTwoSeekThenLoop(RawReader reader, 
MessageId from, MessageId to,
- Map latestForKey,
- BookKeeper bk, 
LedgerHandle ledger) {
+MessageId lastReadId, Map latestForKey, 
BookKeeper bk, LedgerHandle ledger) {
 CompletableFuture promise = new CompletableFuture<>();
 
-reader.seekAsync(from).thenCompose((v) -> {
-Semaphore outstanding = new Semaphore(MAX_OUTSTANDING);
-CompletableFuture loopPromise = new 
CompletableFuture();
-phaseTwoLoop(reader, to, latestForKey, ledger, outstanding, 
loopPromise);
-return loopPromise;
-}).thenCompose((v) -> closeLedger(ledger))
-.thenCompose((v) -> reader.acknowledgeCumulativeAsync(
- to, 
ImmutableMap.of(COMPACTED_TOPIC_LEDGER_PROPERTY, ledger.getId(
-.whenComplete((res, exception) -> {
+boolean emptyCompactedLedger = to == null;
 
 Review comment:
   Add a test that will trigger this


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] ivankelly commented on a change in pull request #2591: Fix: Compaction with last deleted keys not completing compaction

2018-09-17 Thread GitBox
ivankelly commented on a change in pull request #2591: Fix: Compaction with 
last deleted keys not completing compaction
URL: https://github.com/apache/incubator-pulsar/pull/2591#discussion_r217979707
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/compaction/TwoPhaseCompactor.java
 ##
 @@ -217,10 +229,11 @@ private void phaseTwoLoop(RawReader reader, MessageId 
to, Map
 }
 } else {
 Pair keyAndSize = extractKeyAndSize(m);
+MessageId msg;
 if (keyAndSize == null) { // pass through messages 
without a key
 messageToAdd = Optional.of(m);
-} else if 
(latestForKey.get(keyAndSize.getLeft()).equals(id)
-   && keyAndSize.getRight() > 0) {
+} else if ((msg = 
latestForKey.get(keyAndSize.getLeft())) != null && msg.equals(id)
+&& keyAndSize.getRight() > 0) { // consider 
message only if present into latestForKey map
 
 Review comment:
   I guess this check is redundant now. No harm in leaving it though


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie closed pull request #2588: Preserve filename of the original function submission

2018-09-17 Thread GitBox
sijie closed pull request #2588: Preserve filename of the original function 
submission
URL: https://github.com/apache/incubator-pulsar/pull/2588
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/pulsar-functions/proto/src/main/proto/Function.proto 
b/pulsar-functions/proto/src/main/proto/Function.proto
index 6e969ae077..a76cf8d5ed 100644
--- a/pulsar-functions/proto/src/main/proto/Function.proto
+++ b/pulsar-functions/proto/src/main/proto/Function.proto
@@ -116,6 +116,7 @@ message SinkSpec {
 
 message PackageLocationMetaData {
 string packagePath = 1;
+string originalFileName = 2;
 }
 
 message FunctionMetaData {
diff --git 
a/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionDetailsUtils.java
 
b/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionDetailsUtils.java
index 5ecdd4f347..a9787ba9cb 100644
--- 
a/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionDetailsUtils.java
+++ 
b/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionDetailsUtils.java
@@ -19,6 +19,8 @@
 
 package org.apache.pulsar.functions.utils;
 
+import org.apache.commons.lang.StringUtils;
+import org.apache.pulsar.functions.proto.Function;
 import org.apache.pulsar.functions.proto.Function.FunctionDetails;
 
 public class FunctionDetailsUtils {
@@ -43,7 +45,11 @@ public static String extractFunctionNameFromFQN(String 
fullyQualifiedName) {
 return fullyQualifiedName.split("/")[2];
 }
 
-public static String getDownloadFileName(FunctionDetails FunctionDetails) {
+public static String getDownloadFileName(FunctionDetails FunctionDetails,
+ Function.PackageLocationMetaData 
packageLocation) {
+if (!StringUtils.isEmpty(packageLocation.getOriginalFileName())) {
+return packageLocation.getOriginalFileName();
+}
 String[] hierarchy = FunctionDetails.getClassName().split("\\.");
 String fileName;
 if (hierarchy.length <= 0) {
diff --git 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java
 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java
index f5a7e969be..724d80c58e 100644
--- 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java
+++ 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java
@@ -156,7 +156,7 @@ public void startFunction(FunctionRuntimeInfo 
functionRuntimeInfo) throws Except
 
 pkgFile = new File(
 pkgDir,
-new 
File(FunctionDetailsUtils.getDownloadFileName(functionMetaData.getFunctionDetails())).getName());
+new 
File(FunctionDetailsUtils.getDownloadFileName(functionMetaData.getFunctionDetails(),
 functionMetaData.getPackageLocation())).getName());
 downloadFile(pkgFile, isPkgUrlProvided, functionMetaData, 
instanceId);
 }
 
diff --git 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java
 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java
index df82c0d25c..8bb91946a1 100644
--- 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java
+++ 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java
@@ -170,6 +170,9 @@ public Response registerFunction(final String tenant, final 
String namespace, fi
 } else {
 packageLocationMetaDataBuilder.setPackagePath(isPkgUrlProvided ? 
functionPkgUrl
 : createPackagePath(tenant, namespace, functionName, 
fileDetail.getFileName()));
+if (!isPkgUrlProvided) {
+
packageLocationMetaDataBuilder.setOriginalFileName(fileDetail.getFileName());
+}
 }
 
 
functionMetaDataBuilder.setPackageLocation(packageLocationMetaDataBuilder);
@@ -234,6 +237,9 @@ public Response updateFunction(final String tenant, final 
String namespace, fina
 } else {
 packageLocationMetaDataBuilder.setPackagePath(isPkgUrlProvided ? 
functionPkgUrl
 : createPackagePath(tenant, namespace, functionName, 
fileDetail.getFileName()));
+if (!isPkgUrlProvided) {
+
packageLocationMetaDataBuilder.setOriginalFileName(fileDetail.getFileName());
+}
 }
 
 
functionMetaDataBuilder.setPackageLocation(packageLocationMetaDataBuilder);


 


This is an automated message f

[incubator-pulsar] branch master updated: Preserve filename of the original function submission (#2588)

2018-09-17 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/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new a123380  Preserve filename of the original function submission (#2588)
a123380 is described below

commit a123380327fbe95eef1066c4c456020c19136e07
Author: Sanjeev Kulkarni 
AuthorDate: Mon Sep 17 01:03:06 2018 -0700

Preserve filename of the original function submission (#2588)

### Motivation

When we submit a function, currently we don't note down the original 
filename that was uploaded from the client. For regular java functions this 
works fine. For python workers we manage by doing tricks wrt tricks like 
filename using classnames. However when we add things like wheel support, the 
filename encodes information that cannot be discarded away.
This pr preserves that filename
---
 pulsar-functions/proto/src/main/proto/Function.proto  | 1 +
 .../org/apache/pulsar/functions/utils/FunctionDetailsUtils.java   | 8 +++-
 .../java/org/apache/pulsar/functions/worker/FunctionActioner.java | 2 +-
 .../apache/pulsar/functions/worker/rest/api/FunctionsImpl.java| 6 ++
 4 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/pulsar-functions/proto/src/main/proto/Function.proto 
b/pulsar-functions/proto/src/main/proto/Function.proto
index 6e969ae..a76cf8d 100644
--- a/pulsar-functions/proto/src/main/proto/Function.proto
+++ b/pulsar-functions/proto/src/main/proto/Function.proto
@@ -116,6 +116,7 @@ message SinkSpec {
 
 message PackageLocationMetaData {
 string packagePath = 1;
+string originalFileName = 2;
 }
 
 message FunctionMetaData {
diff --git 
a/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionDetailsUtils.java
 
b/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionDetailsUtils.java
index 5ecdd4f..a9787ba 100644
--- 
a/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionDetailsUtils.java
+++ 
b/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionDetailsUtils.java
@@ -19,6 +19,8 @@
 
 package org.apache.pulsar.functions.utils;
 
+import org.apache.commons.lang.StringUtils;
+import org.apache.pulsar.functions.proto.Function;
 import org.apache.pulsar.functions.proto.Function.FunctionDetails;
 
 public class FunctionDetailsUtils {
@@ -43,7 +45,11 @@ public class FunctionDetailsUtils {
 return fullyQualifiedName.split("/")[2];
 }
 
-public static String getDownloadFileName(FunctionDetails FunctionDetails) {
+public static String getDownloadFileName(FunctionDetails FunctionDetails,
+ Function.PackageLocationMetaData 
packageLocation) {
+if (!StringUtils.isEmpty(packageLocation.getOriginalFileName())) {
+return packageLocation.getOriginalFileName();
+}
 String[] hierarchy = FunctionDetails.getClassName().split("\\.");
 String fileName;
 if (hierarchy.length <= 0) {
diff --git 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java
 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java
index f5a7e96..724d80c 100644
--- 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java
+++ 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java
@@ -156,7 +156,7 @@ public class FunctionActioner implements AutoCloseable {
 
 pkgFile = new File(
 pkgDir,
-new 
File(FunctionDetailsUtils.getDownloadFileName(functionMetaData.getFunctionDetails())).getName());
+new 
File(FunctionDetailsUtils.getDownloadFileName(functionMetaData.getFunctionDetails(),
 functionMetaData.getPackageLocation())).getName());
 downloadFile(pkgFile, isPkgUrlProvided, functionMetaData, 
instanceId);
 }
 
diff --git 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java
 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java
index df82c0d..8bb9194 100644
--- 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java
+++ 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java
@@ -170,6 +170,9 @@ public class FunctionsImpl {
 } else {
 packageLocationMetaDataBuilder.setPackagePath(isPkgUrlProvided ? 
functionPkgUrl
 : createPackagePath(tenant, namespace, functionName, 
fileDetail.getFileName()));
+if (!isPkgUrlProvided) {
+
packageLocationMetaDataBuilder.setOriginalFileName(fileDetail.getFileName());
+

[GitHub] sijie commented on issue #2589: Fail to deploy on Kubernetes cluster

2018-09-17 Thread GitBox
sijie commented on issue #2589: Fail to deploy on Kubernetes cluster
URL: 
https://github.com/apache/incubator-pulsar/issues/2589#issuecomment-421920296
 
 
   @realwanpengli I think this is related to #2484 it is fixed and will be 
released as part of 2.1.1
   
   for a workaround, you can remove this line from the `admin.yml` when you are 
deploying the admin tool pod.
   
   
https://github.com/apache/incubator-pulsar/blob/master/deployment/kubernetes/generic/admin.yaml#L44


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] ivankelly commented on a change in pull request #2585: [tests] Make BrokerClientIntegrationTest testing behavior deterministic

2018-09-17 Thread GitBox
ivankelly commented on a change in pull request #2585: [tests] Make 
BrokerClientIntegrationTest testing behavior deterministic
URL: https://github.com/apache/incubator-pulsar/pull/2585#discussion_r217976070
 
 

 ##
 File path: 
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java
 ##
 @@ -333,12 +336,13 @@ public void 
testUnsupportedBatchMessageConsumer(SubscriptionType subType) throws
 // verification
 consumer1.setClientCnx(null);
 // (2) send batch-message which should not be able to consume: as 
broker will disconnect the consumer
-for (int i = 0; i < 10; i++) {
+CompletableFuture lastSendFuture = null;
+for (int i = 0; i < numMessagesPerBatch; i++) {
 String message = "my-message-" + i;
-batchProducer.sendAsync(message.getBytes());
+lastSendFuture = batchProducer.sendAsync(message.getBytes());
 }
 
 Review comment:
   you could use producer.flush() here.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie commented on issue #2587: [tests] improve connector related integration tests

2018-09-17 Thread GitBox
sijie commented on issue #2587: [tests] improve connector related integration 
tests
URL: https://github.com/apache/incubator-pulsar/pull/2587#issuecomment-421919287
 
 
   run java8 tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] sijie closed pull request #2500: [schema] add schemas for primtive types

2018-09-17 Thread GitBox
sijie closed pull request #2500: [schema] add schemas for primtive types
URL: https://github.com/apache/incubator-pulsar/pull/2500
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/SchemaSerializationException.java
 
b/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/SchemaSerializationException.java
index 39248d2719..46a38c100c 100644
--- 
a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/SchemaSerializationException.java
+++ 
b/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/SchemaSerializationException.java
@@ -19,6 +19,11 @@
 package org.apache.pulsar.client.api;
 
 public class SchemaSerializationException extends RuntimeException {
+
+public SchemaSerializationException(String message) {
+super(message);
+}
+
 public SchemaSerializationException(Throwable cause) {
 super(cause);
 }
diff --git 
a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufferSchema.java
 
b/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufferSchema.java
new file mode 100644
index 00..ee8ba66fa6
--- /dev/null
+++ 
b/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufferSchema.java
@@ -0,0 +1,75 @@
+/**
+ * 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.client.impl.schema;
+
+import java.nio.ByteBuffer;
+import org.apache.pulsar.client.api.Schema;
+import org.apache.pulsar.common.schema.SchemaInfo;
+import org.apache.pulsar.common.schema.SchemaType;
+
+/**
+ * A bytebuffer schema.
+ */
+public class ByteBufferSchema implements Schema {
+
+public static ByteBufferSchema of() {
+return INSTANCE;
+}
+
+private static final ByteBufferSchema INSTANCE = new ByteBufferSchema();
+private static final SchemaInfo SCHEMA_INFO = new SchemaInfo()
+.setName("ByteBuffer")
+.setType(SchemaType.BYTEBUFFER)
+.setSchema(new byte[0]);
+
+@Override
+public byte[] encode(ByteBuffer data) {
+if (data == null) {
+return null;
+}
+
+data.rewind();
+
+if (data.hasArray()) {
+byte[] arr = data.array();
+if (data.arrayOffset() == 0 && arr.length == data.remaining()) {
+return arr;
+}
+}
+
+byte[] ret = new byte[data.remaining()];
+data.get(ret, 0, ret.length);
+data.rewind();
+return ret;
+}
+
+@Override
+public ByteBuffer decode(byte[] data) {
+if (null == data) {
+return null;
+} else {
+return ByteBuffer.wrap(data);
+}
+}
+
+@Override
+public SchemaInfo getSchemaInfo() {
+return SCHEMA_INFO;
+}
+}
diff --git 
a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteSchema.java
 
b/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteSchema.java
new file mode 100644
index 00..da82216df8
--- /dev/null
+++ 
b/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteSchema.java
@@ -0,0 +1,66 @@
+/**
+ * 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

[incubator-pulsar] branch master updated: [schema] add schemas for primtive types (#2500)

2018-09-17 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/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new 5a2d75c  [schema] add schemas for primtive types (#2500)
5a2d75c is described below

commit 5a2d75c11acd8c6014ea1f9551405a6bcb41e4f8
Author: Sijie Guo 
AuthorDate: Mon Sep 17 00:51:59 2018 -0700

[schema] add schemas for primtive types (#2500)

* [schema] add schemas for primtive types

* Fix issues with Schema.BYTES
---
 .../client/api/SchemaSerializationException.java   |   5 +
 .../client/impl/schema/ByteBufferSchema.java   |  75 +++
 .../schema/{StringSchema.java => ByteSchema.java}  |  50 +-
 .../pulsar/client/impl/schema/BytesSchema.java |  17 +++-
 .../pulsar/client/impl/schema/DoubleSchema.java|  80 
 .../pulsar/client/impl/schema/FloatSchema.java |  76 +++
 .../pulsar/client/impl/schema/IntSchema.java   |  75 +++
 .../pulsar/client/impl/schema/LongSchema.java  |  79 
 .../pulsar/client/impl/schema/ShortSchema.java |  73 +++
 .../pulsar/client/impl/schema/StringSchema.java|  29 --
 .../pulsar/client/schema/PrimitiveSchemaTest.java  | 102 +
 .../apache/pulsar/client/impl/ConsumerImpl.java|  11 ++-
 .../apache/pulsar/client/impl/ProducerImpl.java|   3 +
 .../apache/pulsar/common/schema/SchemaInfo.java|   2 +
 .../apache/pulsar/common/schema/SchemaType.java|  40 
 15 files changed, 686 insertions(+), 31 deletions(-)

diff --git 
a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/SchemaSerializationException.java
 
b/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/SchemaSerializationException.java
index 39248d2..46a38c1 100644
--- 
a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/SchemaSerializationException.java
+++ 
b/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/SchemaSerializationException.java
@@ -19,6 +19,11 @@
 package org.apache.pulsar.client.api;
 
 public class SchemaSerializationException extends RuntimeException {
+
+public SchemaSerializationException(String message) {
+super(message);
+}
+
 public SchemaSerializationException(Throwable cause) {
 super(cause);
 }
diff --git 
a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufferSchema.java
 
b/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufferSchema.java
new file mode 100644
index 000..ee8ba66
--- /dev/null
+++ 
b/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufferSchema.java
@@ -0,0 +1,75 @@
+/**
+ * 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.client.impl.schema;
+
+import java.nio.ByteBuffer;
+import org.apache.pulsar.client.api.Schema;
+import org.apache.pulsar.common.schema.SchemaInfo;
+import org.apache.pulsar.common.schema.SchemaType;
+
+/**
+ * A bytebuffer schema.
+ */
+public class ByteBufferSchema implements Schema {
+
+public static ByteBufferSchema of() {
+return INSTANCE;
+}
+
+private static final ByteBufferSchema INSTANCE = new ByteBufferSchema();
+private static final SchemaInfo SCHEMA_INFO = new SchemaInfo()
+.setName("ByteBuffer")
+.setType(SchemaType.BYTEBUFFER)
+.setSchema(new byte[0]);
+
+@Override
+public byte[] encode(ByteBuffer data) {
+if (data == null) {
+return null;
+}
+
+data.rewind();
+
+if (data.hasArray()) {
+byte[] arr = data.array();
+if (data.arrayOffset() == 0 && arr.length == data.remaining()) {
+return arr;
+}
+}
+
+byte[] ret = new byte[data.remaining()];
+data.get(ret, 0, ret.length);
+data.rewind();
+return ret;
+}
+
+@Override
+public ByteBuffer decode(byte[] data) {
+if (null == data) {
+return null;
+} else {
+return ByteBuffer.wrap(data);
+

[GitHub] aahmed-se commented on issue #2578: Add support for schema extraction from a jar

2018-09-17 Thread GitBox
aahmed-se commented on issue #2578: Add support for schema extraction from a jar
URL: https://github.com/apache/incubator-pulsar/pull/2578#issuecomment-421915872
 
 
   this should be ready for review, I will add some tests later.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


[incubator-pulsar] branch master updated: Change repository tag for test image (#2571)

2018-09-17 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/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new 844f46f  Change repository tag for test image (#2571)
844f46f is described below

commit 844f46f156687fad1a08d7e88716fa5ee6937943
Author: Ali Ahmed 
AuthorDate: Mon Sep 17 00:26:27 2018 -0700

Change repository tag for test image (#2571)

This uses the docker.organization property to tag the test image to make it 
consistent with other pom files
---
 tests/docker-images/latest-version-image/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/docker-images/latest-version-image/pom.xml 
b/tests/docker-images/latest-version-image/pom.xml
index 78a12e2..b58530c 100644
--- a/tests/docker-images/latest-version-image/pom.xml
+++ b/tests/docker-images/latest-version-image/pom.xml
@@ -68,13 +68,13 @@
   tag
 
 
-  
apachepulsar/pulsar-test-latest-version
+  
${docker.organization}/pulsar-test-latest-version
   latest
 
   
 
 
-  apachepulsar/pulsar-test-latest-version
+  
${docker.organization}/pulsar-test-latest-version
   ${project.version}
   false
   true



[GitHub] sijie closed pull request #2571: Change repository tag for test image

2018-09-17 Thread GitBox
sijie closed pull request #2571: Change repository tag for test image
URL: https://github.com/apache/incubator-pulsar/pull/2571
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/docker-images/latest-version-image/pom.xml 
b/tests/docker-images/latest-version-image/pom.xml
index 78a12e2383..b58530ce44 100644
--- a/tests/docker-images/latest-version-image/pom.xml
+++ b/tests/docker-images/latest-version-image/pom.xml
@@ -68,13 +68,13 @@
   tag
 
 
-  
apachepulsar/pulsar-test-latest-version
+  
${docker.organization}/pulsar-test-latest-version
   latest
 
   
 
 
-  apachepulsar/pulsar-test-latest-version
+  
${docker.organization}/pulsar-test-latest-version
   ${project.version}
   false
   true


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] rdhabalia removed a comment on issue #2549: [Function] avoid creating assignment snapshot and publish individual assignment msg

2018-09-17 Thread GitBox
rdhabalia removed a comment on issue #2549: [Function] avoid creating 
assignment snapshot and publish individual assignment msg
URL: https://github.com/apache/incubator-pulsar/pull/2549#issuecomment-421911308
 
 
   rerun tests please


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] rdhabalia commented on issue #2549: [Function] avoid creating assignment snapshot and publish individual assignment msg

2018-09-17 Thread GitBox
rdhabalia commented on issue #2549: [Function] avoid creating assignment 
snapshot and publish individual assignment msg
URL: https://github.com/apache/incubator-pulsar/pull/2549#issuecomment-421911308
 
 
   rerun tests please


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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