[GitHub] jai1 closed pull request #1225: Enable specification of TLS Protocol Versions and Cipher Suites

2018-02-12 Thread GitBox
jai1 closed pull request #1225: Enable specification of TLS Protocol Versions 
and Cipher Suites
URL: https://github.com/apache/incubator-pulsar/pull/1225
 
 
   

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-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
index de27fd9db..e9309e01b 100644
--- 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
+++ 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
@@ -179,7 +179,13 @@
 private String tlsTrustCertsFilePath = "";
 // Accept untrusted TLS certificate from client
 private boolean tlsAllowInsecureConnection = false;
-
+// Specify the tls protocols the broker will use to negotiate during TLS 
Handshake.
+// Example:- [TLSv1.2, TLSv1.1, TLSv1]
+private Set tlsProtocols = Sets.newTreeSet();
+// Specify the tls cipher the broker will use to negotiate during TLS 
Handshake.
+// Example:- [TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]
+private Set tlsCiphers = Sets.newTreeSet();
+
 /* --- Authentication --- /
 // Enable authentication
 private boolean authenticationEnabled = false;
@@ -1389,4 +1395,20 @@ public boolean authenticateOriginalAuthData() {
 public void setAuthenticateOriginalAuthData(boolean 
authenticateOriginalAuthData) {
 this.authenticateOriginalAuthData = authenticateOriginalAuthData;
 }
+
+public Set getTlsProtocols() {
+return tlsProtocols;
+}
+
+public void setTlsProtocols(Set tlsProtocols) {
+this.tlsProtocols = tlsProtocols;
+}
+
+public Set getTlsCiphers() {
+return tlsCiphers;
+}
+
+public void setTlsCiphers(Set tlsCiphers) {
+this.tlsCiphers = tlsCiphers;
+}
 }
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java
index da10a2df7..f77c6e6a6 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java
@@ -50,7 +50,10 @@ public PulsarChannelInitializer(BrokerService brokerService, 
ServiceConfiguratio
 @Override
 protected void initChannel(SocketChannel ch) throws Exception {
 if (enableTLS) {
-SslContext sslCtx = 
SecurityUtility.createNettySslContextForServer(serviceConfig.isTlsAllowInsecureConnection(),
 serviceConfig.getTlsTrustCertsFilePath(), 
serviceConfig.getTlsCertificateFilePath(), serviceConfig.getTlsKeyFilePath());
+SslContext sslCtx = SecurityUtility.createNettySslContextForServer(
+serviceConfig.isTlsAllowInsecureConnection(), 
serviceConfig.getTlsTrustCertsFilePath(),
+serviceConfig.getTlsCertificateFilePath(), 
serviceConfig.getTlsKeyFilePath(),
+serviceConfig.getTlsCiphers(), 
serviceConfig.getTlsProtocols());
 ch.pipeline().addLast(TLS_HANDLER, sslCtx.newHandler(ch.alloc()));
 }
 
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java
index c23d726db..088241f9d 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java
@@ -249,13 +249,13 @@ public void close() {
 }
 };
 
-public static void retryStrategically(Predicate predicate, int 
retryCount, long intSleepTime)
+public static void retryStrategically(Predicate predicate, int 
retryCount, long intSleepTimeInMillis)
 throws Exception {
 for (int i = 0; i < retryCount; i++) {
 if (predicate.test(null) || i == (retryCount - 1)) {
 break;
 }
-Thread.sleep(intSleepTime + (intSleepTime * i));
+Thread.sleep(intSleepTimeInMillis + (intSleepTimeInMillis * i));
 }
 }
 
diff --git 
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java 
b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
index 38e96edd4..ff1b5f34c 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
@@ -564,6 +564,10 @@ private boolean verifyTlsHostName(String hostname, 
ChannelHandlerContext ctx) {
   

[incubator-pulsar] branch master updated: Enable specification of TLS Protocol Versions and Cipher Suites (#1225)

2018-02-12 Thread jai1
This is an automated email from the ASF dual-hosted git repository.

jai1 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 b990674  Enable specification of TLS Protocol Versions and Cipher 
Suites (#1225)
b990674 is described below

commit b99067479ebca5f955c936d396e72cd7eda09095
Author: Jai Asher 
AuthorDate: Mon Feb 12 20:57:58 2018 -0800

Enable specification of TLS Protocol Versions and Cipher Suites (#1225)
---
 .../apache/pulsar/broker/ServiceConfiguration.java |  24 +++-
 .../broker/service/PulsarChannelInitializer.java   |   5 +-
 .../broker/auth/MockedPulsarServiceBaseTest.java   |   4 +-
 .../org/apache/pulsar/client/impl/ClientCnx.java   |   4 +
 .../apache/pulsar/common/util/SecurityUtility.java |  13 +-
 .../service/ServiceChannelInitializer.java |   3 +-
 .../discovery/service/server/ServiceConfig.java|  24 +++-
 .../pulsar/proxy/server/ProxyConfiguration.java|  24 +++-
 .../proxy/server/ServiceChannelInitializer.java|   2 +-
 .../server/ProxyWithProxyAuthorizationTest.java| 146 -
 10 files changed, 234 insertions(+), 15 deletions(-)

diff --git 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
index 74077f4..fcd9a92 100644
--- 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
+++ 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
@@ -180,7 +180,13 @@ public class ServiceConfiguration implements 
PulsarConfiguration {
 private String tlsTrustCertsFilePath = "";
 // Accept untrusted TLS certificate from client
 private boolean tlsAllowInsecureConnection = false;
-
+// Specify the tls protocols the broker will use to negotiate during TLS 
Handshake.
+// Example:- [TLSv1.2, TLSv1.1, TLSv1]
+private Set tlsProtocols = Sets.newTreeSet();
+// Specify the tls cipher the broker will use to negotiate during TLS 
Handshake.
+// Example:- [TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]
+private Set tlsCiphers = Sets.newTreeSet();
+
 /* --- Authentication --- /
 // Enable authentication
 private boolean authenticationEnabled = false;
@@ -1400,4 +1406,20 @@ public class ServiceConfiguration implements 
PulsarConfiguration {
 public void setAuthenticateOriginalAuthData(boolean 
authenticateOriginalAuthData) {
 this.authenticateOriginalAuthData = authenticateOriginalAuthData;
 }
+
+public Set getTlsProtocols() {
+return tlsProtocols;
+}
+
+public void setTlsProtocols(Set tlsProtocols) {
+this.tlsProtocols = tlsProtocols;
+}
+
+public Set getTlsCiphers() {
+return tlsCiphers;
+}
+
+public void setTlsCiphers(Set tlsCiphers) {
+this.tlsCiphers = tlsCiphers;
+}
 }
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java
index da10a2d..f77c6e6 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java
@@ -50,7 +50,10 @@ public class PulsarChannelInitializer extends 
ChannelInitializer
 @Override
 protected void initChannel(SocketChannel ch) throws Exception {
 if (enableTLS) {
-SslContext sslCtx = 
SecurityUtility.createNettySslContextForServer(serviceConfig.isTlsAllowInsecureConnection(),
 serviceConfig.getTlsTrustCertsFilePath(), 
serviceConfig.getTlsCertificateFilePath(), serviceConfig.getTlsKeyFilePath());
+SslContext sslCtx = SecurityUtility.createNettySslContextForServer(
+serviceConfig.isTlsAllowInsecureConnection(), 
serviceConfig.getTlsTrustCertsFilePath(),
+serviceConfig.getTlsCertificateFilePath(), 
serviceConfig.getTlsKeyFilePath(),
+serviceConfig.getTlsCiphers(), 
serviceConfig.getTlsProtocols());
 ch.pipeline().addLast(TLS_HANDLER, sslCtx.newHandler(ch.alloc()));
 }
 
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java
index 75b91c1..51a4c03 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java
@@ -253,13 +253,13 @@ public abstract class MockedPulsarServiceBaseTest {
 }
 };
 
-public static void retryStrategically(Predicate predicate, int 
retryCount, long 

[incubator-pulsar] branch master updated: Regenerated the PulsarApi from proto with latest protoc (#1227)

2018-02-12 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 7dd64d0  Regenerated the PulsarApi from proto with latest protoc 
(#1227)
7dd64d0 is described below

commit 7dd64d072060c7ccadcc9ff747ace3658be1584f
Author: Matteo Merli 
AuthorDate: Mon Feb 12 20:31:01 2018 -0800

Regenerated the PulsarApi from proto with latest protoc (#1227)
---
 .../apache/pulsar/common/api/proto/PulsarApi.java  | 680 +++--
 1 file changed, 374 insertions(+), 306 deletions(-)

diff --git 
a/pulsar-common/src/main/java/org/apache/pulsar/common/api/proto/PulsarApi.java 
b/pulsar-common/src/main/java/org/apache/pulsar/common/api/proto/PulsarApi.java
index 6bbe77e..2c13125 100644
--- 
a/pulsar-common/src/main/java/org/apache/pulsar/common/api/proto/PulsarApi.java
+++ 
b/pulsar-common/src/main/java/org/apache/pulsar/common/api/proto/PulsarApi.java
@@ -279,13 +279,13 @@ public final class PulsarApi {
   com.google.protobuf.GeneratedMessageLite
   implements MessageIdDataOrBuilder, 
org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream.ByteBufGeneratedMessage
  {
 // Use MessageIdData.newBuilder() to construct.
-private io.netty.util.Recycler.Handle handle;
-private MessageIdData(io.netty.util.Recycler.Handle handle) {
+private final io.netty.util.Recycler.Handle handle;
+private MessageIdData(io.netty.util.Recycler.Handle handle) 
{
   this.handle = handle;
 }
 
  private static final io.netty.util.Recycler RECYCLER = new 
io.netty.util.Recycler() {
-protected MessageIdData newObject(Handle handle) {
+protected MessageIdData newObject(Handle handle) {
   return new MessageIdData(handle);
 }
   };
@@ -295,10 +295,12 @@ public final class PulsarApi {
 this.memoizedIsInitialized = -1;
 this.bitField0_ = 0;
 this.memoizedSerializedSize = -1;
-if (handle != null) { RECYCLER.recycle(this, handle); }
+handle.recycle(this);
 }
  
-private MessageIdData(boolean noInit) {}
+private MessageIdData(boolean noInit) {
+this.handle = null;
+}
 
 private static final MessageIdData defaultInstance;
 public static MessageIdData getDefaultInstance() {
@@ -506,20 +508,20 @@ public final class PulsarApi {
   org.apache.pulsar.common.api.proto.PulsarApi.MessageIdData, Builder>
 implements 
org.apache.pulsar.common.api.proto.PulsarApi.MessageIdDataOrBuilder, 
org.apache.pulsar.common.util.protobuf.ByteBufCodedInputStream.ByteBufMessageBuilder
  {
   // Construct using 
org.apache.pulsar.common.api.proto.PulsarApi.MessageIdData.newBuilder()
-  private final io.netty.util.Recycler.Handle handle;
-  private Builder(io.netty.util.Recycler.Handle handle) {
+  private final io.netty.util.Recycler.Handle handle;
+  private Builder(io.netty.util.Recycler.Handle handle) {
 this.handle = handle;
 maybeForceBuilderInitialization();
   }
   private final static io.netty.util.Recycler RECYCLER = new 
io.netty.util.Recycler() {
- protected Builder newObject(io.netty.util.Recycler.Handle handle) {
+ protected Builder newObject(io.netty.util.Recycler.Handle 
handle) {
return new Builder(handle);
  }
 };
   
public void recycle() {
 clear();
-if (handle != null) {RECYCLER.recycle(this, handle);}
+handle.recycle(this);
 }
   
   private void maybeForceBuilderInitialization() {
@@ -778,13 +780,13 @@ public final class PulsarApi {
   com.google.protobuf.GeneratedMessageLite
   implements KeyValueOrBuilder, 
org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream.ByteBufGeneratedMessage
  {
 // Use KeyValue.newBuilder() to construct.
-private io.netty.util.Recycler.Handle handle;
-private KeyValue(io.netty.util.Recycler.Handle handle) {
+private final io.netty.util.Recycler.Handle handle;
+private KeyValue(io.netty.util.Recycler.Handle handle) {
   this.handle = handle;
 }
 
  private static final io.netty.util.Recycler RECYCLER = new 
io.netty.util.Recycler() {
-protected KeyValue newObject(Handle handle) {
+protected KeyValue newObject(Handle handle) {
   return new KeyValue(handle);
 }
   };
@@ -794,10 +796,12 @@ public final class PulsarApi {
 this.memoizedIsInitialized = -1;
 this.bitField0_ = 0;
 this.memoizedSerializedSize = -1;
-if (handle != null) { RECYCLER.recycle(this, handle); }
+handle.recycle(this);
 }
  
-private KeyValue(boolean 

[GitHub] merlimat closed pull request #1227: Regenerated the PulsarApi from proto with latest protoc

2018-02-12 Thread GitBox
merlimat closed pull request #1227: Regenerated the PulsarApi from proto with 
latest protoc
URL: https://github.com/apache/incubator-pulsar/pull/1227
 
 
   

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-common/src/main/java/org/apache/pulsar/common/api/proto/PulsarApi.java 
b/pulsar-common/src/main/java/org/apache/pulsar/common/api/proto/PulsarApi.java
index 6bbe77e1d..2c131251d 100644
--- 
a/pulsar-common/src/main/java/org/apache/pulsar/common/api/proto/PulsarApi.java
+++ 
b/pulsar-common/src/main/java/org/apache/pulsar/common/api/proto/PulsarApi.java
@@ -279,13 +279,13 @@ private ProtocolVersion(int index, int value) {
   com.google.protobuf.GeneratedMessageLite
   implements MessageIdDataOrBuilder, 
org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream.ByteBufGeneratedMessage
  {
 // Use MessageIdData.newBuilder() to construct.
-private io.netty.util.Recycler.Handle handle;
-private MessageIdData(io.netty.util.Recycler.Handle handle) {
+private final io.netty.util.Recycler.Handle handle;
+private MessageIdData(io.netty.util.Recycler.Handle handle) 
{
   this.handle = handle;
 }
 
  private static final io.netty.util.Recycler RECYCLER = new 
io.netty.util.Recycler() {
-protected MessageIdData newObject(Handle handle) {
+protected MessageIdData newObject(Handle handle) {
   return new MessageIdData(handle);
 }
   };
@@ -295,10 +295,12 @@ public void recycle() {
 this.memoizedIsInitialized = -1;
 this.bitField0_ = 0;
 this.memoizedSerializedSize = -1;
-if (handle != null) { RECYCLER.recycle(this, handle); }
+handle.recycle(this);
 }
  
-private MessageIdData(boolean noInit) {}
+private MessageIdData(boolean noInit) {
+this.handle = null;
+}
 
 private static final MessageIdData defaultInstance;
 public static MessageIdData getDefaultInstance() {
@@ -506,20 +508,20 @@ public static Builder 
newBuilder(org.apache.pulsar.common.api.proto.PulsarApi.Me
   org.apache.pulsar.common.api.proto.PulsarApi.MessageIdData, Builder>
 implements 
org.apache.pulsar.common.api.proto.PulsarApi.MessageIdDataOrBuilder, 
org.apache.pulsar.common.util.protobuf.ByteBufCodedInputStream.ByteBufMessageBuilder
  {
   // Construct using 
org.apache.pulsar.common.api.proto.PulsarApi.MessageIdData.newBuilder()
-  private final io.netty.util.Recycler.Handle handle;
-  private Builder(io.netty.util.Recycler.Handle handle) {
+  private final io.netty.util.Recycler.Handle handle;
+  private Builder(io.netty.util.Recycler.Handle handle) {
 this.handle = handle;
 maybeForceBuilderInitialization();
   }
   private final static io.netty.util.Recycler RECYCLER = new 
io.netty.util.Recycler() {
- protected Builder newObject(io.netty.util.Recycler.Handle handle) {
+ protected Builder newObject(io.netty.util.Recycler.Handle 
handle) {
return new Builder(handle);
  }
 };
   
public void recycle() {
 clear();
-if (handle != null) {RECYCLER.recycle(this, handle);}
+handle.recycle(this);
 }
   
   private void maybeForceBuilderInitialization() {
@@ -778,13 +780,13 @@ public Builder clearBatchIndex() {
   com.google.protobuf.GeneratedMessageLite
   implements KeyValueOrBuilder, 
org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream.ByteBufGeneratedMessage
  {
 // Use KeyValue.newBuilder() to construct.
-private io.netty.util.Recycler.Handle handle;
-private KeyValue(io.netty.util.Recycler.Handle handle) {
+private final io.netty.util.Recycler.Handle handle;
+private KeyValue(io.netty.util.Recycler.Handle handle) {
   this.handle = handle;
 }
 
  private static final io.netty.util.Recycler RECYCLER = new 
io.netty.util.Recycler() {
-protected KeyValue newObject(Handle handle) {
+protected KeyValue newObject(Handle handle) {
   return new KeyValue(handle);
 }
   };
@@ -794,10 +796,12 @@ public void recycle() {
 this.memoizedIsInitialized = -1;
 this.bitField0_ = 0;
 this.memoizedSerializedSize = -1;
-if (handle != null) { RECYCLER.recycle(this, handle); }
+handle.recycle(this);
 }
  
-private KeyValue(boolean noInit) {}
+private KeyValue(boolean noInit) {
+this.handle = null;
+}
 
 private static final KeyValue defaultInstance;
 public static KeyValue getDefaultInstance() {
@@ -1013,20 

[incubator-pulsar] annotated tag v1.22.0-incubating-candidate-0 updated (9d99dd3 -> e5e3459)

2018-02-12 Thread jai1
This is an automated email from the ASF dual-hosted git repository.

jai1 pushed a change to annotated tag v1.22.0-incubating-candidate-0
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git.


*** WARNING: tag v1.22.0-incubating-candidate-0 was modified! ***

from 9d99dd3  (commit)
  to e5e3459  (tag)
 tagging 9d99dd324e5b652e858be31d156d46d8f9afa132 (commit)
  by jai1
  on Mon Feb 12 20:15:58 2018 -0800

- Log -
Release v1.22.0-incubating-candidate-0
-BEGIN PGP SIGNATURE-

iQJEBAABCAAuFiEEDQCP4t9TLRC/fG0se6GmTLvBFOwFAlqCZn4QHGphaTFAYXBh
Y2hlLm9yZwAKCRB7oaZMu8EU7EUcD/4iTomDj/RMJVwdV26Pgs+7aG2ZrmMiPyux
EPoK7g7VojExrNFUbHiXkQqWMSLNgQ3NnUKDmJQY1ApeB/O1IqqobMZDhy/DPAR5
0ehaM9uj3gQa7G8KRZjKRKxXLGXBTkzghZcofrXCXVtBHZki2J6bFTAu1mV5FniP
5as1ZHtnghIE0FCQm3OsFFDOZLD2ef783dzqQ/hbLF80ZRyebaHt9hLR3+35h1Wj
XlCE00zzd4HmhUjhwAVr2EgKGXvdj6+PAcgZUtNYaT3FwJEyVaQf6Ue1LvKhpBIc
hbqwszU9xThJ4+3zMKlX4GRHU9m2vO9XsdtCnPSXaG9qxqbFikPIgezxRXqzh/+f
EOABKfXUs65M6Co8biyAMN6dZMOjVsSlJC1bgtusGSA6HibOaL78TpT9w5vxbxZx
y4Z9Esk+JqUmj5/UHynX2x/Ye1VPBBF3CY9XeAlUfknCFTP8jGm5O2Q+03YIjygI
u6tlk1YRZRI/iHg/wDpJlr3IqpL8on9OYebgwcEEqUaY9jxqsI32A6crnGf8YwuA
WZofu/dzL4UyrO0XfqnFbF2xDfihl+Uw9T7TzS3CHjfD8q0OlkqJGTDTdSl4xh4S
HDkwvZx8iBpprACon41JJ2RW+fvicQfKZG+V+41pDziI/3ETiIqSOBpJmmWPFEbQ
l2e+6Oopsw==
=/XVj
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:

-- 
To stop receiving notification emails like this one, please contact
j...@apache.org.


[incubator-pulsar] branch branch-1.22 updated: Release 1.22.0-incubating

2018-02-12 Thread jai1
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/branch-1.22 by this push:
 new 9d99dd3  Release 1.22.0-incubating
9d99dd3 is described below

commit 9d99dd324e5b652e858be31d156d46d8f9afa132
Author: jai1 
AuthorDate: Mon Feb 12 20:14:04 2018 -0800

Release 1.22.0-incubating
---
 all/pom.xml  | 2 +-
 buildtools/pom.xml   | 2 +-
 managed-ledger/pom.xml   | 2 +-
 pom.xml  | 2 +-
 pulsar-broker-auth-athenz/pom.xml| 2 +-
 pulsar-broker-common/pom.xml | 2 +-
 pulsar-broker-shaded/pom.xml | 2 +-
 pulsar-broker/pom.xml| 2 +-
 pulsar-checksum/pom.xml  | 2 +-
 pulsar-client-admin-shaded/pom.xml   | 2 +-
 pulsar-client-admin/pom.xml  | 2 +-
 pulsar-client-auth-athenz/pom.xml| 2 +-
 pulsar-client-kafka-compat/pom.xml   | 2 +-
 pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml | 2 +-
 pulsar-client-kafka-compat/pulsar-client-kafka/pom.xml   | 2 +-
 pulsar-client-shaded/pom.xml | 2 +-
 pulsar-client-tools/pom.xml  | 2 +-
 pulsar-client/pom.xml| 2 +-
 pulsar-common/pom.xml| 2 +-
 pulsar-discovery-service/pom.xml | 2 +-
 pulsar-proxy/pom.xml | 2 +-
 pulsar-spark/pom.xml | 2 +-
 pulsar-storm/pom.xml | 2 +-
 pulsar-testclient/pom.xml| 2 +-
 pulsar-websocket/pom.xml | 2 +-
 pulsar-zookeeper-utils/pom.xml   | 2 +-
 pulsar-zookeeper/pom.xml | 2 +-
 27 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/all/pom.xml b/all/pom.xml
index d7c2c98..4283f55 100644
--- a/all/pom.xml
+++ b/all/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.pulsar
 pulsar
-1.22.0-incubating-SNAPSHOT
+1.22.0-incubating
 ..
   
 
diff --git a/buildtools/pom.xml b/buildtools/pom.xml
index fc75fe7..11a3bd9 100644
--- a/buildtools/pom.xml
+++ b/buildtools/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.pulsar
 pulsar
-1.22.0-incubating-SNAPSHOT
+1.22.0-incubating
 ..
   
 
diff --git a/managed-ledger/pom.xml b/managed-ledger/pom.xml
index 34a0792..0cdff4a 100644
--- a/managed-ledger/pom.xml
+++ b/managed-ledger/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.pulsar
 pulsar
-1.22.0-incubating-SNAPSHOT
+1.22.0-incubating
 ..
   
 
diff --git a/pom.xml b/pom.xml
index 7320661..b4e63d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
   org.apache.pulsar
   pulsar
 
-  1.22.0-incubating-SNAPSHOT
+  1.22.0-incubating
 
   Pulsar
   Pulsar is a distributed pub-sub messaging platform with a very
diff --git a/pulsar-broker-auth-athenz/pom.xml 
b/pulsar-broker-auth-athenz/pom.xml
index 80c22be..0e5f6b1 100644
--- a/pulsar-broker-auth-athenz/pom.xml
+++ b/pulsar-broker-auth-athenz/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.pulsar
 pulsar
-1.22.0-incubating-SNAPSHOT
+1.22.0-incubating
   
 
   pulsar-broker-auth-athenz
diff --git a/pulsar-broker-common/pom.xml b/pulsar-broker-common/pom.xml
index 7a1d356..b65323f 100644
--- a/pulsar-broker-common/pom.xml
+++ b/pulsar-broker-common/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.pulsar
 pulsar
-1.22.0-incubating-SNAPSHOT
+1.22.0-incubating
   
 
   pulsar-broker-common
diff --git a/pulsar-broker-shaded/pom.xml b/pulsar-broker-shaded/pom.xml
index bda3037..5794983 100644
--- a/pulsar-broker-shaded/pom.xml
+++ b/pulsar-broker-shaded/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.pulsar
 pulsar
-1.22.0-incubating-SNAPSHOT
+1.22.0-incubating
 ..
   
 
diff --git a/pulsar-broker/pom.xml b/pulsar-broker/pom.xml
index 9a703e0..f5c6528 100644
--- a/pulsar-broker/pom.xml
+++ b/pulsar-broker/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.pulsar
 pulsar
-1.22.0-incubating-SNAPSHOT
+1.22.0-incubating
 ..
   
 
diff --git a/pulsar-checksum/pom.xml b/pulsar-checksum/pom.xml
index da4f778..ff0a63a 100644
--- a/pulsar-checksum/pom.xml
+++ b/pulsar-checksum/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.pulsar
 pulsar
-1.22.0-incubating-SNAPSHOT
+1.22.0-incubating
 ..
   
 
diff --git a/pulsar-client-admin-shaded/pom.xml 

svn commit: r24991 - /release/incubator/pulsar/KEYS

2018-02-12 Thread jai1
Author: jai1
Date: Tue Feb 13 04:10:24 2018
New Revision: 24991

Log:
Added gpg key for jai1

Modified:
release/incubator/pulsar/KEYS

Modified: release/incubator/pulsar/KEYS
==
--- release/incubator/pulsar/KEYS (original)
+++ release/incubator/pulsar/KEYS Tue Feb 13 04:10:24 2018
@@ -379,62 +379,62 @@ Ef5D3zsz3YwR1SMS2ZsX4aHaXhbSRTKYY83x5n0/
 4R/eV1EOkAVSbS98fTm/LlrV
 =0XPv
 -END PGP PUBLIC KEY BLOCK-
-pub   rsa4096 2018-02-05 [SC]
-  E65D95481B789BB727A9795EAAFE89F7471BAE04
+pub   rsa4096 2018-02-13 [SC]
+  0D008FE2DF532D10BF7C6D2C7BA1A64CBBC114EC
 uid   [ultimate] Jai Asher (CODE SIGNING KEY) 
-sig 3AAFE89F7471BAE04 2018-02-05  Jai Asher (CODE SIGNING KEY) 

-sub   rsa4096 2018-02-05 [E]
-sig  AAFE89F7471BAE04 2018-02-05  Jai Asher (CODE SIGNING KEY) 

+sig 37BA1A64CBBC114EC 2018-02-13  Jai Asher (CODE SIGNING KEY) 

+sub   rsa4096 2018-02-13 [E]
+sig  7BA1A64CBBC114EC 2018-02-13  Jai Asher (CODE SIGNING KEY) 

 
 -BEGIN PGP PUBLIC KEY BLOCK-
 
-mQINBFp3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qO4XKCrKTXeK9v0A
-joQLEHixoSoYMq7tke1Lph1/DY2PIzoYjvdu/ArfFBjZXsCy3BoEkN0SCIFfT1+x
-qDQkjvOAMK1bY/AFZRy0ActgVTmZV4uwSV8KzXEayPM8jN9Un2eyYD4jghAqI35X
-sfPmUVoajWIHXXFFDDBDcoagNP7Hw5kC3KSkQfUkOb8kQy7S9gEsufgHxF18ZNuY
-kNgsWsimeDfHKpXx2qxpa1SW3HRfuHjGUreGB/GlSzWGWx2ruIuq8ttKYbVcWypG
-P0ZaSgY5+0CPhti0s6aciq27iRbYlN1Y8Tt8ywAHikubqF1STXP7hSt1Swt6rCil
-ik+cUuc2GUCQ0/9DLuxk0cINygdV49QpMJqTEbAvGW3kHMO0Q1Fu+sBpK6HdScQg
-MwWLLaaYnyEckLv84IyznCtMEEd/DupcO2lLHMAXQjKhFxlRiKndS9AYUSyz/QZd
-1B/JE/P4Thcg0jgdQSq4k3yMxjbXe2ahvTBmigwKw/Cklppzl42Jk1AoHigmPI/e

svn commit: r24990 - /dev/incubator/pulsar/KEYS

2018-02-12 Thread jai1
Author: jai1
Date: Tue Feb 13 04:09:43 2018
New Revision: 24990

Log:
Replaced gpg key for jai1

Modified:
dev/incubator/pulsar/KEYS

Modified: dev/incubator/pulsar/KEYS
==
--- dev/incubator/pulsar/KEYS (original)
+++ dev/incubator/pulsar/KEYS Tue Feb 13 04:09:43 2018
@@ -380,13 +380,6 @@ Ef5D3zsz3YwR1SMS2ZsX4aHaXhbSRTKYY83x5n0/
 4R/eV1EOkAVSbS98fTm/LlrV
 =0XPv
 -END PGP PUBLIC KEY BLOCK-
-pub   rsa4096 2018-02-05 [SC]
-  E65D95481B789BB727A9795EAAFE89F7471BAE04
-uid   [ultimate] Jai Asher (CODE SIGNING KEY) 
-sig 3AAFE89F7471BAE04 2018-02-05  Jai Asher (CODE SIGNING KEY) 

-sub   rsa4096 2018-02-05 [E]
-sig  AAFE89F7471BAE04 2018-02-05  Jai Asher (CODE SIGNING KEY) 

-
 pub   rsa4096 2018-02-13 [SC]
   0D008FE2DF532D10BF7C6D2C7BA1A64CBBC114EC
 uid   [ultimate] Jai Asher (CODE SIGNING KEY) 
@@ -396,100 +389,53 @@ sig  7BA1A64CBBC114EC 2018-02-13
 
 -BEGIN PGP PUBLIC KEY BLOCK-
 
-mQINBFp3864BEADJ0p2M664orJ2Q40Ee0t5VQFTW0/FtyaEPBvmDqLQV6rcoZYgq
-mhehMPgjGbMSQ3KTYhEqQovPbXh/zdsXIkfNKErt793/DekjVgGxL3j8sfzmYseo
-eCIKYofGTHDL3dw5mQ7PzEmerNofNTh/NeooPIfreA0r7guvwlhCAGzlB5YJR7+F
-Th+hz9kz+9URMH/Bd4/ZOhobIR1rPe/Ynost+pwT2H7aAIopZ3qH3rr+lbq6Iece
-mfxurkvwqSxtd5uatz4ifeJmU60EJ71y43y3oFlYOl32Z1kJfYP3cj3aPYR3cmLT
-0VmhoNNI97OogRj5FqYLBMP4aIcRW0YHqKgQ7GsWgTeQ+BxEG0TvWz1RcrVUtGMZ
-MfySY9E05R1aolaQNMk2h4mS/R2sDF2efAvBCQx7gwY1v2ORsCcqSBS6S9sRLyO1
-e71mh9TlDJevM5a9RtjigJb6dsF+wYCQ0BdtI8A2xN/c0QhrkeSDt2/Qf9iBkpi3
-irswwc93VwRAWRszXpCk2HdDqJN4X22GRQaFELlZvN8pzPU05rGbfzO73ZtfmTRZ
-o7C+hINOAq31+H6p9KnQ8RFh6CC4FAP/tP22JODp7jK7yBt1G4/53bdvFbbgYzf/
-vxhbbQtHrntoXT76DpvfFwdAJyBcIgCWvtrRco3DNqK2Zl6hUfKIJV4HIQARAQAB
+mQINBFqCX9MBEADR+/hSQOjmFf/luet05/WSwo24T533ltj2RGRu21DbD9ZmT1zd
+IQx1xN8D2BNFvZc+iB9yGASEdAnMZLWKAku4UcZSGaI4e08Pedv7eplEuqKWKe7Q
+GgFWCcQ09ZABqboO6cw/+oQqNuiTkrlYIiuCl2DvjZ1SmRucjtNpGj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vFPf5qCrABEBAAGJAjYEGAEIACAWIQTmXZVIG3ibtyepeV6q/on3Rxuu
-BAUCWnfzrgIbDAAKCRCq/on3RxuuBKiiD/99GsXHeCwbgZHuRK0rckMjVu+nU96D
-4wjHTQiZ6tKtEbrDGwBnVrEUD0B0Bs3M9Bs2E4NU2Yf24Yx9qO4XKCrKTXeK9v0A
-joQLEHixoSoYMq7tke1Lph1/DY2PIzoYjvdu/ArfFBjZXsCy3BoEkN0SCIFfT1+x
-qDQkjvOAMK1bY/AFZRy0ActgVTmZV4uwSV8KzXEayPM8jN9Un2eyYD4jghAqI35X
-sfPmUVoajWIHXXFFDDBDcoagNP7Hw5kC3KSkQfUkOb8kQy7S9gEsufgHxF18ZNuY
-kNgsWsimeDfHKpXx2qxpa1SW3HRfuHjGUreGB/GlSzWGWx2ruIuq8ttKYbVcWypG
-P0ZaSgY5+0CPhti0s6aciq27iRbYlN1Y8Tt8ywAHikubqF1STXP7hSt1Swt6rCil
-ik+cUuc2GUCQ0/9DLuxk0cINygdV49QpMJqTEbAvGW3kHMO0Q1Fu+sBpK6HdScQg
-MwWLLaaYnyEckLv84IyznCtMEEd/DupcO2lLHMAXQjKhFxlRiKndS9AYUSyz/QZd
-1B/JE/P4Thcg0jgdQSq4k3yMxjbXe2ahvTBmigwKw/Cklppzl42Jk1AoHigmPI/e
-qTz5OQeBe5jlFFbL0APLRz4Xoy7Kc/xW3ES4wp5Y1Svo+nSaPHPTioHkXFZs92x8
-8s7lT8GGT3K90ZkCDQRagl/TARAA0fv4UkDo5hX/5bnrdOf1ksKNuE+d95bY9kRk

svn commit: r24989 - /dev/incubator/pulsar/KEYS

2018-02-12 Thread jai1
Author: jai1
Date: Tue Feb 13 04:06:25 2018
New Revision: 24989

Log:
Replaced gpg key for jai1

Modified:
dev/incubator/pulsar/KEYS

Modified: dev/incubator/pulsar/KEYS
==
--- dev/incubator/pulsar/KEYS (original)
+++ dev/incubator/pulsar/KEYS Tue Feb 13 04:06:25 2018
@@ -387,6 +387,13 @@ sig 3AAFE89F7471BAE04 2018-02-05
 sub   rsa4096 2018-02-05 [E]
 sig  AAFE89F7471BAE04 2018-02-05  Jai Asher (CODE SIGNING KEY) 

 
+pub   rsa4096 2018-02-13 [SC]
+  0D008FE2DF532D10BF7C6D2C7BA1A64CBBC114EC
+uid   [ultimate] Jai Asher (CODE SIGNING KEY) 
+sig 37BA1A64CBBC114EC 2018-02-13  Jai Asher (CODE SIGNING KEY) 

+sub   rsa4096 2018-02-13 [E]
+sig  7BA1A64CBBC114EC 2018-02-13  Jai Asher (CODE SIGNING KEY) 

+
 -BEGIN PGP PUBLIC KEY BLOCK-
 
 mQINBFp3864BEADJ0p2M664orJ2Q40Ee0t5VQFTW0/FtyaEPBvmDqLQV6rcoZYgq
@@ -436,6 +443,53 @@ ik+cUuc2GUCQ0/9DLuxk0cINygdV49QpMJqTEbAv
 MwWLLaaYnyEckLv84IyznCtMEEd/DupcO2lLHMAXQjKhFxlRiKndS9AYUSyz/QZd
 1B/JE/P4Thcg0jgdQSq4k3yMxjbXe2ahvTBmigwKw/Cklppzl42Jk1AoHigmPI/e
 qTz5OQeBe5jlFFbL0APLRz4Xoy7Kc/xW3ES4wp5Y1Svo+nSaPHPTioHkXFZs92x8
-8s7lT8GGT3K90Q==
-=y+ns
+8s7lT8GGT3K90ZkCDQRagl/TARAA0fv4UkDo5hX/5bnrdOf1ksKNuE+d95bY9kRk
+bttQ2w/WZk9c3SEMdcTfA9gTRb2XPogfchgEhHQJzGS1igJLuFHGUhmiOHtPD3nb
++3qZRLqilinu0BoBVgnENPWQAam6DunMP/qEKjbok5K5WCIrgpdg742dUpkbnI7T
+aRo9TH4dZpN2KjiQRSNQPWAYfQ7Il4z3nI8PM0M3Twp7vZxGv1e9jdHOP69L2G07
+d6s92Hmk0gvMnZlleAchAVV1oSj5mZ8SaArKoLjgoGb1ffuADXew2MxTzWpyXON5
+X/2QisgD5O4kvnnv29494LBQCuWKHBhOUF2118B2TmoxxowGUXPt3q8Z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bnz/UffB+oF8ktoVXCdBNkRL8zT+V7hBcA+pwLHYyys/TrqWMU+SDOyMoU5X
+KKlourl7+yjXr2xb/mCAco+XjyysdSWAKT8qx3TeybnAGyFas+bNohCNdzdTeSbF
+bhicuySCszgrFRtyQED6dnreFTqqe3HSrkJswk8yGJmRi0XDCtFtlXNw74EKbJNs
+CfSBE3CTwHdVRIAQfeRAEY+nyU2HTuWDmPDscLMNipGRvwqmmNuPAnBwqJhq3k0s
+jeYCoP/p1DAwJCOVZdR1TshaIkZZbB/oncSMA/fmq1XVfN2zRCnaUmQ0tkFwBoyl
+9l18WAvfrfT2JciqAW4ZVaVE8f5wYnLlNDfoETUusAyhjjYBMCDjiYyOX5Fg6Lw7
+CYTzcmwkpvBw2mwWAlRyokAJDbVyW8elE5JcrXW+g0GYB5mc5v27+xSNVsbX0kCN
+y27r6sP7mmyiFE0slYoqf+S5+SHYT0Zxdh8nv0aQ//4U6mNESQv35iQaiFf7WTI6
+eRBD60O/IJZ+w0jklQ1yKrTgEzGclOhWMW8x7mwv/z++AAU70pGrLeYZpwGbckTD
+yu3ojTS7qC6iUe+Me4f+5oxTSpY=
+=mB+g
 -END PGP PUBLIC KEY BLOCK-




[GitHub] rdhabalia commented on issue #1228: Force to pull docker build image to regenerate PulsarApi.java generat?

2018-02-12 Thread GitBox
rdhabalia commented on issue #1228: Force to pull docker build image to 
regenerate PulsarApi.java generat?
URL: https://github.com/apache/incubator-pulsar/pull/1228#issuecomment-365134612
 
 
   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] rdhabalia commented on issue #1228: Force to pull docker build image to regenerate PulsarApi.java generat?

2018-02-12 Thread GitBox
rdhabalia commented on issue #1228: Force to pull docker build image to 
regenerate PulsarApi.java generat?
URL: https://github.com/apache/incubator-pulsar/pull/1228#issuecomment-365134612
 
 
   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] rdhabalia commented on issue #1226: Bumped master to 2.0.0-incubating-SNAPSHOT

2018-02-12 Thread GitBox
rdhabalia commented on issue #1226: Bumped master to 2.0.0-incubating-SNAPSHOT
URL: https://github.com/apache/incubator-pulsar/pull/1226#issuecomment-365134503
 
 
   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] rdhabalia commented on issue #1227: Regenerated the PulsarApi from proto with latest protoc

2018-02-12 Thread GitBox
rdhabalia commented on issue #1227: Regenerated the PulsarApi from proto with 
latest protoc
URL: https://github.com/apache/incubator-pulsar/pull/1227#issuecomment-365134556
 
 
   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] rdhabalia commented on issue #1226: Bumped master to 2.0.0-incubating-SNAPSHOT

2018-02-12 Thread GitBox
rdhabalia commented on issue #1226: Bumped master to 2.0.0-incubating-SNAPSHOT
URL: https://github.com/apache/incubator-pulsar/pull/1226#issuecomment-365134503
 
 
   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] rdhabalia commented on a change in pull request #1225: Enable specification of TLS Protocol Versions and Cipher Suites

2018-02-12 Thread GitBox
rdhabalia commented on a change in pull request #1225: Enable specification of 
TLS Protocol Versions and Cipher Suites
URL: https://github.com/apache/incubator-pulsar/pull/1225#discussion_r167724421
 
 

 ##
 File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java
 ##
 @@ -95,12 +97,22 @@ public static SslContext 
createNettySslContextForClient(boolean allowInsecureCon
 }
 
 public static SslContext createNettySslContextForServer(boolean 
allowInsecureConnection, String trustCertsFilePath,
-String certFilePath, String keyFilePath)
+String certFilePath, String keyFilePath, Set ciphers, 
Set protocols)
 throws GeneralSecurityException, SSLException, 
FileNotFoundException {
 X509Certificate[] certificates = 
loadCertificatesFromPemFile(certFilePath);
 PrivateKey privateKey = loadPrivateKeyFromPemFile(keyFilePath);
 
 SslContextBuilder builder = SslContextBuilder.forServer(privateKey, 
(X509Certificate[]) certificates);
+if (ciphers != null && ciphers.size() > 0) {
+builder.ciphers(ciphers);
+}
+
+if (protocols != null && protocols.size() > 0) {
+String[] protocolsArray = new String[protocols.size()];
 
 Review comment:
   `builder.protocols(Lists.newArrayList(protocols));` ??


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 #1225: Enable specification of TLS Protocol Versions and Cipher Suites

2018-02-12 Thread GitBox
rdhabalia commented on a change in pull request #1225: Enable specification of 
TLS Protocol Versions and Cipher Suites
URL: https://github.com/apache/incubator-pulsar/pull/1225#discussion_r167724421
 
 

 ##
 File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java
 ##
 @@ -95,12 +97,22 @@ public static SslContext 
createNettySslContextForClient(boolean allowInsecureCon
 }
 
 public static SslContext createNettySslContextForServer(boolean 
allowInsecureConnection, String trustCertsFilePath,
-String certFilePath, String keyFilePath)
+String certFilePath, String keyFilePath, Set ciphers, 
Set protocols)
 throws GeneralSecurityException, SSLException, 
FileNotFoundException {
 X509Certificate[] certificates = 
loadCertificatesFromPemFile(certFilePath);
 PrivateKey privateKey = loadPrivateKeyFromPemFile(keyFilePath);
 
 SslContextBuilder builder = SslContextBuilder.forServer(privateKey, 
(X509Certificate[]) certificates);
+if (ciphers != null && ciphers.size() > 0) {
+builder.ciphers(ciphers);
+}
+
+if (protocols != null && protocols.size() > 0) {
+String[] protocolsArray = new String[protocols.size()];
 
 Review comment:
   `builder.protocols(Lists.newArrayList(protocols));` ??


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 #1223: Add a `backend` admin restful endpoint for query backend information

2018-02-12 Thread GitBox
rdhabalia commented on issue #1223: Add a `backend` admin restful endpoint for 
query backend information
URL: https://github.com/apache/incubator-pulsar/pull/1223#issuecomment-365130333
 
 
   > I think the class name Backend and BackendData are ambiguous.
   
   or, we can use `InternalConfiguration/InternalData` instead of Backend 
because for topic's internal stats we use `internal-stats` term so, internal 
may give more meaning?


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] yush1ga commented on issue #1223: Add a `backend` admin restful endpoint for query backend information

2018-02-12 Thread GitBox
yush1ga commented on issue #1223: Add a `backend` admin restful endpoint for 
query backend information
URL: https://github.com/apache/incubator-pulsar/pull/1223#issuecomment-365129545
 
 
   I think the class name `Backend` and `BackendData` are ambiguous.
   As these handle only zookeeper's data, these should be named `zkBackendData` 
or something.


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] yush1ga commented on issue #1223: Add a `backend` admin restful endpoint for query backend information

2018-02-12 Thread GitBox
yush1ga commented on issue #1223: Add a `backend` admin restful endpoint for 
query backend information
URL: https://github.com/apache/incubator-pulsar/pull/1223#issuecomment-365129545
 
 
   I think the class name `Backend` and `BackendData` is ambiguous.
   As these handle only zookeeper's data, these should be named `zkBackendData` 
or something.


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 #1225: Enable specification of TLS Protocol Versions and Cipher Suites

2018-02-12 Thread GitBox
rdhabalia commented on a change in pull request #1225: Enable specification of 
TLS Protocol Versions and Cipher Suites
URL: https://github.com/apache/incubator-pulsar/pull/1225#discussion_r167744955
 
 

 ##
 File path: 
pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyWithProxyAuthorizationTest.java
 ##
 @@ -306,6 +360,79 @@ public void textTlsHostVerificationProxyToBroker(boolean 
hostnameVerificationEna
 log.info("-- Exiting {} test --", methodName);
 }
 
+/* 
+ * This test verifies whether the Client and Proxy honor the protocols and 
ciphers specified.
+ * Details description of test cases can be found in 
protocolsCiphersProviderCodecProvider
+ */
+@Test(dataProvider = "protocolsCiphersProvider")
+public void tlsCiphersAndProtocols(Set tlsCiphers, Set 
tlsProtocols, boolean expectFailure) throws Exception {
+log.info("-- Starting {} test --", methodName);
+String namespaceName = "my-property/proxy-authorization/my-ns";
+createAdminClient();
+
+admin.properties().createProperty("my-property",
+new PropertyAdmin(Lists.newArrayList("appid1", "appid2"), 
Sets.newHashSet("proxy-authorization")));
+admin.namespaces().createNamespace(namespaceName);
+
+admin.namespaces().grantPermissionOnNamespace(namespaceName, "Proxy",
+Sets.newHashSet(AuthAction.consume, AuthAction.produce));
+admin.namespaces().grantPermissionOnNamespace(namespaceName, "Client",
+Sets.newHashSet(AuthAction.consume, AuthAction.produce));
+
+ProxyConfiguration proxyConfig = new ProxyConfiguration();
+proxyConfig.setAuthenticationEnabled(true);
+proxyConfig.setAuthorizationEnabled(false);
+proxyConfig.setBrokerServiceURL("pulsar://localhost:" + BROKER_PORT);
+proxyConfig.setBrokerServiceURLTLS("pulsar://localhost:" + 
BROKER_PORT_TLS);
+
+proxyConfig.setServicePort(PortManager.nextFreePort());
+proxyConfig.setServicePortTls(PortManager.nextFreePort());
+proxyConfig.setWebServicePort(PortManager.nextFreePort());
+proxyConfig.setWebServicePortTls(PortManager.nextFreePort());
+proxyConfig.setTlsEnabledInProxy(true);
+proxyConfig.setTlsEnabledWithBroker(true);
+
+// enable tls and auth at proxy
+proxyConfig.setTlsCertificateFilePath(TLS_PROXY_CERT_FILE_PATH);
+proxyConfig.setTlsKeyFilePath(TLS_PROXY_KEY_FILE_PATH);
+proxyConfig.setTlsTrustCertsFilePath(TLS_PROXY_TRUST_CERT_FILE_PATH);
+
+
proxyConfig.setBrokerClientAuthenticationPlugin(AuthenticationTls.class.getName());
+proxyConfig.setBrokerClientAuthenticationParameters(
+"tlsCertFile:" + TLS_PROXY_CERT_FILE_PATH + "," + 
"tlsKeyFile:" + TLS_PROXY_KEY_FILE_PATH);
+
+Set providers = new HashSet<>();
+providers.add(AuthenticationProviderTls.class.getName());
+conf.setAuthenticationProviders(providers);
+proxyConfig.setAuthenticationProviders(providers);
+proxyConfig.setTlsProtocols(tlsProtocols);
+proxyConfig.setTlsCiphers(tlsCiphers);
+ProxyService proxyService = Mockito.spy(new ProxyService(proxyConfig));
+proxyService.start();
+Thread.sleep(1000);
 
 Review comment:
   umm..instead sleep can we check some condition until which we want to wait 
using 
`org.apache.pulsar.broker.auth.MockedPulsarServiceBaseTest.retryStrategically(..)`,
 it will help to avoid one more intermittent test failure. and we can also add 
test timeout=5Sec.


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] jai1 commented on a change in pull request #1225: Enable specification of TLS Protocol Versions and Cipher Suites

2018-02-12 Thread GitBox
jai1 commented on a change in pull request #1225: Enable specification of TLS 
Protocol Versions and Cipher Suites
URL: https://github.com/apache/incubator-pulsar/pull/1225#discussion_r167743242
 
 

 ##
 File path: 
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
 ##
 @@ -179,7 +179,10 @@
 private String tlsTrustCertsFilePath = "";
 // Accept untrusted TLS certificate from client
 private boolean tlsAllowInsecureConnection = false;
-
+// Specify the tls protocols and cipher the broker will use to negotiate 
during TLS Handshake.
 
 Review comment:
   Added


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] jai1 commented on issue #1225: Enable specification of TLS Protocol Versions and Cipher Suites

2018-02-12 Thread GitBox
jai1 commented on issue #1225: Enable specification of TLS Protocol Versions 
and Cipher Suites
URL: https://github.com/apache/incubator-pulsar/pull/1225#issuecomment-365127017
 
 
   @rdhabalia - Have addressed your comments and added Tests
   @merlimat - Have created a ticket for adding documentation - will do it 
tomorrow or so 
   @maskit - Except for SecurityUtility.java  (line below) I didn't find any 
hardcoding - here too the code looks ok to me
   ```
   SSLContext sslCtx = SSLContext.getInstance("TLS");
   ```
   Can I get a +1 for 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] jai1 opened a new issue #1229: Documentation required for Pulsar Proxy and TLS changes

2018-02-12 Thread GitBox
jai1 opened a new issue #1229: Documentation required for Pulsar Proxy and TLS 
changes
URL: https://github.com/apache/incubator-pulsar/issues/1229
 
 
   Need to add documentation for the flags added during Pulsar Proxy changes 
and TLS changes:-
   
   https://github.com/apache/incubator-pulsar/pull/1225
   #1208 
   #1169 
   #1168 
   #1002 
   


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 #1150: PIP-10: Removing cluster from topic name

2018-02-12 Thread GitBox
merlimat commented on issue #1150: PIP-10: Removing cluster from topic name
URL: https://github.com/apache/incubator-pulsar/pull/1150#issuecomment-365114101
 
 
   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] merlimat commented on issue #1150: PIP-10: Removing cluster from topic name

2018-02-12 Thread GitBox
merlimat commented on issue #1150: PIP-10: Removing cluster from topic name
URL: https://github.com/apache/incubator-pulsar/pull/1150#issuecomment-365114101
 
 
   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 branch-1.22 updated: Regenerated the PulsarApi from proto with latest protoc

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

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


The following commit(s) were added to refs/heads/branch-1.22 by this push:
 new 08913bd  Regenerated the PulsarApi from proto with latest protoc
08913bd is described below

commit 08913bd9f9b17a46c387cb1f68c1d509c3ebfc79
Author: Matteo Merli 
AuthorDate: Mon Feb 12 16:34:08 2018 -0800

Regenerated the PulsarApi from proto with latest protoc
---
 .../apache/pulsar/common/api/proto/PulsarApi.java  | 680 +++--
 1 file changed, 374 insertions(+), 306 deletions(-)

diff --git 
a/pulsar-common/src/main/java/org/apache/pulsar/common/api/proto/PulsarApi.java 
b/pulsar-common/src/main/java/org/apache/pulsar/common/api/proto/PulsarApi.java
index 6bbe77e..2c13125 100644
--- 
a/pulsar-common/src/main/java/org/apache/pulsar/common/api/proto/PulsarApi.java
+++ 
b/pulsar-common/src/main/java/org/apache/pulsar/common/api/proto/PulsarApi.java
@@ -279,13 +279,13 @@ public final class PulsarApi {
   com.google.protobuf.GeneratedMessageLite
   implements MessageIdDataOrBuilder, 
org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream.ByteBufGeneratedMessage
  {
 // Use MessageIdData.newBuilder() to construct.
-private io.netty.util.Recycler.Handle handle;
-private MessageIdData(io.netty.util.Recycler.Handle handle) {
+private final io.netty.util.Recycler.Handle handle;
+private MessageIdData(io.netty.util.Recycler.Handle handle) 
{
   this.handle = handle;
 }
 
  private static final io.netty.util.Recycler RECYCLER = new 
io.netty.util.Recycler() {
-protected MessageIdData newObject(Handle handle) {
+protected MessageIdData newObject(Handle handle) {
   return new MessageIdData(handle);
 }
   };
@@ -295,10 +295,12 @@ public final class PulsarApi {
 this.memoizedIsInitialized = -1;
 this.bitField0_ = 0;
 this.memoizedSerializedSize = -1;
-if (handle != null) { RECYCLER.recycle(this, handle); }
+handle.recycle(this);
 }
  
-private MessageIdData(boolean noInit) {}
+private MessageIdData(boolean noInit) {
+this.handle = null;
+}
 
 private static final MessageIdData defaultInstance;
 public static MessageIdData getDefaultInstance() {
@@ -506,20 +508,20 @@ public final class PulsarApi {
   org.apache.pulsar.common.api.proto.PulsarApi.MessageIdData, Builder>
 implements 
org.apache.pulsar.common.api.proto.PulsarApi.MessageIdDataOrBuilder, 
org.apache.pulsar.common.util.protobuf.ByteBufCodedInputStream.ByteBufMessageBuilder
  {
   // Construct using 
org.apache.pulsar.common.api.proto.PulsarApi.MessageIdData.newBuilder()
-  private final io.netty.util.Recycler.Handle handle;
-  private Builder(io.netty.util.Recycler.Handle handle) {
+  private final io.netty.util.Recycler.Handle handle;
+  private Builder(io.netty.util.Recycler.Handle handle) {
 this.handle = handle;
 maybeForceBuilderInitialization();
   }
   private final static io.netty.util.Recycler RECYCLER = new 
io.netty.util.Recycler() {
- protected Builder newObject(io.netty.util.Recycler.Handle handle) {
+ protected Builder newObject(io.netty.util.Recycler.Handle 
handle) {
return new Builder(handle);
  }
 };
   
public void recycle() {
 clear();
-if (handle != null) {RECYCLER.recycle(this, handle);}
+handle.recycle(this);
 }
   
   private void maybeForceBuilderInitialization() {
@@ -778,13 +780,13 @@ public final class PulsarApi {
   com.google.protobuf.GeneratedMessageLite
   implements KeyValueOrBuilder, 
org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream.ByteBufGeneratedMessage
  {
 // Use KeyValue.newBuilder() to construct.
-private io.netty.util.Recycler.Handle handle;
-private KeyValue(io.netty.util.Recycler.Handle handle) {
+private final io.netty.util.Recycler.Handle handle;
+private KeyValue(io.netty.util.Recycler.Handle handle) {
   this.handle = handle;
 }
 
  private static final io.netty.util.Recycler RECYCLER = new 
io.netty.util.Recycler() {
-protected KeyValue newObject(Handle handle) {
+protected KeyValue newObject(Handle handle) {
   return new KeyValue(handle);
 }
   };
@@ -794,10 +796,12 @@ public final class PulsarApi {
 this.memoizedIsInitialized = -1;
 this.bitField0_ = 0;
 this.memoizedSerializedSize = -1;
-if (handle != null) { RECYCLER.recycle(this, handle); }
+handle.recycle(this);
 }
  
-private KeyValue(boolean noInit) {}

[GitHub] merlimat opened a new pull request #1228: Force to pull docker build image to regenerate PulsarApi.java generat?

2018-02-12 Thread GitBox
merlimat opened a new pull request #1228: Force to pull docker build image to 
regenerate PulsarApi.java generat?
URL: https://github.com/apache/incubator-pulsar/pull/1228
 
 
   ?e_protobuf_docker.sh
   
   ### Motivation
   
   Force to use the latest `apachepulsar/pulsar-build` image found in DockerHub.


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 #1227: Regenerated the PulsarApi from proto with latest protoc

2018-02-12 Thread GitBox
merlimat opened a new pull request #1227: Regenerated the PulsarApi from proto 
with latest protoc
URL: https://github.com/apache/incubator-pulsar/pull/1227
 
 
   ### Motivation
   
   In #1200 the `PulsarApi.java` was regenerated with a protoc that didn't have 
the latest patch with the fixes for Netty-4.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] merlimat opened a new pull request #1226: Bumped master to 2.0.0-incubating-SNAPSHOT

2018-02-12 Thread GitBox
merlimat opened a new pull request #1226: Bumped master to 
2.0.0-incubating-SNAPSHOT
URL: https://github.com/apache/incubator-pulsar/pull/1226
 
 
   ### Motivation
   
   Move development version to 2.0.0-incubating-SNAPSHOT


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 #1225: Enable specification of TLS Protocol Versions and Cipher Suites

2018-02-12 Thread GitBox
rdhabalia commented on a change in pull request #1225: Enable specification of 
TLS Protocol Versions and Cipher Suites
URL: https://github.com/apache/incubator-pulsar/pull/1225#discussion_r167724421
 
 

 ##
 File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java
 ##
 @@ -95,12 +97,22 @@ public static SslContext 
createNettySslContextForClient(boolean allowInsecureCon
 }
 
 public static SslContext createNettySslContextForServer(boolean 
allowInsecureConnection, String trustCertsFilePath,
-String certFilePath, String keyFilePath)
+String certFilePath, String keyFilePath, Set ciphers, 
Set protocols)
 throws GeneralSecurityException, SSLException, 
FileNotFoundException {
 X509Certificate[] certificates = 
loadCertificatesFromPemFile(certFilePath);
 PrivateKey privateKey = loadPrivateKeyFromPemFile(keyFilePath);
 
 SslContextBuilder builder = SslContextBuilder.forServer(privateKey, 
(X509Certificate[]) certificates);
+if (ciphers != null && ciphers.size() > 0) {
+builder.ciphers(ciphers);
+}
+
+if (protocols != null && protocols.size() > 0) {
+String[] protocolsArray = new String[protocols.size()];
 
 Review comment:
   `builder.protocols(protocols.toArray(protocolsArray));` ??


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 #1225: Enable specification of TLS Protocol Versions and Cipher Suites

2018-02-12 Thread GitBox
rdhabalia commented on a change in pull request #1225: Enable specification of 
TLS Protocol Versions and Cipher Suites
URL: https://github.com/apache/incubator-pulsar/pull/1225#discussion_r167724612
 
 

 ##
 File path: 
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
 ##
 @@ -179,7 +179,10 @@
 private String tlsTrustCertsFilePath = "";
 // Accept untrusted TLS certificate from client
 private boolean tlsAllowInsecureConnection = false;
-
+// Specify the tls protocols and cipher the broker will use to negotiate 
during TLS Handshake.
 
 Review comment:
   and in `proxy.conf` as well? should we have any test for 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] maskit commented on issue #1225: Enable specification of TLS Protocol Versions and Cipher Suites

2018-02-12 Thread GitBox
maskit commented on issue #1225: Enable specification of TLS Protocol Versions 
and Cipher Suites
URL: https://github.com/apache/incubator-pulsar/pull/1225#issuecomment-365100577
 
 
   Huge +1. I?ve been worried about this.
   
   IIRC, we pass a string literal ?SSL? as an argument somewhere else, and 
probably we can pass ?TLS1.2? instead. Maybe we should fix it too.


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 closed pull request #1205: Algorithm to find start point of compacted ledger

2018-02-12 Thread GitBox
merlimat closed pull request #1205: Algorithm to find start point of compacted 
ledger
URL: https://github.com/apache/incubator-pulsar/pull/1205
 
 
   

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/client/impl/RawMessageImpl.java 
b/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawMessageImpl.java
index d1b6e14bc..d36520cfb 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawMessageImpl.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawMessageImpl.java
@@ -38,7 +38,7 @@
 private final MessageIdData id;
 private final ByteBuf headersAndPayload;
 
-RawMessageImpl(MessageIdData id, ByteBuf headersAndPayload) {
+public RawMessageImpl(MessageIdData id, ByteBuf headersAndPayload) {
 this.id = id;
 this.headersAndPayload = headersAndPayload.retainedSlice();
 }
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java
index 068ab4972..0afccd10b 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java
@@ -18,10 +18,100 @@
  */
 package org.apache.pulsar.compaction;
 
+import com.github.benmanes.caffeine.cache.AsyncLoadingCache;
+import com.github.benmanes.caffeine.cache.Caffeine;
+import com.google.common.collect.ComparisonChain;
+
+import java.util.NoSuchElementException;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import org.apache.bookkeeper.client.BKException;
+import org.apache.bookkeeper.client.LedgerHandle;
+import org.apache.bookkeeper.client.LedgerEntry;
 import org.apache.bookkeeper.mledger.Position;
+import org.apache.bookkeeper.mledger.impl.PositionImpl;
+import org.apache.pulsar.client.api.RawMessage;
+import org.apache.pulsar.client.impl.RawMessageImpl;
+import org.apache.pulsar.common.api.proto.PulsarApi.MessageIdData;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class CompactedTopicImpl implements CompactedTopic {
+final static long NEWER_THAN_COMPACTED = -0xfeed0fbaL;
+
 @Override
 public void newCompactedLedger(Position p, long compactedLedgerId) {}
+
+static CompletableFuture findStartPoint(PositionImpl p,
+  long lastEntryId,
+  
AsyncLoadingCache cache) {
+CompletableFuture promise = new CompletableFuture<>();
+findStartPointLoop(p, 0, lastEntryId, promise, cache);
+return promise;
+}
+
+private static void findStartPointLoop(PositionImpl p, long start, long 
end,
+   CompletableFuture promise,
+   
AsyncLoadingCache cache) {
+long midpoint = start + ((end - start) / 2);
+
+CompletableFuture startEntry = cache.get(start);
+CompletableFuture middleEntry = cache.get(midpoint);
+CompletableFuture endEntry = cache.get(end);
+
+CompletableFuture.allOf(startEntry, middleEntry, endEntry).thenRun(
+() -> {
+if (comparePositionAndMessageId(p, startEntry.join()) < 0) 
{
+promise.complete(start);
+} else if (comparePositionAndMessageId(p, 
middleEntry.join()) < 0) {
+findStartPointLoop(p, start, midpoint, promise, cache);
+} else if (comparePositionAndMessageId(p, endEntry.join()) 
< 0) {
+findStartPointLoop(p, midpoint + 1, end, promise, 
cache);
+} else {
+promise.complete(NEWER_THAN_COMPACTED);
+}
+}).exceptionally((exception) -> {
+promise.completeExceptionally(exception);
+return null;
+});
+}
+
+static AsyncLoadingCache createCache(LedgerHandle lh,
+ long maxSize) {
+return Caffeine.newBuilder()
+.maximumSize(maxSize)
+.buildAsync((entryId, executor) -> readOneMessageId(lh, entryId));
+}
+
+
+private static CompletableFuture 
readOneMessageId(LedgerHandle lh, long entryId) {
+CompletableFuture promise = new CompletableFuture<>();
+
+lh.asyncReadEntries(entryId, entryId,
+(rc, _lh, seq, ctx) -> {
+if (rc != 

[incubator-pulsar] branch master updated: Algorithm to find start point of compacted ledger (#1205)

2018-02-12 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 fbfd944  Algorithm to find start point of compacted ledger (#1205)
fbfd944 is described below

commit fbfd9445ee468faae7f56aeab69e93794bf4a033
Author: Ivan Kelly 
AuthorDate: Mon Feb 12 23:14:59 2018 +0100

Algorithm to find start point of compacted ledger (#1205)

* Algorithm to find start point of compacted ledger

When reading from a compacted topic ledger, the reader will have to find
the the first entry whole message id is greater than or equal to the
position of the cursor. This involves a binary search into the ledger.

This patch implements this binary search, along with basic caching to
avoid rereading the same entry multiple times.

* Guava cache -> Caffeine

* rejig future callbacks
---
 .../apache/pulsar/client/impl/RawMessageImpl.java  |   2 +-
 .../pulsar/compaction/CompactedTopicImpl.java  |  90 +
 .../pulsar/compaction/CompactedTopicTest.java  | 214 +
 3 files changed, 305 insertions(+), 1 deletion(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawMessageImpl.java 
b/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawMessageImpl.java
index d1b6e14..d36520c 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawMessageImpl.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawMessageImpl.java
@@ -38,7 +38,7 @@ public class RawMessageImpl implements RawMessage {
 private final MessageIdData id;
 private final ByteBuf headersAndPayload;
 
-RawMessageImpl(MessageIdData id, ByteBuf headersAndPayload) {
+public RawMessageImpl(MessageIdData id, ByteBuf headersAndPayload) {
 this.id = id;
 this.headersAndPayload = headersAndPayload.retainedSlice();
 }
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java
index 068ab49..0afccd1 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java
@@ -18,10 +18,100 @@
  */
 package org.apache.pulsar.compaction;
 
+import com.github.benmanes.caffeine.cache.AsyncLoadingCache;
+import com.github.benmanes.caffeine.cache.Caffeine;
+import com.google.common.collect.ComparisonChain;
+
+import java.util.NoSuchElementException;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import org.apache.bookkeeper.client.BKException;
+import org.apache.bookkeeper.client.LedgerHandle;
+import org.apache.bookkeeper.client.LedgerEntry;
 import org.apache.bookkeeper.mledger.Position;
+import org.apache.bookkeeper.mledger.impl.PositionImpl;
+import org.apache.pulsar.client.api.RawMessage;
+import org.apache.pulsar.client.impl.RawMessageImpl;
+import org.apache.pulsar.common.api.proto.PulsarApi.MessageIdData;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class CompactedTopicImpl implements CompactedTopic {
+final static long NEWER_THAN_COMPACTED = -0xfeed0fbaL;
+
 @Override
 public void newCompactedLedger(Position p, long compactedLedgerId) {}
+
+static CompletableFuture findStartPoint(PositionImpl p,
+  long lastEntryId,
+  
AsyncLoadingCache cache) {
+CompletableFuture promise = new CompletableFuture<>();
+findStartPointLoop(p, 0, lastEntryId, promise, cache);
+return promise;
+}
+
+private static void findStartPointLoop(PositionImpl p, long start, long 
end,
+   CompletableFuture promise,
+   
AsyncLoadingCache cache) {
+long midpoint = start + ((end - start) / 2);
+
+CompletableFuture startEntry = cache.get(start);
+CompletableFuture middleEntry = cache.get(midpoint);
+CompletableFuture endEntry = cache.get(end);
+
+CompletableFuture.allOf(startEntry, middleEntry, endEntry).thenRun(
+() -> {
+if (comparePositionAndMessageId(p, startEntry.join()) < 0) 
{
+promise.complete(start);
+} else if (comparePositionAndMessageId(p, 
middleEntry.join()) < 0) {
+findStartPointLoop(p, start, midpoint, promise, cache);
+} else if (comparePositionAndMessageId(p, endEntry.join()) 
< 0) {
+findStartPointLoop(p, midpoint + 1, end, promise, 
cache);
+  

[GitHub] merlimat commented on a change in pull request #1225: Enable specification of TLS Protocol Versions and Cipher Suites

2018-02-12 Thread GitBox
merlimat commented on a change in pull request #1225: Enable specification of 
TLS Protocol Versions and Cipher Suites
URL: https://github.com/apache/incubator-pulsar/pull/1225#discussion_r167703706
 
 

 ##
 File path: 
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
 ##
 @@ -179,7 +179,10 @@
 private String tlsTrustCertsFilePath = "";
 // Accept untrusted TLS certificate from client
 private boolean tlsAllowInsecureConnection = false;
-
+// Specify the tls protocols and cipher the broker will use to negotiate 
during TLS Handshake.
 
 Review comment:
   add to `broker.conf`, with documentation and examples for both parameters


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] mgodave commented on issue #1137: Schema registry

2018-02-12 Thread GitBox
mgodave commented on issue #1137: Schema registry
URL: https://github.com/apache/incubator-pulsar/pull/1137#issuecomment-365065103
 
 
   sounds good. I can easily break this apart again.
   
   On Mon, Feb 12, 2018 at 2:07 PM, Ivan Kelly 
   wrote:
   
   > Yes, github really sucks at this. gerrit does it much better.
   >
   > What I do these days is to create a larger WIP patch which has everything
   > and is there for reference. Then I push one patch at a time. The review
   > velocity isn't so high that having multiple patches out for review makes
   > much sense anyhow. Once an out for review patch is merged, I then merge
   > master into my WIP branch, and break off another chunk.
   >
   > ?
   > You are receiving this because you were assigned.
   > Reply to this email directly, view it on GitHub
   > 
,
   > or mute the thread
   > 

   > .
   >
   


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 issue #1137: Schema registry

2018-02-12 Thread GitBox
ivankelly commented on issue #1137: Schema registry
URL: https://github.com/apache/incubator-pulsar/pull/1137#issuecomment-365062216
 
 
   Yes, github really sucks at this. gerrit does it much better.
   
   What I do these days is to create a larger WIP patch which has everything 
and is there for reference. Then I push one patch at a time. The review 
velocity isn't so high that having multiple patches out for review makes much 
sense anyhow. Once an out for review patch is merged, I then merge master into 
my WIP branch, and break off another chunk.


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] mgodave commented on issue #1137: Schema registry

2018-02-12 Thread GitBox
mgodave commented on issue #1137: Schema registry
URL: https://github.com/apache/incubator-pulsar/pull/1137#issuecomment-365061364
 
 
   Yeah, I was thinking
   
   1. Proto changes
   2. Schema Registry
   3. Default Implementation
   
   The funny thing is that this is how my branches were originally organized.
   I didn't know how to submit dependent PRs so I merged them all into one
   branch. I'll leave this one here for reference and re-split them up.
   
   -Dave
   
   On Mon, Feb 12, 2018 at 2:02 PM, Ivan Kelly 
   wrote:
   
   > And maybe the bookkeeper schema storage implementation can be a separate
   > patch too?
   >
   > ?
   > You are receiving this because you were assigned.
   > Reply to this email directly, view it on GitHub
   > 
,
   > or mute the thread
   > 

   > .
   >
   


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 issue #1137: Schema registry

2018-02-12 Thread GitBox
ivankelly commented on issue #1137: Schema registry
URL: https://github.com/apache/incubator-pulsar/pull/1137#issuecomment-365060799
 
 
   And maybe the bookkeeper schema storage implementation can be a separate 
patch too?


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] mgodave commented on issue #1137: Schema registry

2018-02-12 Thread GitBox
mgodave commented on issue #1137: Schema registry
URL: https://github.com/apache/incubator-pulsar/pull/1137#issuecomment-365060102
 
 
   Noted
   
   On Mon, Feb 12, 2018 at 1:59 PM, Ivan Kelly 
   wrote:
   
   > Even just having the proto (and compiled stuff) separate would make it
   > easier to look at.
   >
   > ?
   > You are receiving this because you were assigned.
   > Reply to this email directly, view it on GitHub
   > 
,
   > or mute the thread
   > 

   > .
   >
   


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 issue #1137: Schema registry

2018-02-12 Thread GitBox
ivankelly commented on issue #1137: Schema registry
URL: https://github.com/apache/incubator-pulsar/pull/1137#issuecomment-365059871
 
 
   Even just having the proto (and compiled stuff) separate would make it 
easier to look at.


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] mgodave commented on issue #1137: Schema registry

2018-02-12 Thread GitBox
mgodave commented on issue #1137: Schema registry
URL: https://github.com/apache/incubator-pulsar/pull/1137#issuecomment-365059450
 
 
   I tried to do that before and I wasn't happy with how it worked out. I'll
   take another look.
   
   On Mon, Feb 12, 2018 at 1:54 PM, Ivan Kelly 
   wrote:
   
   > Almost 7000 LoCs. Any chance this could be broken into more digestible
   > pieces for review? Like leave this PR here for reference, for example
   > submit proto files first, and then chunk it into patches around 400-500
   > lines long each that can be reviewed in around an hour?
   >
   > ?
   > You are receiving this because you were assigned.
   > Reply to this email directly, view it on GitHub
   > 
,
   > or mute the thread
   > 

   > .
   >
   


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 issue #1137: Schema registry

2018-02-12 Thread GitBox
ivankelly commented on issue #1137: Schema registry
URL: https://github.com/apache/incubator-pulsar/pull/1137#issuecomment-365058390
 
 
   Almost 7000 LoCs. Any chance this could be broken into more digestible 
pieces for review? Like leave this PR here for reference, for example submit 
proto files first, and then chunk it into patches around 400-500 lines long 
each that can be reviewed in around an hour? 


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] jai1 opened a new pull request #1225: Enable specification of TLS Protocol Versions and Cipher Suites

2018-02-12 Thread GitBox
jai1 opened a new pull request #1225: Enable specification of TLS Protocol 
Versions and Cipher Suites
URL: https://github.com/apache/incubator-pulsar/pull/1225
 
 
   ### Motivation
   
   Enable listening services (Broker, Proxy, Discovery Provider) to specify 
which TLS Protocol Versions and Cipher Suites they will negotiate with.
   This is useful when you don't want the client to use downgraded protocols or 
ciphers which are weak.
   
   ### Modifications
   Major code change is in SecurityUtility.createNettySslContextForServer rest 
is just config changes and tests.
   
   ### Result
   Clients can't force servers (Broker, Proxy, Discovery Provider)  to use 
downgraded protocols or ciphers which are weak.
   


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 issue #1205: Algorithm to find start point of compacted ledger

2018-02-12 Thread GitBox
ivankelly commented on issue #1205: Algorithm to find start point of compacted 
ledger
URL: https://github.com/apache/incubator-pulsar/pull/1205#issuecomment-365054955
 
 
   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] merlimat commented on a change in pull request #1219: Xzy initialize subscription config

2018-02-12 Thread GitBox
merlimat commented on a change in pull request #1219: Xzy initialize 
subscription config
URL: https://github.com/apache/incubator-pulsar/pull/1219#discussion_r167657680
 
 

 ##
 File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
 ##
 @@ -138,6 +138,20 @@
  */
 public ManagedCursor openCursor(String name) throws InterruptedException, 
ManagedLedgerException;
 
+/**
+ * Open a ManagedCursor in this ManagedLedger.
+ * 
+ * If the cursors doesn't exist, a new one will be created and its 
position will be at the end of the ManagedLedger.
+ *
+ * @param name
+ *the name associated with the ManagedCursor
+ * @param initializeOnLatest
+ *the flag tell the method wthether it should intialize the 
cursor at latest position or not.
+ * @return the ManagedCursor
+ * @throws ManagedLedgerException
+ */
+public ManagedCursor openCursor(String name, boolean initializeOnLatest) 
throws InterruptedException, ManagedLedgerException;
 
 Review comment:
   Another option here is to reuse  `Position` class: 
   
   eg: 
   ```java
   managedLedger.openCursor("name", Position.earliest);
   ```


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 a change in pull request #1219: Xzy initialize subscription config

2018-02-12 Thread GitBox
merlimat commented on a change in pull request #1219: Xzy initialize 
subscription config
URL: https://github.com/apache/incubator-pulsar/pull/1219#discussion_r167655263
 
 

 ##
 File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
 ##
 @@ -138,6 +138,20 @@
  */
 public ManagedCursor openCursor(String name) throws InterruptedException, 
ManagedLedgerException;
 
+/**
+ * Open a ManagedCursor in this ManagedLedger.
+ * 
+ * If the cursors doesn't exist, a new one will be created and its 
position will be at the end of the ManagedLedger.
+ *
+ * @param name
+ *the name associated with the ManagedCursor
+ * @param initializeOnLatest
+ *the flag tell the method wthether it should intialize the 
cursor at latest position or not.
+ * @return the ManagedCursor
+ * @throws ManagedLedgerException
+ */
+public ManagedCursor openCursor(String name, boolean initializeOnLatest) 
throws InterruptedException, ManagedLedgerException;
 
 Review comment:
   rather than using a boolean I'd prefer having an enum here. Reading code 
with: 
   
   ```java
   managedLedger.openCursor("name", true);
   ```
   
   doesn't convey what the `true` means.
   
   ```java
   managedLedger.openCursor("name", CursorPosition.InitializeOnLatest);
   managedLedger.openCursor("name", CursorPosition.InitializeOnEarliest);
   ```
   


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 a change in pull request #1219: Xzy initialize subscription config

2018-02-12 Thread GitBox
merlimat commented on a change in pull request #1219: Xzy initialize 
subscription config
URL: https://github.com/apache/incubator-pulsar/pull/1219#discussion_r167657264
 
 

 ##
 File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
 ##
 @@ -2026,6 +2035,23 @@ PositionImpl getMarkDeletePositionOfSlowestConsumer() {
 return Pair.create(pos, count);
 }
 
+ /**
+ * Get the first position written in the managed ledger, alongside with 
the associated counter
+ */
+Pair getFirstPositionAndCounter() {
+PositionImpl pos;
+long count;
+
+do {
+pos = getFirstPosition();
+count = ENTRIES_ADDED_COUNTER_UPDATER.get(this);
 
 Review comment:
   The backlog count for this subscription will be wrong here. 
   
   The counter is associated with the last entry written, not with the first 
one (at least not directly). 
   
   The correct way to initialize it here would be to: 
1. get first position
2. get last position and counter (atomically), though the existing method
3. get number of entries between first and last position (there's method 
for that)
4. subtract difference from the last position counter value
   


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 a change in pull request #1219: Xzy initialize subscription config

2018-02-12 Thread GitBox
merlimat commented on a change in pull request #1219: Xzy initialize 
subscription config
URL: https://github.com/apache/incubator-pulsar/pull/1219#discussion_r167655939
 
 

 ##
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/api/ConsumerConfiguration.java
 ##
 @@ -321,4 +322,21 @@ public ConsumerConfiguration setProperties(Map properties) {
 public Map getProperties() {
 return properties;
 }
+
+ /** 
+ * @param initializeSubscriptionOnLatest the 
initializeSubscriptionOnLatest to set
+ * Set cursor position when subscribing to the topic first time
+ * 
+ * Default is {@value true} which means {@link MessageId.lastest}
 
 Review comment:
   It's a bit unclear from this API where the subscription will be initialized 
if it's not on latest. We should make it clear that it's either "latest" or 
"earliest" (with latest as default). 
   
   Again, I think that an enum would be a better option here to better convey 
the 2 options.


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] mgodave opened a new pull request #1224: Checkstyle managed ledger

2018-02-12 Thread GitBox
mgodave opened a new pull request #1224: Checkstyle managed ledger
URL: https://github.com/apache/incubator-pulsar/pull/1224
 
 
   Apply checkstyle rules from #1162 module-by-module, starting with managed 
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] sijie commented on a change in pull request #1066: Issue 937: add CommandGetLastMessageId to make reader know the end of topic

2018-02-12 Thread GitBox
sijie commented on a change in pull request #1066: Issue 937: add 
CommandGetLastMessageId to make reader know the end of topic
URL: https://github.com/apache/incubator-pulsar/pull/1066#discussion_r167588712
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
 ##
 @@ -851,6 +849,31 @@ protected void handleCloseConsumer(CommandCloseConsumer 
closeConsumer) {
 }
 }
 
+@Override
+protected void handleGetLastMessageId(CommandGetLastMessageId 
getLastMessageId) {
+checkArgument(state == State.Connected);
+
+CompletableFuture consumerFuture = 
consumers.get(getLastMessageId.getConsumerId());
+
+if (consumerFuture != null && consumerFuture.isDone() && 
!consumerFuture.isCompletedExceptionally()) {
+Consumer consumer = consumerFuture.getNow(null);
+long requestId = getLastMessageId.getRequestId();
+
+Position position = 
consumer.getSubscription().getTopic().getLastMessageId();
+
+log.info("[{}] [{}][{}] Get LastMessageId {}", remoteAddress,
+consumer.getSubscription().getTopic().getName(), 
consumer.getSubscription().getName(), position);
+MessageIdData messageId = MessageIdData.newBuilder()
 
 Review comment:
   I think it should be at client side, because currently "partition" related 
logic is at client side.


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 #1066: Issue 937: add CommandGetLastMessageId to make reader know the end of topic

2018-02-12 Thread GitBox
ivankelly commented on a change in pull request #1066: Issue 937: add 
CommandGetLastMessageId to make reader know the end of topic
URL: https://github.com/apache/incubator-pulsar/pull/1066#discussion_r167522179
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
 ##
 @@ -851,6 +849,31 @@ protected void handleCloseConsumer(CommandCloseConsumer 
closeConsumer) {
 }
 }
 
+@Override
+protected void handleGetLastMessageId(CommandGetLastMessageId 
getLastMessageId) {
+checkArgument(state == State.Connected);
+
+CompletableFuture consumerFuture = 
consumers.get(getLastMessageId.getConsumerId());
+
+if (consumerFuture != null && consumerFuture.isDone() && 
!consumerFuture.isCompletedExceptionally()) {
+Consumer consumer = consumerFuture.getNow(null);
+long requestId = getLastMessageId.getRequestId();
+
+Position position = 
consumer.getSubscription().getTopic().getLastMessageId();
+
+log.info("[{}] [{}][{}] Get LastMessageId {}", remoteAddress,
+consumer.getSubscription().getTopic().getName(), 
consumer.getSubscription().getName(), position);
+MessageIdData messageId = MessageIdData.newBuilder()
 
 Review comment:
   @merlimat @sijie could you chime in on whether the partition id should be 
added on the server side or on the client side?


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 #1103: PIP-13-1/3: Provide `TopicsConsumer` to consume from several topics under same namespace

2018-02-12 Thread GitBox
ivankelly commented on a change in pull request #1103: PIP-13-1/3: Provide 
`TopicsConsumer` to consume from several topics under same namespace
URL: https://github.com/apache/incubator-pulsar/pull/1103#discussion_r167517269
 
 

 ##
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PartitionedConsumerImpl.java
 ##
 @@ -468,17 +468,20 @@ public void redeliverUnacknowledgedMessages() {
 }
 
 @Override
-public void redeliverUnacknowledgedMessages(Set messageIds) 
{
+public void redeliverUnacknowledgedMessages(Set messageIds) {
 
 Review comment:
   In Consumer.java it doesn't know about the MessageIds. The call takes no 
parameters.
   
   TopicsMessageIdImpl should be a specialization of MessageIdImpl (I assumed 
it was when I originally commented, until i saw Matteo's comment to the same 
effect). If it is a specialization of TopicsMessageIdImpl, then this signature 
doesn't need to 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] ivankelly commented on a change in pull request #1103: PIP-13-1/3: Provide `TopicsConsumer` to consume from several topics under same namespace

2018-02-12 Thread GitBox
ivankelly commented on a change in pull request #1103: PIP-13-1/3: Provide 
`TopicsConsumer` to consume from several topics under same namespace
URL: https://github.com/apache/incubator-pulsar/pull/1103#discussion_r167516863
 
 

 ##
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/TopicMessageIdImpl.java
 ##
 @@ -0,0 +1,50 @@
+/**
+ * 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;
+
+import org.apache.pulsar.client.api.MessageId;
+
+public class TopicMessageIdImpl implements MessageId {
 
 Review comment:
   +1. This would reduce the amount of change needed elsewhere also.


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 #1103: PIP-13-1/3: Provide `TopicsConsumer` to consume from several topics under same namespace

2018-02-12 Thread GitBox
ivankelly commented on a change in pull request #1103: PIP-13-1/3: Provide 
`TopicsConsumer` to consume from several topics under same namespace
URL: https://github.com/apache/incubator-pulsar/pull/1103#discussion_r167516056
 
 

 ##
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/UnAckedMessageTracker.java
 ##
 @@ -18,26 +18,24 @@
  */
 package org.apache.pulsar.client.impl;
 
+import io.netty.util.Timeout;
+import io.netty.util.TimerTask;
 import java.io.Closeable;
-import java.util.ArrayList;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
-
+import java.util.function.Predicate;
+import org.apache.pulsar.client.api.MessageId;
 import org.apache.pulsar.common.util.collections.ConcurrentOpenHashSet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import io.netty.util.Timeout;
-import io.netty.util.TimerTask;
-
 public class UnAckedMessageTracker implements Closeable {
 
 Review comment:
   For both PartitionedConsumer and TopicsConsumer you know what kind of 
MessageId you will be need.
   For PartitionedConsumer you can create a 
UnAckedMessageTracker.
   For ConsumerConsumer you can create an UnAckedMessageTracker.
   For TopicsConsumer you can create an 
UnAckedMessageTracker.
   
   Any cast, at all, is code smell. Looking at this again, you should also have 
a specialization of UnAckedMessageTracker, and only this 
class should implement #removeTopicMessages.


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 #1205: Algorithm to find start point of compacted ledger

2018-02-12 Thread GitBox
ivankelly commented on a change in pull request #1205: Algorithm to find start 
point of compacted ledger
URL: https://github.com/apache/incubator-pulsar/pull/1205#discussion_r167505885
 
 

 ##
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java
 ##
 @@ -18,10 +18,109 @@
  */
 package org.apache.pulsar.compaction;
 
+import com.github.benmanes.caffeine.cache.AsyncLoadingCache;
+import com.github.benmanes.caffeine.cache.Caffeine;
+import com.google.common.collect.ComparisonChain;
+
+import java.util.NoSuchElementException;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import org.apache.bookkeeper.client.BKException;
+import org.apache.bookkeeper.client.LedgerHandle;
+import org.apache.bookkeeper.client.LedgerEntry;
 import org.apache.bookkeeper.mledger.Position;
+import org.apache.bookkeeper.mledger.impl.PositionImpl;
+import org.apache.pulsar.client.api.RawMessage;
+import org.apache.pulsar.client.impl.RawMessageImpl;
+import org.apache.pulsar.common.api.proto.PulsarApi.MessageIdData;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class CompactedTopicImpl implements CompactedTopic {
+final static long NEWER_THAN_COMPACTED = -0xfeed0fbaL;
+
 @Override
 public void newCompactedLedger(Position p, long compactedLedgerId) {}
+
+static CompletableFuture findStartPoint(PositionImpl p,
+  long lastEntryId,
+  
AsyncLoadingCache cache) {
+CompletableFuture promise = new CompletableFuture<>();
+findStartPointLoop(p, 0, lastEntryId, promise, cache);
+return promise;
+}
+
+private static void findStartPointLoop(PositionImpl p, long start, long 
end,
+   CompletableFuture promise,
+   
AsyncLoadingCache cache) {
+long midpoint = start + ((end - start) / 2);
+
+CompletableFuture startEntry = cache.get(start);
+CompletableFuture middleEntry = cache.get(midpoint);
+CompletableFuture endEntry = cache.get(end);
+
+CompletableFuture.allOf(startEntry, middleEntry, 
endEntry).whenComplete(
+(v, exception) -> {
+if (exception != null) {
+promise.completeExceptionally(exception);
+}
+try {
+if (comparePositionAndMessageId(p, startEntry.get()) < 
0) {
 
 Review comment:
   ah, that is prettier. changed. That return null is a bit ugly. would be nice 
if java had something like Void.INSTANCE.


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