[GitHub] jiazhai commented on a change in pull request #2025: [WiP] Allow non-pesistent topics to be retrieved along with persistent ones from the "GetTopicsOfNamespace" method

2018-08-05 Thread GitBox
jiazhai commented on a change in pull request #2025: [WiP] Allow non-pesistent 
topics to be retrieved along with persistent ones from the 
"GetTopicsOfNamespace" method
URL: https://github.com/apache/incubator-pulsar/pull/2025#discussion_r207756903
 
 

 ##
 File path: 
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/PatternTopicsConsumerImplTest.java
 ##
 @@ -207,15 +213,106 @@ public void testBinaryProtoToGetTopicsOfNamespace() 
throws Exception {
 producer1.close();
 producer2.close();
 producer3.close();
+producer4.close();
+}
+
+   // verify consumer create success, and works well.
+@Test(timeOut = testTimeout)
+public void testBinaryProtoToGetTopicsOfNamespaceNonPersistent() throws 
Exception {
+String key = "BinaryProtoToGetTopics";
+String subscriptionName = "my-ex-subscription-" + key;
+String topicName1 = "persistent://my-property/my-ns/pattern-topic-1-" 
+ key;
+String topicName2 = "persistent://my-property/my-ns/pattern-topic-2-" 
+ key;
+String topicName3 = "persistent://my-property/my-ns/pattern-topic-3-" 
+ key;
+String topicName4 = 
"non-persistent://my-property/my-ns/pattern-topic-4-" + key;
+Pattern pattern = 
Pattern.compile("non-persistent://my-property/my-ns/pattern-topic.*");
+
+// 1. create partition
+admin.tenants().createTenant("prop", new TenantInfo());
+admin.topics().createPartitionedTopic(topicName2, 2);
+admin.topics().createPartitionedTopic(topicName3, 3);
+
+// 2. create producer
+String messagePredicate = "my-message-" + key + "-";
+int totalMessages = 40;
+
+Producer producer1 = 
pulsarClient.newProducer().topic(topicName1)
+.enableBatching(false)
+.messageRoutingMode(MessageRoutingMode.SinglePartition)
+.create();
+Producer producer2 = 
pulsarClient.newProducer().topic(topicName2)
+.enableBatching(false)
+
.messageRoutingMode(org.apache.pulsar.client.api.MessageRoutingMode.RoundRobinPartition)
+.create();
+Producer producer3 = 
pulsarClient.newProducer().topic(topicName3)
+.enableBatching(false)
+
.messageRoutingMode(org.apache.pulsar.client.api.MessageRoutingMode.RoundRobinPartition)
+.create();
+Producer producer4 = 
pulsarClient.newProducer().topic(topicName4)
+.enableBatching(false)
+.create();
+
+Consumer consumer = pulsarClient.newConsumer()
+.topicsPattern(pattern)
+.patternAutoDiscoveryPeriod(2)
+.subscriptionName(subscriptionName)
+.subscriptionType(SubscriptionType.Shared)
+.ackTimeout(ackTimeOutMillis, TimeUnit.MILLISECONDS)
+.subscribe();
+
+// 4. verify consumer get methods, to get right number of partitions 
and topics.
+assertSame(pattern, ((PatternMultiTopicsConsumerImpl) 
consumer).getPattern());
+List topics = ((PatternMultiTopicsConsumerImpl) 
consumer).getPartitionedTopics();
+List> consumers = 
((PatternMultiTopicsConsumerImpl) consumer).getConsumers();
+
+assertEquals(topics.size(), 1);
 
 Review comment:
   Test failed at here.  
   Before patternconsumer created,  the producer had been created. By design, 
it should have 7 topics (1+2+3+1)?


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 a change in pull request #2025: [WiP] Allow non-pesistent topics to be retrieved along with persistent ones from the "GetTopicsOfNamespace" method

2018-08-05 Thread GitBox
jiazhai commented on a change in pull request #2025: [WiP] Allow non-pesistent 
topics to be retrieved along with persistent ones from the 
"GetTopicsOfNamespace" method
URL: https://github.com/apache/incubator-pulsar/pull/2025#discussion_r207756396
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/Namespaces.java
 ##
 @@ -18,46 +18,31 @@
  */
 package org.apache.pulsar.broker.admin.v1;
 
+import com.google.common.collect.Lists;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import static 
org.apache.pulsar.broker.cache.ConfigurationCacheService.POLICIES;
 
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
+import javax.ws.rs.*;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response.Status;
 
 import org.apache.pulsar.broker.admin.impl.NamespacesBase;
 import org.apache.pulsar.broker.web.RestException;
-import org.apache.pulsar.common.policies.data.AuthAction;
-import org.apache.pulsar.common.policies.data.BacklogQuota;
+import 
org.apache.pulsar.common.api.proto.PulsarApi.CommandGetTopicsOfNamespace.Mode;
+import org.apache.pulsar.common.policies.data.*;
 
 Review comment:
   we should avoid using `*` in import.


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 #2025: [WiP] Allow non-pesistent topics to be retrieved along with persistent ones from the "GetTopicsOfNamespace" method

2018-08-05 Thread GitBox
jiazhai commented on issue #2025: [WiP] Allow non-pesistent topics to be 
retrieved along with persistent ones from the "GetTopicsOfNamespace" method
URL: https://github.com/apache/incubator-pulsar/pull/2025#issuecomment-410561887
 
 
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


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

2018-08-05 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 b346af5  Updated site at revision 3f8944f
b346af5 is described below

commit b346af5a5264cff1f412afa0dd26e39f206608a7
Author: jenkins 
AuthorDate: Mon Aug 6 00:52:42 2018 +

Updated site at revision 3f8944f
---
 content/docs/en/client-libraries.html  | 42 +-
 content/docs/en/client-libraries/index.html| 42 +-
 content/docs/en/next/client-libraries.html | 19 +-
 content/docs/en/next/client-libraries/index.html   | 19 +-
 content/docs/ja/client-libraries.html  | 42 +-
 content/docs/ja/client-libraries/index.html| 42 +-
 content/docs/ja/next/client-libraries.html | 19 +-
 content/docs/ja/next/client-libraries/index.html   | 19 +-
 content/docs/zh-CN/client-libraries.html   | 42 +-
 content/docs/zh-CN/client-libraries/index.html | 42 +-
 content/docs/zh-CN/next/client-libraries.html  | 19 +-
 .../docs/zh-CN/next/client-libraries/index.html| 19 +-
 content/swagger/swagger.json   | 20 +--
 13 files changed, 364 insertions(+), 22 deletions(-)

diff --git a/content/docs/en/client-libraries.html 
b/content/docs/en/client-libraries.html
index 8d6f07c..07e8e16 100644
--- a/content/docs/en/client-libraries.html
+++ b/content/docs/en/client-libraries.html
@@ -60,7 +60,47 @@
 The Pulsar C++ client.
 There are also http://www.stack.nl/~dimitri/doxygen/;>Doxygen-generated API docs for 
the C++ client here.
-← Start a standalone cluster with 
DockerPulsar 
Overview →Java clientGo clientPython 
clientC++ clientFeatureJavaC++GoPythonWebSocket
+
+
+Partitioned topics✅
+Batching✅
+Compression✅
+TLS✅
+Authentication✅
+Reader API✅
+Proxy Support✅
+Effectively-Once❌
+Schema✅❌
+Consumer seek✅✅✅❌
+Multi-topics consumer✅❌
+Topics regex consumer✅❌
+Compacted topics✅✅✅❌
+User defined properties 
producer/consumer✅❌
+Reader hasMessageAvailable✅✅✅❌
+Hostname verification✅❌
+
+
+https://github.com/Comcast/pulsar-client-go;>pulsar-client-gohttps://github.com/Comcast;>Comcasthttps://opensource.org/licenses/Apache-2.0;>https://img.shields.io/badge/License-Apache%202.0-blue.svg; 
alt="License">A native golang client
+Gohttps://github.com/t2y/go-pulsar;>go-pulsarhttps://github.com/t2y;>t2yhttps://opensource.org/licenses/Apache-2.0;>https://img.shields.io/badge/License-Apache%202.0-blue.svg; 
alt="License">
+Scalahttps://github.com/sksamuel/pulsar4s;>pulsar4shttps://github.com/sksamuel;>sksamuelhttps://opensource.org/licenses/Apache-2.0;>https://img.shields.io/badge/License-Apache%202.0-blue.svg; 
alt="License">Idomatic, typesafe, and reactive Scala client for 
Apache Pulsar
+
+
+← Start a standalone cluster with 
DockerPulsar 
Overview →Java clientGo clientPython 
clientC++ client' +
diff --git a/content/docs/en/client-libraries/index.html 
b/content/docs/en/client-libraries/index.html
index 8d6f07c..07e8e16 100644
--- a/content/docs/en/client-libraries/index.html
+++ b/content/docs/en/client-libraries/index.html
@@ -60,7 +60,47 @@
 The Pulsar C++ client.
 There are also http://www.stack.nl/~dimitri/doxygen/;>Doxygen-generated API docs for 
the C++ client here.
-← Start a standalone cluster with 
DockerPulsar 
Overview →Java clientGo clientPython 
clientC++ clientFeatureJavaC++GoPythonWebSocket
+
+
+Partitioned topics✅
+Batching✅
+Compression✅
+TLS✅
+Authentication✅
+Reader API✅
+Proxy Support✅
+Effectively-Once❌
+Schema✅❌
+Consumer seek✅✅✅❌
+Multi-topics consumer✅❌
+Topics regex consumer✅❌
+Compacted topics✅✅✅❌
+User defined properties 
producer/consumer✅❌
+Reader hasMessageAvailable✅✅✅❌
+Hostname verification✅❌
+
+
+https://github.com/Comcast/pulsar-client-go;>pulsar-client-gohttps://github.com/Comcast;>Comcasthttps://opensource.org/licenses/Apache-2.0;>https://img.shields.io/badge/License-Apache%202.0-blue.svg; 
alt="License">A native golang client
+Gohttps://github.com/t2y/go-pulsar;>go-pulsarhttps://github.com/t2y;>t2yhttps://opensource.org/licenses/Apache-2.0;>https://img.shields.io/badge/License-Apache%202.0-blue.svg; 
alt="License">
+Scalahttps://github.com/sksamuel/pulsar4s;>pulsar4shttps://github.com/sksamuel;>sksamuelhttps://opensource.org/licenses/Apache-2.0;>https://img.shields.io/badge/License-Apache%202.0-blue.svg; 
alt="License">Idomatic, typesafe, and reactive Scala client for 
Apache Pulsar
+
+
+← Start a standalone cluster with 
DockerPulsar 
Overview →Java clientGo clientPython 
clientC++ client' +
diff --git a/content/docs/en/next/client-libraries.html 
b/content/docs/en/next/client-libraries.html
index d3a6838..4fa9960 

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

2018-08-05 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 c8990fb  Updated site at revision 41a973b
c8990fb is described below

commit c8990fb6bbd3903b0a96ceb658bf0d12e5183b5d
Author: jenkins 
AuthorDate: Mon Aug 6 00:18:59 2018 +

Updated site at revision 41a973b
---
 content/contact.html   |  2 +-
 content/contact/index.html |  2 +-
 .../docs/latest/adaptors/PulsarSpark/index.html|  8 ++---
 .../docs/latest/adaptors/PulsarStorm/index.html|  6 ++--
 content/docs/latest/admin-api/overview/index.html  | 10 +++---
 content/docs/latest/clients/Cpp/index.html |  8 ++---
 content/docs/latest/clients/Java/index.html| 14 
 content/docs/latest/clients/Python/index.html  | 10 +++---
 content/docs/latest/clients/WebSocket/index.html   |  8 ++---
 content/docs/latest/clients/go/index.html  |  6 ++--
 .../docs/latest/cookbooks/Encryption/index.html|  6 ++--
 .../latest/cookbooks/PartitionedTopics/index.html  | 14 
 .../latest/cookbooks/RetentionExpiry/index.html| 14 
 .../docs/latest/cookbooks/compaction/index.html|  6 ++--
 .../cookbooks/message-deduplication/index.html | 10 +++---
 .../docs/latest/cookbooks/message-queue/index.html | 14 
 .../latest/cookbooks/tiered-storage/index.html |  4 +--
 .../docs/latest/deployment/Kubernetes/index.html   |  4 +--
 .../docs/latest/deployment/aws-cluster/index.html  |  4 +--
 content/docs/latest/deployment/cluster/index.html  |  4 +--
 content/docs/latest/deployment/instance/index.html |  4 +--
 .../ConceptsAndArchitecture/index.html |  4 +--
 .../latest/getting-started/LocalCluster/index.html |  4 +--
 .../latest/getting-started/Pulsar-2.0/index.html   |  2 +-
 .../docs/latest/getting-started/docker/index.html  |  4 +--
 .../docs/latest/project/BinaryProtocol/index.html  |  4 +--
 content/docs/latest/project/CompileCpp/index.html  |  8 ++---
 .../docs/latest/project/SimulationTools/index.html |  2 +-
 .../docs/latest/project/schema-storage/index.html  |  4 +--
 content/docs/latest/reference/CliTools/index.html  | 18 +-
 .../docs/latest/security/authorization/index.html  | 10 +++---
 content/docs/latest/security/encryption/index.html |  6 ++--
 content/download.html  |  2 +-
 content/download/index.html|  2 +-
 content/en/contact.html|  2 +-
 content/en/contact/index.html  |  2 +-
 content/en/download.html   |  2 +-
 content/en/download/index.html |  2 +-
 content/en/versions.html   |  2 +-
 content/en/versions/index.html |  2 +-
 content/ja/adaptors/PulsarSpark/index.html |  8 ++---
 content/ja/adaptors/PulsarStorm/index.html |  6 ++--
 content/ja/admin/AdminInterface/index.html | 12 +++
 content/ja/admin/Authz/index.html  | 12 +++
 content/ja/admin/ClustersBrokers/index.html|  6 ++--
 content/ja/admin/PropertiesNamespaces/index.html   |  6 ++--
 content/ja/advanced/PartitionedTopics/index.html   | 12 +++
 content/ja/advanced/RetentionExpiry/index.html | 12 +++
 content/ja/clients/Cpp/index.html  |  6 ++--
 content/ja/clients/Java/index.html |  8 ++---
 content/ja/clients/Python/index.html   |  8 ++---
 content/ja/clients/WebSocket/index.html|  8 ++---
 content/ja/contact.html|  2 +-
 content/ja/contact/index.html  |  2 +-
 content/ja/deployment/InstanceSetup/index.html |  6 ++--
 content/ja/deployment/Kubernetes/index.html|  4 +--
 content/ja/download.html   |  2 +-
 content/ja/download/index.html |  2 +-
 .../ConceptsAndArchitecture/index.html |  2 +-
 content/ja/getting-started/LocalCluster/index.html |  4 +--
 content/ja/project/BinaryProtocol/index.html   |  4 +--
 content/ja/project/SimulationTools/index.html  |  2 +-
 content/ja/reference/CliTools/index.html   | 18 +-
 content/ja/versions.html   |  2 +-
 content/ja/versions/index.html |  2 +-
 content/swagger/swagger.json   | 42 +++---
 content/versions.html  |  2 +-
 content/versions/index.html|  2 +-
 content/zh-CN/contact.html |  2 +-
 content/zh-CN/contact/index.html   |  2 +-
 content/zh-CN/download.html|  2 +-
 content/zh-CN/download/index.html  |  2 +-
 content/zh-CN/versions.html  

[GitHub] sijie closed issue #1452: reachedEndOfTopic is called twice if a topic has been terminated before subscription

2018-08-05 Thread GitBox
sijie closed issue #1452: reachedEndOfTopic is called twice if a topic has been 
terminated before subscription
URL: https://github.com/apache/incubator-pulsar/issues/1452
 
 
   


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: Issue #1452: remove reachedEndOfTopic in addConsumer (#2301)

2018-08-05 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 3f8944f  Issue #1452: remove reachedEndOfTopic in addConsumer (#2301)
3f8944f is described below

commit 3f8944f28ef2188d4bdab8f9394650fd799bc786
Author: Jia Zhai 
AuthorDate: Mon Aug 6 07:49:42 2018 +0800

Issue #1452: remove reachedEndOfTopic in addConsumer (#2301)

### Motivation

Fixes #1452

In issue #1452 , reachedEndOfTopic was called twice if a topic has been 
terminated before subscription.
It may be better to call `reachedEndOfTopic`, when real read/ack happened 
to the subscription, so delete the calling in `addConsumer` to avoid dup 
calling.

### Modifications

remove dup calling in `addConsumer` .
add related ut.

### Result

Expected all ut passed.
---
 .../service/persistent/PersistentSubscription.java |  5 ---
 .../client/api/SimpleProducerConsumerTest.java | 42 --
 2 files changed, 40 insertions(+), 7 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java
index 6092a86..dac9f05 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java
@@ -103,11 +103,6 @@ public class PersistentSubscription implements 
Subscription {
 throw new SubscriptionFencedException("Subscription is fenced");
 }
 
-if (topic.getManagedLedger().isTerminated() && 
cursor.getNumberOfEntriesInBacklog() == 0) {
-// Immediately notify the consumer that there are no more 
available messages
-consumer.reachedEndOfTopic();
-}
-
 if (dispatcher == null || !dispatcher.isConsumerConnected()) {
 switch (consumer.subType()) {
 case Exclusive:
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
index 79166a1..61bdad0 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
@@ -2434,7 +2434,7 @@ public class SimpleProducerConsumerTest extends 
ProducerConsumerBase {
 Producer producer = 
pulsarClient.newProducer().topic("persistent://my-property/my-ns/myrsa-topic1")
 
.addEncryptionKey(encryptionKeyName).compressionType(CompressionType.LZ4)
 .cryptoKeyReader(new EncKeyReader()).create();
-
+
 Consumer consumer = 
pulsarClient.newConsumer().topicsPattern("persistent://my-property/my-ns/myrsa-topic1")
 
.subscriptionName("my-subscriber-name").cryptoFailureAction(ConsumerCryptoFailureAction.CONSUME)
 .subscribe();
@@ -2450,7 +2450,7 @@ public class SimpleProducerConsumerTest extends 
ProducerConsumerBase {
 consumer.close();
 log.info("-- Exiting {} test --", methodName);
 }
-
+
 private String decryptMessage(TopicMessageImpl msg, String 
encryptionKeyName, CryptoKeyReader reader)
 throws Exception {
 Optional ctx = msg.getEncryptionCtx();
@@ -2624,4 +2624,42 @@ public class SimpleProducerConsumerTest extends 
ProducerConsumerBase {
 log.info("-- Exiting {} test --", methodName);
 }
 
+// Issue 1452: https://github.com/apache/incubator-pulsar/issues/1452
+// reachedEndOfTopic should be called only once if a topic has been 
terminated before subscription
+@Test
+public void testReachedEndOfTopic() throws Exception
+{
+String topicName = 
"persistent://my-property/my-ns/testReachedEndOfTopic";
+Producer producer = pulsarClient.newProducer()
+.topic(topicName)
+.enableBatching(false).create();
+producer.close();
+
+admin.topics().terminateTopicAsync(topicName).get();
+
+CountDownLatch latch = new CountDownLatch(2);
+Consumer consumer = pulsarClient.newConsumer()
+.topic(topicName)
+.subscriptionName("my-subscriber-name")
+.messageListener(new MessageListener()
+{
+@Override
+public void reachedEndOfTopic(Consumer consumer)
+{
+log.info("called reachedEndOfTopic  {}", methodName);
+latch.countDown();
+}
+
+@Override
+public void received(Consumer consumer, Message message)

[GitHub] sijie closed pull request #2301: Issue #1452: remove reachedEndOfTopic in addConsumer

2018-08-05 Thread GitBox
sijie closed pull request #2301: Issue #1452: remove reachedEndOfTopic in 
addConsumer
URL: https://github.com/apache/incubator-pulsar/pull/2301
 
 
   

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/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java
index 6092a8663a..dac9f055d7 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java
@@ -103,11 +103,6 @@ public synchronized void addConsumer(Consumer consumer) 
throws BrokerServiceExce
 throw new SubscriptionFencedException("Subscription is fenced");
 }
 
-if (topic.getManagedLedger().isTerminated() && 
cursor.getNumberOfEntriesInBacklog() == 0) {
-// Immediately notify the consumer that there are no more 
available messages
-consumer.reachedEndOfTopic();
-}
-
 if (dispatcher == null || !dispatcher.isConsumerConnected()) {
 switch (consumer.subType()) {
 case Exclusive:
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
index 79166a18f4..61bdad034a 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
@@ -2434,7 +2434,7 @@ public EncryptionKeyInfo getPrivateKey(String keyName, 
Map keyMe
 Producer producer = 
pulsarClient.newProducer().topic("persistent://my-property/my-ns/myrsa-topic1")
 
.addEncryptionKey(encryptionKeyName).compressionType(CompressionType.LZ4)
 .cryptoKeyReader(new EncKeyReader()).create();
-
+
 Consumer consumer = 
pulsarClient.newConsumer().topicsPattern("persistent://my-property/my-ns/myrsa-topic1")
 
.subscriptionName("my-subscriber-name").cryptoFailureAction(ConsumerCryptoFailureAction.CONSUME)
 .subscribe();
@@ -2450,7 +2450,7 @@ public EncryptionKeyInfo getPrivateKey(String keyName, 
Map keyMe
 consumer.close();
 log.info("-- Exiting {} test --", methodName);
 }
-
+
 private String decryptMessage(TopicMessageImpl msg, String 
encryptionKeyName, CryptoKeyReader reader)
 throws Exception {
 Optional ctx = msg.getEncryptionCtx();
@@ -2624,4 +2624,42 @@ public void testFlushBatchDisabled() throws Exception {
 log.info("-- Exiting {} test --", methodName);
 }
 
+// Issue 1452: https://github.com/apache/incubator-pulsar/issues/1452
+// reachedEndOfTopic should be called only once if a topic has been 
terminated before subscription
+@Test
+public void testReachedEndOfTopic() throws Exception
+{
+String topicName = 
"persistent://my-property/my-ns/testReachedEndOfTopic";
+Producer producer = pulsarClient.newProducer()
+.topic(topicName)
+.enableBatching(false).create();
+producer.close();
+
+admin.topics().terminateTopicAsync(topicName).get();
+
+CountDownLatch latch = new CountDownLatch(2);
+Consumer consumer = pulsarClient.newConsumer()
+.topic(topicName)
+.subscriptionName("my-subscriber-name")
+.messageListener(new MessageListener()
+{
+@Override
+public void reachedEndOfTopic(Consumer consumer)
+{
+log.info("called reachedEndOfTopic  {}", methodName);
+latch.countDown();
+}
+
+@Override
+public void received(Consumer consumer, Message message)
+{
+// do nothing
+}
+})
+.subscribe();
+
+assertFalse(latch.await(1, TimeUnit.SECONDS));
+assertEquals(latch.getCount(), 1);
+consumer.close();
+}
 }


 


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 #2265: PIP-19: Initial implementation of Pulsar SQL

2018-08-05 Thread GitBox
sijie commented on issue #2265: PIP-19: Initial implementation of Pulsar SQL
URL: https://github.com/apache/incubator-pulsar/pull/2265#issuecomment-410557196
 
 
   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


[incubator-pulsar] branch master updated: fix Test: function-tls test stops server gracefully (#2297)

2018-08-05 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 df02c7b  fix Test: function-tls test stops server gracefully (#2297)
df02c7b is described below

commit df02c7bfd12c0a62e25bd28b6ec0d35a7eaf7e9a
Author: Rajan Dhabalia 
AuthorDate: Sun Aug 5 16:47:20 2018 -0700

fix Test: function-tls test stops server gracefully (#2297)

### Motivation

As discussed in #2214 , right now, integration test requires 
function-worker process to exit when worker-server thread is interrupted which 
was removed in #2214. so, revert back previous behavior to exit worker-server 
when server thread is interrupted. However, tls-test will not create a separate 
thread to start worker-server so, unit-test will not exist during testing.


### Result

Fix integration test failure.
---
 .../apache/pulsar/io/PulsarFunctionTlsTest.java| 12 +
 .../org/apache/pulsar/functions/worker/Worker.java | 19 +++
 .../pulsar/functions/worker/rest/WorkerServer.java | 60 --
 3 files changed, 29 insertions(+), 62 deletions(-)

diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/io/PulsarFunctionTlsTest.java 
b/pulsar-broker/src/test/java/org/apache/pulsar/io/PulsarFunctionTlsTest.java
index 8f8b7ff..c57a8a0 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/io/PulsarFunctionTlsTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/io/PulsarFunctionTlsTest.java
@@ -74,7 +74,6 @@ public class PulsarFunctionTlsTest {
 String pulsarFunctionsNamespace = tenant + "/use/pulsar-function-admin";
 String workerId;
 WorkerServer workerServer;
-Thread serverThread;
 PulsarAdmin functionAdmin;
 private final int ZOOKEEPER_PORT = PortManager.nextFreePort();
 private final int workerServicePort = PortManager.nextFreePort();
@@ -128,8 +127,7 @@ public class PulsarFunctionTlsTest {
 
when(functionsWorkerService.getFunctionMetaDataManager()).thenReturn(dataManager);
 
 workerServer = new WorkerServer(functionsWorkerService);
-serverThread = new Thread(workerServer, workerServer.getThreadName());
-serverThread.start();
+workerServer.start();
 Thread.sleep(2000);
 String functionTlsUrl = String.format("https://%s:%s;,
 functionsWorkerService.getWorkerConfig().getWorkerHostname(), 
workerServicePortTls);
@@ -153,14 +151,6 @@ public class PulsarFunctionTlsTest {
 functionAdmin.close();
 bkEnsemble.stop();
 workerServer.stop();
-if (null != serverThread) {
-serverThread.interrupt();
-try {
-serverThread.join();
-} catch (InterruptedException e) {
-log.warn("Worker server thread is interrupted", e);
-}
-}
 functionsWorkerService.stop();
 }
 
diff --git 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/Worker.java
 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/Worker.java
index 6e87b94..cb73eaa 100644
--- 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/Worker.java
+++ 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/Worker.java
@@ -38,7 +38,7 @@ public class Worker extends AbstractService {
 
 private final WorkerConfig workerConfig;
 private final WorkerService workerService;
-private Thread serverThread;
+private WorkerServer server;
 
 public Worker(WorkerConfig workerConfig) {
 this.workerConfig = workerConfig;
@@ -57,15 +57,13 @@ public class Worker extends AbstractService {
 }
 }
 
-protected void doStartImpl() throws InterruptedException, IOException, 
PulsarAdminException {
+protected void doStartImpl() throws Exception {
 URI dlogUri = initialize(this.workerConfig);
 
 workerService.start(dlogUri);
-WorkerServer server = new WorkerServer(workerService);
-this.serverThread = new Thread(server, server.getThreadName());
-
+this.server = new WorkerServer(workerService);
+this.server.start();
 log.info("Start worker server on port {}...", 
this.workerConfig.getWorkerPort());
-this.serverThread.start();
 }
 
 private static URI initialize(WorkerConfig workerConfig)
@@ -150,13 +148,8 @@ public class Worker extends AbstractService {
 
 @Override
 protected void doStop() {
-if (null != serverThread) {
-serverThread.interrupt();
-try {
-serverThread.join();
-} catch (InterruptedException e) {
-log.warn("Worker server thread is interrupted", e);
-}
+if (null != this.server) {
+this.server.stop();
 }
 

[GitHub] sijie closed pull request #2297: fix Test: function-tls test stops server gracefully

2018-08-05 Thread GitBox
sijie closed pull request #2297: fix Test: function-tls test stops server 
gracefully
URL: https://github.com/apache/incubator-pulsar/pull/2297
 
 
   

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/io/PulsarFunctionTlsTest.java 
b/pulsar-broker/src/test/java/org/apache/pulsar/io/PulsarFunctionTlsTest.java
index 8f8b7ffd05..c57a8a0e59 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/io/PulsarFunctionTlsTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/io/PulsarFunctionTlsTest.java
@@ -74,7 +74,6 @@
 String pulsarFunctionsNamespace = tenant + "/use/pulsar-function-admin";
 String workerId;
 WorkerServer workerServer;
-Thread serverThread;
 PulsarAdmin functionAdmin;
 private final int ZOOKEEPER_PORT = PortManager.nextFreePort();
 private final int workerServicePort = PortManager.nextFreePort();
@@ -128,8 +127,7 @@ void setup(Method method) throws Exception {
 
when(functionsWorkerService.getFunctionMetaDataManager()).thenReturn(dataManager);
 
 workerServer = new WorkerServer(functionsWorkerService);
-serverThread = new Thread(workerServer, workerServer.getThreadName());
-serverThread.start();
+workerServer.start();
 Thread.sleep(2000);
 String functionTlsUrl = String.format("https://%s:%s;,
 functionsWorkerService.getWorkerConfig().getWorkerHostname(), 
workerServicePortTls);
@@ -153,14 +151,6 @@ void shutdown() throws Exception {
 functionAdmin.close();
 bkEnsemble.stop();
 workerServer.stop();
-if (null != serverThread) {
-serverThread.interrupt();
-try {
-serverThread.join();
-} catch (InterruptedException e) {
-log.warn("Worker server thread is interrupted", e);
-}
-}
 functionsWorkerService.stop();
 }
 
diff --git 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/Worker.java
 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/Worker.java
index 6e87b94cb4..cb73eaa16f 100644
--- 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/Worker.java
+++ 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/Worker.java
@@ -38,7 +38,7 @@
 
 private final WorkerConfig workerConfig;
 private final WorkerService workerService;
-private Thread serverThread;
+private WorkerServer server;
 
 public Worker(WorkerConfig workerConfig) {
 this.workerConfig = workerConfig;
@@ -57,15 +57,13 @@ protected void doStart() {
 }
 }
 
-protected void doStartImpl() throws InterruptedException, IOException, 
PulsarAdminException {
+protected void doStartImpl() throws Exception {
 URI dlogUri = initialize(this.workerConfig);
 
 workerService.start(dlogUri);
-WorkerServer server = new WorkerServer(workerService);
-this.serverThread = new Thread(server, server.getThreadName());
-
+this.server = new WorkerServer(workerService);
+this.server.start();
 log.info("Start worker server on port {}...", 
this.workerConfig.getWorkerPort());
-this.serverThread.start();
 }
 
 private static URI initialize(WorkerConfig workerConfig)
@@ -150,13 +148,8 @@ private static URI initialize(WorkerConfig workerConfig)
 
 @Override
 protected void doStop() {
-if (null != serverThread) {
-serverThread.interrupt();
-try {
-serverThread.join();
-} catch (InterruptedException e) {
-log.warn("Worker server thread is interrupted", e);
-}
+if (null != this.server) {
+this.server.stop();
 }
 workerService.stop();
 }
diff --git 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/WorkerServer.java
 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/WorkerServer.java
index f6e148e719..79b9093e7b 100644
--- 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/WorkerServer.java
+++ 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/WorkerServer.java
@@ -53,7 +53,7 @@
 import io.netty.util.concurrent.DefaultThreadFactory;
 
 @Slf4j
-public class WorkerServer implements Runnable {
+public class WorkerServer {
 
 private final WorkerConfig workerConfig;
 private final WorkerService workerService;
@@ -76,42 +76,41 @@ public WorkerServer(WorkerService workerService) {
 this.workerConfig = workerService.getWorkerConfig();
 this.workerService = workerService;
   

[GitHub] sijie closed pull request #2309: [website] update clients page with feature matrix and a list of 3rdparty clients

2018-08-05 Thread GitBox
sijie closed pull request #2309:  [website] update clients page with feature 
matrix and a list of 3rdparty clients
URL: https://github.com/apache/incubator-pulsar/pull/2309
 
 
   

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/site2/docs/getting-started-clients.md 
b/site2/docs/getting-started-clients.md
index 132a96e9ce..85ef3dc494 100644
--- a/site2/docs/getting-started-clients.md
+++ b/site2/docs/getting-started-clients.md
@@ -39,3 +39,19 @@ There are also 
[pdoc](https://github.com/BurntSushi/pdoc)-generated API docs for
 For a tutorial on using the Pulsar C++ clent, see [The Pulsar C++ 
client](client-libraries-cpp.md).
 
 There are also [Doxygen](http://www.stack.nl/~dimitri/doxygen/)-generated API 
docs for the C++ client [here](/api/cpp).
+
+## Feature Matrix
+
+This matrix listing all the features among different languages in Pulsar 
master can be found 
[here](https://github.com/apache/incubator-pulsar/wiki/Client-Features-Matrix).
+
+## Thirdparty Clients
+
+Besides the official released clients, there are also multiple projects on 
developing a Pulsar client in different languages.
+
+> if you have developed a Pulsar client, but it doesn't show up here. Feel 
free to submit a pull request to add your client to the list below.
+
+| Language | Project | Maintainer | License | Description |
+|--|-||-|-|
+| Go | [pulsar-client-go](https://github.com/Comcast/pulsar-client-go) | 
[Comcast](https://github.com/Comcast) | 
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
 | A native golang client |
+| Go | [go-pulsar](https://github.com/t2y/go-pulsar) | 
[t2y](https://github.com/t2y) | 
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
 | |
+| Scala | [pulsar4s](https://github.com/sksamuel/pulsar4s) | 
[sksamuel](https://github.com/sksamuel) | 
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
 | Idomatic, typesafe, and reactive Scala client for Apache Pulsar |
diff --git 
a/site2/website/versioned_docs/version-2.1.0-incubating/getting-started-clients.md
 
b/site2/website/versioned_docs/version-2.1.0-incubating/getting-started-clients.md
index e3a6d3ee48..ad4a82200a 100644
--- 
a/site2/website/versioned_docs/version-2.1.0-incubating/getting-started-clients.md
+++ 
b/site2/website/versioned_docs/version-2.1.0-incubating/getting-started-clients.md
@@ -40,3 +40,38 @@ There are also 
[pdoc](https://github.com/BurntSushi/pdoc)-generated API docs for
 For a tutorial on using the Pulsar C++ clent, see [The Pulsar C++ 
client](client-libraries-cpp.md).
 
 There are also [Doxygen](http://www.stack.nl/~dimitri/doxygen/)-generated API 
docs for the C++ client [here](/api/cpp).
+
+## Feature Matrix
+
+This matrix lists all the features among different languages in Pulsar 
{{pulsar:version}} release.
+
+| Feature   | Java | C++ | Go | Python | 
WebSocket |
+|:--|::|:---:|:--:|:--:|:-:|
+| Partitioned topics|  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| Batching  |  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| Compression   |  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| TLS   |  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| Authentication|  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| Reader API|  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| Proxy Support |  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| Effectively-Once  |  ✅   |  ✅  | ✅  |   ✅| ❌ 
|
+| Schema|  ✅   |  | | |
 ❌ |
+| Consumer seek |  ✅   |  ✅  | |   ✅| 
❌ |
+| Multi-topics consumer |  ✅   |  | | |
 ❌ |
+| Topics regex consumer |  ✅   |  | | |
 ❌ |
+| Compacted topics  |  ✅   |  ✅  | |   ✅|  
❌|
+| User defined properties producer/consumer |  ✅   |  | | |
 ❌ |
+| Reader hasMessageAvailable|  ✅   |  ✅  | |   ✅| 
❌ |
+| Hostname verification |  ✅   |  | | |
 ❌ |
+
+## Thirdparty Clients
+
+Besides the official released clients, there are also multiple projects on 
developing a Pulsar client in different languages.
+
+> if you have developed a 

[incubator-pulsar] branch master updated: [website] update clients page with feature matrix and a list of 3rdparty clients (#2309)

2018-08-05 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 0d97479   [website] update clients page with feature matrix and a list 
of 3rdparty clients (#2309)
0d97479 is described below

commit 0d97479ab2c67e2dad04c5c9887b51bc49fd3e52
Author: Sijie Guo 
AuthorDate: Sun Aug 5 16:45:42 2018 -0700

 [website] update clients page with feature matrix and a list of 3rdparty 
clients (#2309)

* [website] update clients page with feature matrix and a list of 3rdparty 
clients

* Use a table to keep the list
---
 site2/docs/getting-started-clients.md  | 16 ++
 .../getting-started-clients.md | 35 ++
 2 files changed, 51 insertions(+)

diff --git a/site2/docs/getting-started-clients.md 
b/site2/docs/getting-started-clients.md
index 132a96e..85ef3dc 100644
--- a/site2/docs/getting-started-clients.md
+++ b/site2/docs/getting-started-clients.md
@@ -39,3 +39,19 @@ There are also 
[pdoc](https://github.com/BurntSushi/pdoc)-generated API docs for
 For a tutorial on using the Pulsar C++ clent, see [The Pulsar C++ 
client](client-libraries-cpp.md).
 
 There are also [Doxygen](http://www.stack.nl/~dimitri/doxygen/)-generated API 
docs for the C++ client [here](/api/cpp).
+
+## Feature Matrix
+
+This matrix listing all the features among different languages in Pulsar 
master can be found 
[here](https://github.com/apache/incubator-pulsar/wiki/Client-Features-Matrix).
+
+## Thirdparty Clients
+
+Besides the official released clients, there are also multiple projects on 
developing a Pulsar client in different languages.
+
+> if you have developed a Pulsar client, but it doesn't show up here. Feel 
free to submit a pull request to add your client to the list below.
+
+| Language | Project | Maintainer | License | Description |
+|--|-||-|-|
+| Go | [pulsar-client-go](https://github.com/Comcast/pulsar-client-go) | 
[Comcast](https://github.com/Comcast) | 
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
 | A native golang client |
+| Go | [go-pulsar](https://github.com/t2y/go-pulsar) | 
[t2y](https://github.com/t2y) | 
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
 | |
+| Scala | [pulsar4s](https://github.com/sksamuel/pulsar4s) | 
[sksamuel](https://github.com/sksamuel) | 
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
 | Idomatic, typesafe, and reactive Scala client for Apache Pulsar |
diff --git 
a/site2/website/versioned_docs/version-2.1.0-incubating/getting-started-clients.md
 
b/site2/website/versioned_docs/version-2.1.0-incubating/getting-started-clients.md
index e3a6d3e..ad4a822 100644
--- 
a/site2/website/versioned_docs/version-2.1.0-incubating/getting-started-clients.md
+++ 
b/site2/website/versioned_docs/version-2.1.0-incubating/getting-started-clients.md
@@ -40,3 +40,38 @@ There are also 
[pdoc](https://github.com/BurntSushi/pdoc)-generated API docs for
 For a tutorial on using the Pulsar C++ clent, see [The Pulsar C++ 
client](client-libraries-cpp.md).
 
 There are also [Doxygen](http://www.stack.nl/~dimitri/doxygen/)-generated API 
docs for the C++ client [here](/api/cpp).
+
+## Feature Matrix
+
+This matrix lists all the features among different languages in Pulsar 
{{pulsar:version}} release.
+
+| Feature   | Java | C++ | Go | Python | 
WebSocket |
+|:--|::|:---:|:--:|:--:|:-:|
+| Partitioned topics|  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| Batching  |  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| Compression   |  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| TLS   |  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| Authentication|  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| Reader API|  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| Proxy Support |  ✅   |  ✅  | ✅  |   ✅| ✅ 
|
+| Effectively-Once  |  ✅   |  ✅  | ✅  |   ✅| ❌ 
|
+| Schema|  ✅   |  | | |
 ❌ |
+| Consumer seek |  ✅   |  ✅  | |   ✅| 
❌ |
+| Multi-topics consumer |  ✅   |  | | |
 ❌ |
+| Topics regex consumer |  ✅   |  | | |
 ❌ |
+| Compacted topics  |  ✅   |  ✅  | |   ✅|  
❌|
+| 

[GitHub] sijie closed pull request #2310: [website] wrap strings with tags

2018-08-05 Thread GitBox
sijie closed pull request #2310: [website] wrap strings with  tags
URL: https://github.com/apache/incubator-pulsar/pull/2310
 
 
   

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/site2/website/pages/en/contact.js 
b/site2/website/pages/en/contact.js
index 7bc4872044..45f841653f 100644
--- a/site2/website/pages/en/contact.js
+++ b/site2/website/pages/en/contact.js
@@ -5,6 +5,7 @@ const CompLibrary = require('../../core/CompLibrary.js');
 const Container = CompLibrary.Container;
 const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
 const GridBlock = CompLibrary.GridBlock;
+const translate = require('../../server/translate.js').translate;
 
 const CWD = process.cwd();
 
@@ -42,22 +43,23 @@ class Contact extends React.Component {
 
   
 
-  Contact
+  Contact
   
 
 
 There are many ways to get help from the Apache Pulsar community.
 The mailing lists are the primary place where all Pulsar 
committers are present.
 Bugs and feature requests can either be discussed on the dev 
mailing list or
-by opening an issue on https://github.com/apache/incubator-pulsar/; target="_blank">GitHub.
+by opening an issue on
+https://github.com/apache/incubator-pulsar/; 
target="_blank">GitHub.
 
 
-Mailing Lists
+Mailing Lists
 
   
 
-  Name
-  Scope
+  Name
+  Scope
   
   
   
@@ -69,22 +71,22 @@ class Contact extends React.Component {
   
 {list.email}
 {list.desc}
-Subscribe
-Unsubscribe
-Archives
+Subscribe
+Unsubscribe
+Archives
   
 )
 )}
   
 
 
-Slack
-There is a Pulsar slack channel that is used for informal 
discussions for devs and users.
+Slack
+There is a Pulsar slack channel that is used for 
informal discussions for devs and users.
 
-The Slack instance is at https://apache-pulsar.slack.com/; target="_blank">
+The Slack instance is at https://apache-pulsar.slack.com/; target="_blank">
 https://apache-pulsar.slack.com/
 
-You can self-register at https://apache-pulsar.herokuapp.com/; target="_blank">
+You can self-register at https://apache-pulsar.herokuapp.com/; target="_blank">
 https://apache-pulsar.herokuapp.com/
   
 
diff --git a/site2/website/pages/en/download.js 
b/site2/website/pages/en/download.js
index 8f07c5da5c..c58599e51d 100644
--- a/site2/website/pages/en/download.js
+++ b/site2/website/pages/en/download.js
@@ -46,10 +46,10 @@ class Download extends React.Component {
 
   
 
-  Apache Pulsar downloads
+  Apache Pulsar downloads
   
 
-Current version (Stable) {latestVersion}
+Current version (Stable) 
{latestVersion}
 
   
 
@@ -60,7 +60,7 @@ class Download extends React.Component {
   
   
 
-  Binary
+  Binary
   
 pulsar-{latestVersion}-bin.tar.gz
   
@@ -71,7 +71,7 @@ class Download extends React.Component {
   
 
 
-  Source
+  Source
   
 pulsar-{latestVersion}-src.tar.gz
   
@@ -84,7 +84,7 @@ class Download extends React.Component {
   
 
 
-Release Integrity
+Release Integrity
 
   You must [verify](https://www.apache.org/info/verification.html) 
the integrity of the downloaded files.
   We provide OpenPGP signatures for every release file. This 
signature should be matched against the
@@ -95,60 +95,64 @@ class Download extends React.Component {
 
 
 
-Release notes
+Release notes
 
   
 Release 
notes for all Pulsar's versions
   
 
 
-Getting started
+Getting started
 
   
+  
 Once you've downloaded a Pulsar 

[incubator-pulsar] branch master updated: [website] wrap strings with tags (#2310)

2018-08-05 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 41a973b  [website] wrap strings with  tags (#2310)
41a973b is described below

commit 41a973b5f1f0ce842ec05ff95730e2746f2bdb97
Author: Sijie Guo 
AuthorDate: Sun Aug 5 16:44:19 2018 -0700

[website] wrap strings with  tags (#2310)

### Motivation

wrap the strings with `` tags so they can be translated
---
 site2/website/pages/en/contact.js   | 26 ++-
 site2/website/pages/en/download.js  | 50 -
 site2/website/pages/en/events.js|  8 +++---
 site2/website/pages/en/index.js |  4 ++-
 site2/website/pages/en/resources.js | 20 ---
 site2/website/pages/en/team.js  | 28 +
 site2/website/pages/en/versions.js  | 34 +
 7 files changed, 101 insertions(+), 69 deletions(-)

diff --git a/site2/website/pages/en/contact.js 
b/site2/website/pages/en/contact.js
index 7bc4872..45f8416 100644
--- a/site2/website/pages/en/contact.js
+++ b/site2/website/pages/en/contact.js
@@ -5,6 +5,7 @@ const CompLibrary = require('../../core/CompLibrary.js');
 const Container = CompLibrary.Container;
 const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
 const GridBlock = CompLibrary.GridBlock;
+const translate = require('../../server/translate.js').translate;
 
 const CWD = process.cwd();
 
@@ -42,22 +43,23 @@ class Contact extends React.Component {
 
   
 
-  Contact
+  Contact
   
 
 
 There are many ways to get help from the Apache Pulsar community.
 The mailing lists are the primary place where all Pulsar 
committers are present.
 Bugs and feature requests can either be discussed on the dev 
mailing list or
-by opening an issue on https://github.com/apache/incubator-pulsar/; target="_blank">GitHub.
+by opening an issue on
+https://github.com/apache/incubator-pulsar/; 
target="_blank">GitHub.
 
 
-Mailing Lists
+Mailing Lists
 
   
 
-  Name
-  Scope
+  Name
+  Scope
   
   
   
@@ -69,22 +71,22 @@ class Contact extends React.Component {
   
 {list.email}
 {list.desc}
-Subscribe
-Unsubscribe
-Archives
+Subscribe
+Unsubscribe
+Archives
   
 )
 )}
   
 
 
-Slack
-There is a Pulsar slack channel that is used for informal 
discussions for devs and users.
+Slack
+There is a Pulsar slack channel that is used for 
informal discussions for devs and users.
 
-The Slack instance is at https://apache-pulsar.slack.com/; target="_blank">
+The Slack instance is at https://apache-pulsar.slack.com/; target="_blank">
 https://apache-pulsar.slack.com/
 
-You can self-register at https://apache-pulsar.herokuapp.com/; target="_blank">
+You can self-register at https://apache-pulsar.herokuapp.com/; target="_blank">
 https://apache-pulsar.herokuapp.com/
   
 
diff --git a/site2/website/pages/en/download.js 
b/site2/website/pages/en/download.js
index 8f07c5d..c58599e 100644
--- a/site2/website/pages/en/download.js
+++ b/site2/website/pages/en/download.js
@@ -46,10 +46,10 @@ class Download extends React.Component {
 
   
 
-  Apache Pulsar downloads
+  Apache Pulsar downloads
   
 
-Current version (Stable) {latestVersion}
+Current version (Stable) 
{latestVersion}
 
   
 
@@ -60,7 +60,7 @@ class Download extends React.Component {
   
   
 
-  Binary
+  Binary
   
 pulsar-{latestVersion}-bin.tar.gz
   
@@ -71,7 +71,7 @@ class Download extends React.Component {
   
 
 
-  Source
+  Source
   
 pulsar-{latestVersion}-src.tar.gz
   
@@ -84,7 +84,7 @@ class Download extends React.Component {
   
 
 
-Release Integrity
+Release Integrity
 

[GitHub] sijie commented on issue #2311: [cpp] receiver queue size config acorss partitions in multi-topics-consumer

2018-08-05 Thread GitBox
sijie commented on issue #2311: [cpp] receiver queue size config acorss 
partitions in multi-topics-consumer
URL: https://github.com/apache/incubator-pulsar/pull/2311#issuecomment-410556948
 
 
   looks good to me. are you planning to add the config to python 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] jiazhai opened a new issue #2313: Connector: JDBC Connector (Sink)

2018-08-05 Thread GitBox
jiazhai opened a new issue #2313: Connector: JDBC Connector (Sink)
URL: https://github.com/apache/incubator-pulsar/issues/2313
 
 
   create a JDBC sink connector.


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