[incubator-pulsar] branch master updated: Change MessageProcessor Interface to be public (#2030)
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 ae90f22 Change MessageProcessor Interface to be public (#2030) ae90f22 is described below commit ae90f22b54cb5f4132542211d4867c066ea7b9e7 Author: Boyang Jerry Peng AuthorDate: Tue Jun 26 12:18:37 2018 -0700 Change MessageProcessor Interface to be public (#2030) * Change MessageProcessor Interface to be public * remove static --- .../src/main/java/org/apache/pulsar/client/impl/MessageParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageParser.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageParser.java index 5fa1c8c..1ab6d04 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageParser.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageParser.java @@ -43,7 +43,7 @@ import org.apache.pulsar.common.naming.TopicName; @UtilityClass @Slf4j public class MessageParser { -static interface MessageProcessor { +public interface MessageProcessor { void process(MessageId messageId, Message message, ByteBuf payload); }
[incubator-pulsar] branch master updated: Move AuthenticationFilter to pulsar-broker-common (#2039)
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 c80dfb6 Move AuthenticationFilter to pulsar-broker-common (#2039) c80dfb6 is described below commit c80dfb6abe6acfc4a95f73b55e43a4702762e12f Author: Ivan Kelly AuthorDate: Wed Jun 27 19:16:14 2018 +0200 Move AuthenticationFilter to pulsar-broker-common (#2039) So that it can be used by the proxy also. Master issue: #1991 --- .../main/java/org/apache/pulsar/broker/web/AuthenticationFilter.java | 5 ++--- .../src/main/java/org/apache/pulsar/broker/web/WebService.java | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/AuthenticationFilter.java b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/web/AuthenticationFilter.java similarity index 94% rename from pulsar-broker/src/main/java/org/apache/pulsar/broker/web/AuthenticationFilter.java rename to pulsar-broker-common/src/main/java/org/apache/pulsar/broker/web/AuthenticationFilter.java index a384e35..c5be5ec 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/AuthenticationFilter.java +++ b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/web/AuthenticationFilter.java @@ -30,7 +30,6 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.pulsar.broker.PulsarService; import org.apache.pulsar.broker.authentication.AuthenticationDataHttps; import org.apache.pulsar.broker.authentication.AuthenticationDataSource; import org.apache.pulsar.broker.authentication.AuthenticationService; @@ -48,8 +47,8 @@ public class AuthenticationFilter implements Filter { public static final String AuthenticatedRoleAttributeName = AuthenticationFilter.class.getName() + "-role"; public static final String AuthenticatedDataAttributeName = AuthenticationFilter.class.getName() + "-data"; -public AuthenticationFilter(PulsarService pulsar) { -this.authenticationService = pulsar.getBrokerService().getAuthenticationService(); +public AuthenticationFilter(AuthenticationService authenticationService) { +this.authenticationService = authenticationService; } @Override diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java index 099f1a0..34809b0 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java @@ -134,7 +134,8 @@ public class WebService implements AutoCloseable { } if (requiresAuthentication && pulsar.getConfiguration().isAuthenticationEnabled()) { -FilterHolder filter = new FilterHolder(new AuthenticationFilter(pulsar)); +FilterHolder filter = new FilterHolder(new AuthenticationFilter( + pulsar.getBrokerService().getAuthenticationService())); context.addFilter(filter, MATCH_ALL, EnumSet.allOf(DispatcherType.class)); }
[incubator-pulsar.wiki] branch master updated: Updated Release process (markdown)
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.wiki.git The following commit(s) were added to refs/heads/master by this push: new 17994a1 Updated Release process (markdown) 17994a1 is described below commit 17994a10d0c899b3fcac2d740ab7cf9b6cd4ba40 Author: Matteo Merli AuthorDate: Wed Jun 27 13:14:18 2018 -0700 Updated Release process (markdown) --- Release-process.md | 4 1 file changed, 4 insertions(+) diff --git a/Release-process.md b/Release-process.md index 24b066c..351c253 100644 --- a/Release-process.md +++ b/Release-process.md @@ -88,6 +88,10 @@ After the build, there will be 2 generated artifacts: Inspect the artifacts: * Unpack both of them * Check that the `LICENSE` and `NOTICE` files cover all included jars (especially for the -bin package) + - Use script to cross-validate `LICENSE` file with included jars: + ``` + src/check-binary-license all/target/apache-pulsar-1.X.0-incubating-bin.tar.gz + ``` * Run Apache RAT to verify the license headers in the `src` package: ```shell mvn apache-rat:check
[incubator-pulsar] branch master updated: Helm charts for deployment on GKE (#1993)
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 b506793 Helm charts for deployment on GKE (#1993) b506793 is described below commit b5067934b86b263bc6a771ae5d9e656777d6a290 Author: Daniel Jorge AuthorDate: Mon Jun 25 14:47:19 2018 -0300 Helm charts for deployment on GKE (#1993) * Helm charts for deployment on GKE * Repackaginh helm charts under deployment/kubernetes/helm * Formatting licences * Removing cloud specific values to enable more generic deployments --- deployment/kubernetes/helm/README.md | 23 ++ deployment/kubernetes/helm/pulsar/.helmignore | 21 ++ deployment/kubernetes/helm/pulsar/Chart.yaml | 24 ++ .../kubernetes/helm/pulsar/templates/_helpers.tpl | 32 ++ .../pulsar/templates/autorecovery-configmap.yaml | 38 ++ .../pulsar/templates/autorecovery-deployment.yaml | 105 ++ .../helm/pulsar/templates/bastion-configmap.yaml | 35 ++ .../helm/pulsar/templates/bastion-deployment.yaml | 80 .../pulsar/templates/bookkeeper-configmap.yaml | 36 ++ .../helm/pulsar/templates/bookkeeper-pdb.yaml | 40 ++ .../helm/pulsar/templates/bookkeeper-service.yaml | 41 +++ .../pulsar/templates/bookkeeper-statefulset.yaml | 159 .../pulsar/templates/bookkeeper-storageclass.yaml | 59 +++ .../helm/pulsar/templates/broker-configmap.yaml| 40 ++ .../helm/pulsar/templates/broker-deployment.yaml | 114 ++ .../helm/pulsar/templates/broker-pdb.yaml | 40 ++ .../helm/pulsar/templates/broker-service.yaml | 41 +++ .../pulsar/templates/dashboard-deployment.yaml | 73 .../helm/pulsar/templates/dashboard-service.yaml | 43 +++ .../helm/pulsar/templates/grafana-deployment.yaml | 72 .../helm/pulsar/templates/grafana-service.yaml | 43 +++ .../helm/pulsar/templates/namespace.yaml | 25 ++ .../pulsar/templates/prometheus-configmap.yaml | 70 .../pulsar/templates/prometheus-deployment.yaml| 82 + .../helm/pulsar/templates/prometheus-pvc.yaml | 36 ++ .../helm/pulsar/templates/prometheus-rbac.yaml | 57 +++ .../helm/pulsar/templates/prometheus-service.yaml | 43 +++ .../pulsar/templates/prometheus-storageclass.yaml | 41 +++ .../helm/pulsar/templates/proxy-configmap.yaml | 42 +++ .../helm/pulsar/templates/proxy-deployment.yaml| 109 ++ .../helm/pulsar/templates/proxy-pdb.yaml | 42 +++ .../helm/pulsar/templates/proxy-service.yaml | 43 +++ .../helm/pulsar/templates/zookeeper-configmap.yaml | 33 ++ .../helm/pulsar/templates/zookeeper-metadata.yaml | 58 +++ .../helm/pulsar/templates/zookeeper-pdb.yaml | 40 ++ .../helm/pulsar/templates/zookeeper-service.yaml | 41 +++ .../pulsar/templates/zookeeper-statefulset.yaml| 142 .../pulsar/templates/zookeeper-storageclass.yaml | 39 ++ deployment/kubernetes/helm/pulsar/values.yaml | 405 + 39 files changed, 2507 insertions(+) diff --git a/deployment/kubernetes/helm/README.md b/deployment/kubernetes/helm/README.md new file mode 100644 index 000..627b0fc --- /dev/null +++ b/deployment/kubernetes/helm/README.md @@ -0,0 +1,23 @@ + + +This directory contains the Helm Chart required +to do a complete Pulsar deployment on Kubernetes. diff --git a/deployment/kubernetes/helm/pulsar/.helmignore b/deployment/kubernetes/helm/pulsar/.helmignore new file mode 100644 index 000..f0c1319 --- /dev/null +++ b/deployment/kubernetes/helm/pulsar/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deployment/kubernetes/helm/pulsar/Chart.yaml b/deployment/kubernetes/helm/pulsar/Chart.yaml new file mode 100644 index 000..f4cefc0 --- /dev/null +++ b/deployment/kubernetes/helm/pulsar/Chart.yaml @@ -0,0 +1,24 @@ +# +# 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 WARR
[incubator-pulsar] branch master updated: Added message parser to decode raw headers and payload without a Consumer instance (#2019)
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 172f050 Added message parser to decode raw headers and payload without a Consumer instance (#2019) 172f050 is described below commit 172f05050318889af825b1e7b71ba6f43da8c5df Author: Matteo Merli AuthorDate: Mon Jun 25 09:56:46 2018 -0700 Added message parser to decode raw headers and payload without a Consumer instance (#2019) * Added message parser to decode raw headers and payload without a Consumer instance * Added header --- .../pulsar/client/impl/MessageParserTest.java | 155 + .../apache/pulsar/client/impl/MessageParser.java | 190 + 2 files changed, 345 insertions(+) diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageParserTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageParserTest.java new file mode 100644 index 000..a16166a --- /dev/null +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageParserTest.java @@ -0,0 +1,155 @@ +/** + * 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 static org.testng.Assert.assertEquals; + +import com.google.common.collect.Sets; + +import io.netty.buffer.ByteBuf; + +import java.util.List; +import java.util.concurrent.TimeUnit; + +import org.apache.bookkeeper.mledger.Entry; +import org.apache.bookkeeper.mledger.ManagedCursor; +import org.apache.bookkeeper.mledger.impl.PositionImpl; +import org.apache.pulsar.broker.auth.MockedPulsarServiceBaseTest; +import org.apache.pulsar.broker.service.persistent.PersistentTopic; +import org.apache.pulsar.client.api.Message; +import org.apache.pulsar.client.api.Producer; +import org.apache.pulsar.client.api.RawMessage; +import org.apache.pulsar.client.api.Schema; +import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; +import org.apache.pulsar.common.naming.TopicName; +import org.apache.pulsar.common.policies.data.ClusterData; +import org.apache.pulsar.common.policies.data.TenantInfo; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import avro.shaded.com.google.common.collect.Lists; + +public class MessageParserTest extends MockedPulsarServiceBaseTest { + +@BeforeMethod +@Override +public void setup() throws Exception { +super.internalSetup(); + +admin.clusters().createCluster("test", new ClusterData("http://127.0.0.1:; + BROKER_WEBSERVICE_PORT)); +admin.tenants().createTenant("my-tenant", +new TenantInfo(Sets.newHashSet("appid1", "appid2"), Sets.newHashSet("test"))); +admin.namespaces().createNamespace("my-tenant/my-ns", Sets.newHashSet("test")); +} + +@AfterMethod +@Override +public void cleanup() throws Exception { +super.internalCleanup(); +} + +public static String extractKey(RawMessage m) throws Exception { +ByteBuf headersAndPayload = m.getHeadersAndPayload(); +MessageMetadata msgMetadata = Commands.parseMessageMetadata(headersAndPayload); +return msgMetadata.getPartitionKey(); +} + +@Test +public void testWithoutBatches() throws Exception { +String topic = "persistent://my-tenant/my-ns/my-topic"; +TopicName topicName = TopicName.get(topic); + +int n = 10; + +try (Producer producer = pulsarClient.newProducer(Schema.STRING).enableBatching(false).topic(topic) +.create()) { +for (int i = 0; i < n; i++) { +producer.send("hello-" + i); +} +} + +// Read through raw data +ManagedCursor cursor = ((PersistentTopic) pulsar.getBrokerService().getTopicReference(topic).get()) +.getManagedLedger().newNonDurableCurso
[incubator-pulsar] branch master updated: Fixup misleading text in compaction cookbook (#2026)
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 8a8bef7 Fixup misleading text in compaction cookbook (#2026) 8a8bef7 is described below commit 8a8bef7e22bbc563efe68a5632668a2b44b1dc33 Author: Ivan Kelly AuthorDate: Mon Jun 25 18:56:24 2018 +0200 Fixup misleading text in compaction cookbook (#2026) Previously the text said that keyless messages are ignored, which could mean they are retained or are discarded. I've updated the text to clarify. --- site/docs/latest/cookbooks/compaction.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/docs/latest/cookbooks/compaction.md b/site/docs/latest/cookbooks/compaction.md index 035dfd4..df76fa0 100644 --- a/site/docs/latest/cookbooks/compaction.md +++ b/site/docs/latest/cookbooks/compaction.md @@ -11,7 +11,7 @@ To use compaction: * Compaction can be configured to run [automatically](#automatic), or you can manually [trigger](#trigger) compaction using the Pulsar administrative API. * Your {% popover consumers %} must be [configured](#config) to read from compacted topics ([Java consumers](#java), for example, have a `readCompacted` setting that must be set to `true`). If this configuration is not set, consumers will still be able to read from the non-compacted topic. -{% include admonition.html type="warning" content="Compaction only works on messages that have keys (as in the stock ticker example the stock symbol serves as the key for each message). Keys can thus be thought of as the axis along which compaction is applied. Messages that don't have keys are simply ignored by compaction." %} +{% include admonition.html type="warning" content="Compaction only works on messages that have keys (as in the stock ticker example the stock symbol serves as the key for each message). Keys can thus be thought of as the axis along which compaction is applied. Messages that don't have keys are left untouched by compaction, and retained in final compacted topic." %} ## When should I use compacted topics? {#when} @@ -122,4 +122,4 @@ Message msg = MessageBuilder.create() .build(); compactedTopicProducer.send(msg); -``` \ No newline at end of file +```
[incubator-pulsar] branch asf-site updated: Updated site at revision 6eb238b
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git The following commit(s) were added to refs/heads/asf-site by this push: new 41c8dcc Updated site at revision 6eb238b 41c8dcc is described below commit 41c8dcc9a9e1272530e1cf78dd61c7c118432bc6 Author: jenkins AuthorDate: Sat Jun 23 17:30:03 2018 + Updated site at revision 6eb238b --- .../docs/latest/adaptors/PulsarSpark/index.html| 8 .../docs/latest/adaptors/PulsarStorm/index.html| 6 +++--- content/docs/latest/admin-api/overview/index.html | 10 - content/docs/latest/admin/Authz/index.html | 20 +- content/docs/latest/clients/Cpp/index.html | 10 - content/docs/latest/clients/Java/index.html| 14 ++--- content/docs/latest/clients/Python/index.html | 10 - content/docs/latest/clients/WebSocket/index.html | 8 content/docs/latest/clients/go/index.html | 6 +++--- .../docs/latest/cookbooks/Encryption/index.html| 6 +++--- .../latest/cookbooks/PartitionedTopics/index.html | 14 ++--- .../latest/cookbooks/RetentionExpiry/index.html| 14 ++--- .../docs/latest/cookbooks/compaction/index.html| 6 +++--- .../cookbooks/message-deduplication/index.html | 10 - .../docs/latest/cookbooks/message-queue/index.html | 14 ++--- .../latest/cookbooks/tiered-storage/index.html | 4 ++-- .../docs/latest/deployment/Kubernetes/index.html | 4 ++-- .../docs/latest/deployment/aws-cluster/index.html | 4 ++-- content/docs/latest/deployment/cluster/index.html | 4 ++-- content/docs/latest/deployment/instance/index.html | 4 ++-- .../ConceptsAndArchitecture/index.html | 4 ++-- .../latest/getting-started/LocalCluster/index.html | 4 ++-- .../latest/getting-started/Pulsar-2.0/index.html | 2 +- .../docs/latest/getting-started/docker/index.html | 4 ++-- .../docs/latest/project/BinaryProtocol/index.html | 4 ++-- content/docs/latest/project/CompileCpp/index.html | 10 - .../docs/latest/project/SimulationTools/index.html | 2 +- .../docs/latest/project/schema-storage/index.html | 4 ++-- content/docs/latest/reference/CliTools/index.html | 18 .../docs/latest/reference/CustomAuth/index.html| 4 ++-- content/docs/latest/reference/RestApi/index.html | 4 ++-- content/ja/adaptors/PulsarSpark/index.html | 8 content/ja/adaptors/PulsarStorm/index.html | 6 +++--- content/ja/admin/AdminInterface/index.html | 14 ++--- content/ja/admin/Authz/index.html | 24 +++--- content/ja/admin/ClustersBrokers/index.html| 8 content/ja/admin/PropertiesNamespaces/index.html | 8 content/ja/advanced/PartitionedTopics/index.html | 14 ++--- content/ja/advanced/RetentionExpiry/index.html | 14 ++--- content/ja/clients/Cpp/index.html | 8 content/ja/clients/Java/index.html | 8 content/ja/clients/Python/index.html | 8 content/ja/clients/WebSocket/index.html| 8 content/ja/deployment/InstanceSetup/index.html | 8 content/ja/deployment/Kubernetes/index.html| 4 ++-- .../ConceptsAndArchitecture/index.html | 2 +- content/ja/getting-started/LocalCluster/index.html | 4 ++-- content/ja/project/BinaryProtocol/index.html | 4 ++-- content/ja/project/SimulationTools/index.html | 2 +- content/ja/reference/CliTools/index.html | 20 +- content/ja/reference/RestApi/index.html| 4 ++-- 51 files changed, 206 insertions(+), 206 deletions(-) diff --git a/content/docs/latest/adaptors/PulsarSpark/index.html b/content/docs/latest/adaptors/PulsarSpark/index.html index 867b663..8596082 100644 --- a/content/docs/latest/adaptors/PulsarSpark/index.html +++ b/content/docs/latest/adaptors/PulsarSpark/index.html @@ -1014,9 +1014,9 @@ + Spark Streaming Pulsar receiver - Spark Streaming Pulsar receiver @@ -1246,9 +1246,9 @@ + Spark Streaming Pulsar receiver - Spark Streaming Pulsar receiver @@ -1394,8 +1394,6 @@ - - Authentication and authorization in Pulsar @@ -1556,6 +1554,8 @@ + + Using Pulsar as a message queue diff --git a/content/docs/latest/adaptors/PulsarStorm/index.html b/content/docs/latest/adaptors/PulsarStorm
[incubator-pulsar] branch asf-site updated: Updated site at revision 9ad5446
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git The following commit(s) were added to refs/heads/asf-site by this push: new 209344c Updated site at revision 9ad5446 209344c is described below commit 209344c49d006244b68a5db52e2fe972e9af95a0 Author: jenkins AuthorDate: Wed Jun 20 22:33:20 2018 + Updated site at revision 9ad5446 --- content/api/pulsar-functions/index-all.html| 16 ++- .../org/apache/pulsar/functions/api/SerDe.html | 51 +++--- .../pulsar/functions/api/utils/DefaultSerDe.html | 7 +++ .../pulsar/functions/api/utils/JavaSerDe.html | 7 +++ .../docs/latest/adaptors/PulsarSpark/index.html| 8 ++-- .../docs/latest/adaptors/PulsarStorm/index.html| 6 +-- content/docs/latest/admin-api/overview/index.html | 10 ++--- content/docs/latest/admin/Authz/index.html | 20 - content/docs/latest/clients/Cpp/index.html | 10 ++--- content/docs/latest/clients/Java/index.html| 14 +++--- content/docs/latest/clients/Python/index.html | 10 ++--- content/docs/latest/clients/WebSocket/index.html | 8 ++-- .../docs/latest/cookbooks/Encryption/index.html| 6 +-- .../latest/cookbooks/PartitionedTopics/index.html | 14 +++--- .../latest/cookbooks/RetentionExpiry/index.html| 14 +++--- .../docs/latest/cookbooks/compaction/index.html| 6 +-- .../cookbooks/message-deduplication/index.html | 10 ++--- .../docs/latest/cookbooks/message-queue/index.html | 14 +++--- .../latest/cookbooks/tiered-storage/index.html | 4 +- .../docs/latest/deployment/Kubernetes/index.html | 4 +- .../docs/latest/deployment/aws-cluster/index.html | 4 +- content/docs/latest/deployment/cluster/index.html | 4 +- content/docs/latest/deployment/instance/index.html | 4 +- .../ConceptsAndArchitecture/index.html | 4 +- .../latest/getting-started/LocalCluster/index.html | 4 +- .../latest/getting-started/Pulsar-2.0/index.html | 2 +- .../docs/latest/getting-started/docker/index.html | 4 +- .../docs/latest/project/BinaryProtocol/index.html | 4 +- content/docs/latest/project/CompileCpp/index.html | 10 ++--- .../docs/latest/project/SimulationTools/index.html | 2 +- .../docs/latest/project/schema-storage/index.html | 4 +- content/docs/latest/reference/CliTools/index.html | 18 .../docs/latest/reference/CustomAuth/index.html| 4 +- content/docs/latest/reference/RestApi/index.html | 4 +- content/ja/adaptors/PulsarSpark/index.html | 8 ++-- content/ja/adaptors/PulsarStorm/index.html | 6 +-- content/ja/admin/AdminInterface/index.html | 14 +++--- content/ja/admin/Authz/index.html | 24 +- content/ja/admin/ClustersBrokers/index.html| 8 ++-- content/ja/admin/PropertiesNamespaces/index.html | 8 ++-- content/ja/advanced/PartitionedTopics/index.html | 14 +++--- content/ja/advanced/RetentionExpiry/index.html | 14 +++--- content/ja/clients/Cpp/index.html | 8 ++-- content/ja/clients/Java/index.html | 8 ++-- content/ja/clients/Python/index.html | 8 ++-- content/ja/clients/WebSocket/index.html| 8 ++-- content/ja/deployment/InstanceSetup/index.html | 8 ++-- content/ja/deployment/Kubernetes/index.html| 4 +- .../ConceptsAndArchitecture/index.html | 2 +- content/ja/getting-started/LocalCluster/index.html | 4 +- content/ja/project/BinaryProtocol/index.html | 4 +- content/ja/project/SimulationTools/index.html | 2 +- content/ja/reference/CliTools/index.html | 20 - content/ja/reference/RestApi/index.html| 4 +- 54 files changed, 277 insertions(+), 210 deletions(-) diff --git a/content/api/pulsar-functions/index-all.html b/content/api/pulsar-functions/index-all.html index 41c517e..8121e0b 100644 --- a/content/api/pulsar-functions/index-all.html +++ b/content/api/pulsar-functions/index-all.html @@ -67,7 +67,7 @@ -ACDFGIJOPRS +ACDEFGIJOPRS A @@ -94,6 +94,8 @@ D +decode(byte[]) - Method in interface org.apache.pulsar.functions.api.SerDe + DefaultSerDe - Class in org.apache.pulsar.functions.api.utils Simplest form of SerDe. @@ -107,6 +109,14 @@ deserialize(byte[]) - Method in class org.apache.pulsar.functions.api.utils.JavaSerDe + + + +E + +encode(T) - Method in interface org.apache.pulsar.functions.api.SerDe + + @@ -167,6 +177,8 @@ Get the output topic of the function +getSchemaInfo() - Method in interface org.apache.pulsar.functions.api.SerDe + getTenant() - Method in interface org.apache.pulsar.functions.api.Context The tenant this function belongs to @@ -270,7 +282,7 @@ serialize(Object) - Method in class org.apache.pulsar.functions.api.utils.JavaSerDe -ACDFGIJOPRS +ACDEFGIJOPRS
[incubator-pulsar] branch master updated: Added custom compiled OpenSSL into docker image for RPM/Deb (#2032)
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 ca93d4a Added custom compiled OpenSSL into docker image for RPM/Deb (#2032) ca93d4a is described below commit ca93d4a949ca06c0211be29c47c5c9b22fd91715 Author: Matteo Merli AuthorDate: Tue Jun 26 13:59:18 2018 -0700 Added custom compiled OpenSSL into docker image for RPM/Deb (#2032) --- pulsar-client-cpp/pkg/deb/Dockerfile | 11 +-- pulsar-client-cpp/pkg/rpm/Dockerfile | 12 +--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/pulsar-client-cpp/pkg/deb/Dockerfile b/pulsar-client-cpp/pkg/deb/Dockerfile index 8f538ec..7740728 100644 --- a/pulsar-client-cpp/pkg/deb/Dockerfile +++ b/pulsar-client-cpp/pkg/deb/Dockerfile @@ -21,8 +21,8 @@ FROM debian:9 - RUN apt-get update && \ - apt-get install -y curl g++ make libcurl4-openssl-dev libssl-dev python-dev \ +RUN apt-get update && \ + apt-get install -y curl g++ make python-dev \ libxml2-utils git # Download and compile boost @@ -64,6 +64,13 @@ RUN curl -O -L https://github.com/madler/zlib/archive/v1.2.11.tar.gz && \ make && make install && \ rm -rf /zlib-1.2.11.tar.gz /zlib-1.2.11 +RUN curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_0h.tar.gz && \ +tar xvfz OpenSSL_1_1_0h.tar.gz && \ +cd openssl-OpenSSL_1_1_0h/ && \ +./Configure -fPIC no-shared linux-x86_64 && \ +make && make install && \ +rm -rf /OpenSSL_1_1_0h.tar.gz /openssl-OpenSSL_1_1_0h + # LibCurl RUN curl -O -L https://github.com/curl/curl/releases/download/curl-7_54_0/curl-7.54.0.tar.gz && \ tar xvfz curl-7.54.0.tar.gz && \ diff --git a/pulsar-client-cpp/pkg/rpm/Dockerfile b/pulsar-client-cpp/pkg/rpm/Dockerfile index c321d07..2ff1288 100644 --- a/pulsar-client-cpp/pkg/rpm/Dockerfile +++ b/pulsar-client-cpp/pkg/rpm/Dockerfile @@ -23,7 +23,7 @@ FROM centos:7 RUN yum update && \ yum install -y gcc-c++ make cmake git rpm-build \ -python-devel openssl-devel openssl-static +python-devel createrepo # Download and compile boost RUN curl -O -L https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz && \ @@ -64,6 +64,13 @@ RUN curl -O -L https://github.com/madler/zlib/archive/v1.2.11.tar.gz && \ make && make install && \ rm -rf /zlib-1.2.11.tar.gz /zlib-1.2.11 +RUN curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_0h.tar.gz && \ +tar xvfz OpenSSL_1_1_0h.tar.gz && \ +cd openssl-OpenSSL_1_1_0h/ && \ +./Configure -fPIC no-shared linux-x86_64 && \ +make && make install && \ +rm -rf /OpenSSL_1_1_0h.tar.gz /openssl-OpenSSL_1_1_0h + # LibCurl RUN curl -O -L https://github.com/curl/curl/releases/download/curl-7_54_0/curl-7.54.0.tar.gz && \ tar xvfz curl-7.54.0.tar.gz && \ @@ -72,6 +79,5 @@ RUN curl -O -L https://github.com/curl/curl/releases/download/curl-7_54_0/curl- make && make install && \ rm -rf /curl-7.54.0.tar.gz /curl-7.54.0 -ADD build-rpm.sh / -RUN yum install -y createrepo +
[incubator-pulsar] branch master updated: adding a module that shades managed-ledge (#2034)
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 b0292a1 adding a module that shades managed-ledge (#2034) b0292a1 is described below commit b0292a182d768b2fead6e433e208e9f59602f24f Author: Boyang Jerry Peng AuthorDate: Tue Jun 26 15:31:15 2018 -0700 adding a module that shades managed-ledge (#2034) * adding a module that shades managed-ledger * removing commented out lines --- managed-ledger-shaded/pom.xml | 291 + managed-ledger/pom.xml | 2 +- pom.xml| 1 + pulsar-broker-auth-athenz/pom.xml | 2 +- pulsar-broker/pom.xml | 4 +- .../pulsar-client-kafka-tests/pom.xml | 2 +- .../pulsar-client-kafka/pom.xml| 2 +- pulsar-client-tools-test/pom.xml | 2 +- pulsar-discovery-service/pom.xml | 4 +- 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 | 4 +- tests/integration/s3-offload/pom.xml | 2 +- 16 files changed, 309 insertions(+), 17 deletions(-) diff --git a/managed-ledger-shaded/pom.xml b/managed-ledger-shaded/pom.xml new file mode 100644 index 000..3ec3b46 --- /dev/null +++ b/managed-ledger-shaded/pom.xml @@ -0,0 +1,291 @@ + + +http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; +xmlns="http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> +4.0.0 + +org.apache.pulsar +pulsar +2.2.0-incubating-SNAPSHOT +.. + + +managed-ledger +Managed Ledger + + + +${project.groupId} +managed-ledger-original +${project.version} + + + + + +org.apache.maven.plugins +maven-shade-plugin + + +package + +shade + + + true + true + + + + org.apache.pulsar:pulsar-functions-proto + org.apache.pulsar:pulsar-io-core + org.apache.pulsar:pulsar-client-original + org.apache.pulsar:pulsar-client-admin-original + org.apache.pulsar:managed-ledger-original + org.apache.commons:commons-lang3 + commons-codec:commons-codec + commons-collections:commons-collections +]org.asynchttpclient:* + io.netty:netty-codec-http + io.netty:netty-transport-native-epoll + org.reactivestreams:reactive-streams + com.typesafe.netty:netty-reactive-streams +org.javassist:javassist + com.google.protobuf:protobuf-java +com.google.guava:guava + com.google.code.gson:gson + com.fasterxml.jackson.core +io.netty:netty +io.netty:netty-all + org.apache.pulsar:pulsar-common +net.jpountz.lz4:lz4 + com.yahoo.datasketches:sketches-core +org.glassfish.jersey*:* +javax.ws.rs:* +javax.annotation:* +org.glassfish.hk2*:* + com.fasterxml.jackson.*:* +io.grpc:* +com.yahoo.datasketches:* +io.netty:* +com.squareup.*:* +com.google.*:* +
[incubator-pulsar] branch asf-site updated: Updated site at revision 174fd02
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git The following commit(s) were added to refs/heads/asf-site by this push: new 9b653bd Updated site at revision 174fd02 9b653bd is described below commit 9b653bd7248e6323f758d23445002641eedba861 Author: jenkins AuthorDate: Wed Jun 27 08:37:39 2018 + Updated site at revision 174fd02 --- .../docs/latest/adaptors/PulsarSpark/index.html| 8 .../docs/latest/adaptors/PulsarStorm/index.html| 6 +++--- content/docs/latest/admin-api/overview/index.html | 10 - content/docs/latest/admin/Authz/index.html | 20 +- content/docs/latest/clients/Cpp/index.html | 10 - content/docs/latest/clients/Java/index.html| 14 ++--- content/docs/latest/clients/Python/index.html | 10 - content/docs/latest/clients/WebSocket/index.html | 8 content/docs/latest/clients/go/index.html | 6 +++--- .../docs/latest/cookbooks/Encryption/index.html| 6 +++--- .../latest/cookbooks/PartitionedTopics/index.html | 14 ++--- .../latest/cookbooks/RetentionExpiry/index.html| 14 ++--- .../docs/latest/cookbooks/compaction/index.html| 6 +++--- .../cookbooks/message-deduplication/index.html | 10 - .../docs/latest/cookbooks/message-queue/index.html | 14 ++--- .../latest/cookbooks/tiered-storage/index.html | 4 ++-- .../docs/latest/deployment/Kubernetes/index.html | 4 ++-- .../docs/latest/deployment/aws-cluster/index.html | 4 ++-- content/docs/latest/deployment/cluster/index.html | 4 ++-- content/docs/latest/deployment/instance/index.html | 4 ++-- .../ConceptsAndArchitecture/index.html | 4 ++-- .../latest/getting-started/LocalCluster/index.html | 4 ++-- .../latest/getting-started/Pulsar-2.0/index.html | 2 +- .../docs/latest/getting-started/docker/index.html | 4 ++-- .../docs/latest/project/BinaryProtocol/index.html | 4 ++-- content/docs/latest/project/CompileCpp/index.html | 10 - .../docs/latest/project/SimulationTools/index.html | 2 +- .../docs/latest/project/schema-storage/index.html | 4 ++-- content/docs/latest/reference/CliTools/index.html | 18 .../docs/latest/reference/CustomAuth/index.html| 4 ++-- content/docs/latest/reference/RestApi/index.html | 4 ++-- content/ja/adaptors/PulsarSpark/index.html | 8 content/ja/adaptors/PulsarStorm/index.html | 6 +++--- content/ja/admin/AdminInterface/index.html | 14 ++--- content/ja/admin/Authz/index.html | 24 +++--- content/ja/admin/ClustersBrokers/index.html| 8 content/ja/admin/PropertiesNamespaces/index.html | 8 content/ja/advanced/PartitionedTopics/index.html | 14 ++--- content/ja/advanced/RetentionExpiry/index.html | 14 ++--- content/ja/clients/Cpp/index.html | 8 content/ja/clients/Java/index.html | 8 content/ja/clients/Python/index.html | 8 content/ja/clients/WebSocket/index.html| 8 content/ja/deployment/InstanceSetup/index.html | 8 content/ja/deployment/Kubernetes/index.html| 4 ++-- .../ConceptsAndArchitecture/index.html | 2 +- content/ja/getting-started/LocalCluster/index.html | 4 ++-- content/ja/project/BinaryProtocol/index.html | 4 ++-- content/ja/project/SimulationTools/index.html | 2 +- content/ja/reference/CliTools/index.html | 20 +- content/ja/reference/RestApi/index.html| 4 ++-- 51 files changed, 206 insertions(+), 206 deletions(-) diff --git a/content/docs/latest/adaptors/PulsarSpark/index.html b/content/docs/latest/adaptors/PulsarSpark/index.html index bfd771b..f636921 100644 --- a/content/docs/latest/adaptors/PulsarSpark/index.html +++ b/content/docs/latest/adaptors/PulsarSpark/index.html @@ -1021,9 +1021,9 @@ - Spark Streaming Pulsar receiver + Spark Streaming Pulsar receiver @@ -1255,9 +1255,9 @@ - Spark Streaming Pulsar receiver + Spark Streaming Pulsar receiver @@ -1405,6 +1405,8 @@ + + Authentication and authorization in Pulsar @@ -1565,8 +1567,6 @@ - - Using Pulsar as a message queue diff --git a/content/docs/latest/adaptors/PulsarStorm/index.html b/content/docs/latest/adaptors/PulsarStorm
[incubator-pulsar] branch master updated: Improve RedeliverUnacknowledgedMessages binary protocol docs (#2066)
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 7559632 Improve RedeliverUnacknowledgedMessages binary protocol docs (#2066) 7559632 is described below commit 7559632715e21bfc32e8f84db8cd368f697993f9 Author: Adam Williams AuthorDate: Mon Jul 2 16:05:06 2018 -0600 Improve RedeliverUnacknowledgedMessages binary protocol docs (#2066) This updates the binary protocol documentation to mention the varying behavior of `RedeliverUnacknowledgedMessages`, depending on the subscription type. Closes apache/incubator-pulsar#2003 --- site/docs/latest/project/BinaryProtocol.md | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/site/docs/latest/project/BinaryProtocol.md b/site/docs/latest/project/BinaryProtocol.md index 91a0ca3..67b0113 100644 --- a/site/docs/latest/project/BinaryProtocol.md +++ b/site/docs/latest/project/BinaryProtocol.md @@ -424,8 +424,9 @@ A consumer can ask the broker to redeliver some or all of the pending messages that were pushed to that particular consumer and not yet acknowledged. The protobuf object accepts a list of message ids that the consumer wants to -be redelivered. If the list is empty, the broker will redeliver all the -pending messages. +be redelivered. The message ids will be honored by the broker only if the +subscription type is shared. For other subscription types or if the list +is empty, the broker will redeliver all the pending messages. On redelivery, messages can be sent to the same consumer or, in the case of a shared subscription, spread across all available consumers. @@ -442,16 +443,16 @@ messages are coming from the consumer. # Command ConsumerStats -This command is sent by the client to retreive Subscriber and Consumer level +This command is sent by the client to retrieve Subscriber and Consumer level stats from the broker. Parameters: - * `request_id` → Id of the request, used to correlate the request + * `request_id` → Id of the request, used to correlate the request and the response. * `consumer_id` → Id of an already established consumer. # Command ConsumerStatsResponse -This is the broker's response to ConsumerStats request by the client. +This is the broker's response to ConsumerStats request by the client. It contains the Subscriber and Consumer level stats of the `consumer_id` sent in the request. If the `error_code` or the `error_message` field is set it indicates that the request has failed.
[incubator-pulsar] branch asf-site updated: Updated site at revision 5614cc5
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git The following commit(s) were added to refs/heads/asf-site by this push: new 4ca5883 Updated site at revision 5614cc5 4ca5883 is described below commit 4ca5883d7ef36cd4f9748d463c47f4a44cd6ee6b Author: jenkins AuthorDate: Tue Jul 3 08:50:58 2018 + Updated site at revision 5614cc5 --- content/api/client/index-all.html | 5 +++ .../client/api/ConsumerCryptoFailureAction.html| 13 ++- .../org/apache/pulsar/client/api/Message.html | 45 -- .../docs/latest/adaptors/PulsarSpark/index.html| 10 ++--- .../docs/latest/adaptors/PulsarStorm/index.html| 8 ++-- content/docs/latest/admin-api/overview/index.html | 18 - content/docs/latest/admin/Authz/index.html | 24 ++-- content/docs/latest/clients/Cpp/index.html | 10 ++--- content/docs/latest/clients/Java/index.html| 16 content/docs/latest/clients/Python/index.html | 10 ++--- content/docs/latest/clients/WebSocket/index.html | 8 ++-- content/docs/latest/clients/go/index.html | 6 +-- .../docs/latest/cookbooks/Encryption/index.html| 6 +-- .../latest/cookbooks/PartitionedTopics/index.html | 16 .../latest/cookbooks/RetentionExpiry/index.html| 16 .../docs/latest/cookbooks/compaction/index.html| 8 ++-- .../cookbooks/message-deduplication/index.html | 12 +++--- .../docs/latest/cookbooks/message-queue/index.html | 16 .../latest/cookbooks/tiered-storage/index.html | 6 +-- .../docs/latest/deployment/Kubernetes/index.html | 4 +- .../docs/latest/deployment/aws-cluster/index.html | 6 +-- content/docs/latest/deployment/cluster/index.html | 6 +-- content/docs/latest/deployment/instance/index.html | 6 +-- .../ConceptsAndArchitecture/index.html | 4 +- .../latest/getting-started/LocalCluster/index.html | 4 +- .../latest/getting-started/Pulsar-2.0/index.html | 2 +- .../docs/latest/getting-started/docker/index.html | 4 +- .../docs/latest/project/BinaryProtocol/index.html | 15 content/docs/latest/project/CompileCpp/index.html | 10 ++--- .../docs/latest/project/SimulationTools/index.html | 2 +- .../docs/latest/project/schema-storage/index.html | 4 +- content/docs/latest/reference/CliTools/index.html | 22 +-- .../docs/latest/reference/CustomAuth/index.html| 4 +- content/ja/adaptors/PulsarSpark/index.html | 8 ++-- content/ja/adaptors/PulsarStorm/index.html | 6 +-- content/ja/admin/AdminInterface/index.html | 14 +++ content/ja/admin/Authz/index.html | 24 ++-- content/ja/admin/ClustersBrokers/index.html| 8 ++-- content/ja/admin/PropertiesNamespaces/index.html | 8 ++-- content/ja/advanced/PartitionedTopics/index.html | 14 +++ content/ja/advanced/RetentionExpiry/index.html | 14 +++ content/ja/clients/Cpp/index.html | 8 ++-- content/ja/clients/Java/index.html | 8 ++-- content/ja/clients/Python/index.html | 8 ++-- content/ja/clients/WebSocket/index.html| 8 ++-- content/ja/deployment/InstanceSetup/index.html | 8 ++-- content/ja/deployment/Kubernetes/index.html| 4 +- .../ConceptsAndArchitecture/index.html | 2 +- content/ja/getting-started/LocalCluster/index.html | 4 +- content/ja/project/BinaryProtocol/index.html | 4 +- content/ja/project/SimulationTools/index.html | 2 +- content/ja/reference/CliTools/index.html | 20 +- 52 files changed, 278 insertions(+), 240 deletions(-) diff --git a/content/api/client/index-all.html b/content/api/client/index-all.html index 0fb9f5f..12076a6 100644 --- a/content/api/client/index-all.html +++ b/content/api/client/index-all.html @@ -630,6 +630,11 @@ Get the content of the message +getEncryptionCtx() - Method in interface org.apache.pulsar.client.api.Message + +EncryptionContext contains encryption and compression information in it using which application can + decrypt consumed message with encrypted-payload. + getEncryptionKeys() - Method in class org.apache.pulsar.client.api.ProducerConfiguration Deprecated. diff --git a/content/api/client/org/apache/pulsar/client/api/ConsumerCryptoFailureAction.html b/content/api/client/org/apache/pulsar/client/api/ConsumerCryptoFailureAction.html index bb73f7e..6ee83bd 100644 --- a/content/api/client/org/apache/pulsar/client/api/ConsumerCryptoFailureAction.html +++ b/content/api/client/org/apache/pulsar/client/api/ConsumerCryptoFailureAction.html @@ -136,7 +136,10 @@ extends EnumEnum Constant and Description -CONSUME +CONSUME + + Deliver the encrypted message to the application. + DISCARD @@ -226,6 +229,14 @@ the order
[incubator-pulsar] branch master updated: Return an error if schema is incompatible (#1692)
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 28eb372 Return an error if schema is incompatible (#1692) 28eb372 is described below commit 28eb37204306b54c253fc1d5ae7898455624def4 Author: Dave Rusek <dave.ru...@gmail.com> AuthorDate: Tue May 1 12:20:57 2018 -0600 Return an error if schema is incompatible (#1692) * Return an error is schema is incompatible * Handle string versions correctly * Handle string versions correctly * fix header and update status code for incompatible schemas --- .../pulsar/broker/admin/v2/SchemasResource.java| 24 +- .../schema/IncompatibleSchemaException.java| 29 ++ .../service/schema/SchemaRegistryServiceImpl.java | 2 +- 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/SchemasResource.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/SchemasResource.java index f6d79cc..0f6b996 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/SchemasResource.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/SchemasResource.java @@ -18,8 +18,6 @@ */ package org.apache.pulsar.broker.admin.v2; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; import static java.util.Objects.isNull; import static org.apache.commons.lang.StringUtils.defaultIfEmpty; import static org.apache.pulsar.common.util.Codec.decode; @@ -27,8 +25,9 @@ import static org.apache.pulsar.common.util.Codec.decode; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Charsets; import io.swagger.annotations.ApiOperation; +import java.nio.ByteBuffer; import java.time.Clock; -import java.util.Optional; +import java.util.concurrent.CompletableFuture; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.Encoded; @@ -42,7 +41,7 @@ import javax.ws.rs.container.Suspended; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.pulsar.broker.admin.AdminResource; -import org.apache.pulsar.broker.service.Topic; +import org.apache.pulsar.broker.service.schema.IncompatibleSchemaException; import org.apache.pulsar.broker.web.RestException; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.schema.DeleteSchemaResponse; @@ -86,6 +85,8 @@ public class SchemasResource extends AdminResource { if (isNull(error)) { if (isNull(schema)) { response.resume(Response.status(Response.Status.NOT_FOUND).build()); +} else if (schema.schema.isDeleted()) { +response.resume(Response.noContent()); } else { response.resume( Response.ok() @@ -122,7 +123,9 @@ public class SchemasResource extends AdminResource { validateDestinationAndAdminOperation(tenant, namespace, topic); String schemaId = buildSchemaId(tenant, namespace, topic); -SchemaVersion v = pulsar().getSchemaRegistryService().versionFromBytes(version.getBytes()); +ByteBuffer bbVersion = ByteBuffer.allocate(Long.SIZE); +bbVersion.putLong(Long.parseLong(version)); +SchemaVersion v = pulsar().getSchemaRegistryService().versionFromBytes(bbVersion.array()); pulsar().getSchemaRegistryService().getSchema(schemaId, v) .handle((schema, error) -> { if (isNull(error)) { @@ -212,7 +215,16 @@ public class SchemasResource extends AdminResource { .build() ).build() ) -); +).exceptionally(error -> { +if (error instanceof IncompatibleSchemaException) { + response.resume(Response.status(Response.Status.CONFLICT).build()); +} else { +response.resume( +Response.serverError().build() +); +} +return null; +}); } private String buildSchemaId(String tenant, String namespace, String topic) { diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/IncompatibleSchemaException.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/IncompatibleSchemaException.java new file mode 100644 index 000..975ba0d --- /dev/null +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/IncompatibleSchemaException.java @@ -0,0 +1,29 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor licens
[incubator-pulsar] branch master updated: Add tenant and namespace getters to Python context (#1677)
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 d5780ef Add tenant and namespace getters to Python context (#1677) d5780ef is described below commit d5780ef1deeed6d24748f263a958e3212a603f89 Author: Luc Perkins <lucperk...@gmail.com> AuthorDate: Mon Apr 30 14:00:24 2018 -0700 Add tenant and namespace getters to Python context (#1677) * add tenant and namespace getters on Python context * switch to getInputTopicName * re-name current message methods --- pulsar-client-cpp/python/functions/context.py | 17 + .../java/org/apache/pulsar/functions/api/Context.java | 6 +++--- .../apache/pulsar/functions/instance/ContextImpl.java | 2 +- .../instance/src/main/python/contextimpl.py | 12 +--- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/pulsar-client-cpp/python/functions/context.py b/pulsar-client-cpp/python/functions/context.py index c1f30ed..0257b69 100644 --- a/pulsar-client-cpp/python/functions/context.py +++ b/pulsar-client-cpp/python/functions/context.py @@ -50,9 +50,18 @@ class Context(object): pass @abstractmethod - def get_topic_name(self): + def get_current_message_topic_name(self): """Returns the topic name of the message that we are processing""" pass + + @abstractmethod + def get_function_tenant(self): +"""Returns the tenant of the message that's being processed""" +pass + + @abstractmethod + def get_function_namespace(self): +"""Returns the namespace of the message that's being processed""" @abstractmethod def get_function_name(self): @@ -106,15 +115,15 @@ class Context(object): @abstractmethod def get_output_topic(self): -'''Returns the output topic of function''' +"""Returns the output topic of function""" pass @abstractmethod def get_output_serde_class_name(self): -'''return output Serde class''' +"""return output Serde class""" pass @abstractmethod def ack(self, msgid, topic): -'''ack this message id''' +"""ack this message id""" pass \ No newline at end of file diff --git a/pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java b/pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java index c4d78c2..653d176 100644 --- a/pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java +++ b/pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java @@ -40,10 +40,10 @@ public interface Context { byte[] getMessageId(); /** - * The topic that this message belongs to - * @return The topic name + * The input topic that the message currently being processed belongs to + * @return The input topic name */ -String getTopicName(); +String getCurrentMessageTopicName(); /** * Get a list of all input topics diff --git a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java index 04291b2..7a01d25 100644 --- a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java +++ b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java @@ -122,7 +122,7 @@ class ContextImpl implements Context { } @Override -public String getTopicName() { +public String getCurrentMessageTopicName() { return currentTopicName; } diff --git a/pulsar-functions/instance/src/main/python/contextimpl.py b/pulsar-functions/instance/src/main/python/contextimpl.py index 6e59306..a841152 100644 --- a/pulsar-functions/instance/src/main/python/contextimpl.py +++ b/pulsar-functions/instance/src/main/python/contextimpl.py @@ -57,24 +57,30 @@ class ContextImpl(pulsar.Context): self.publish_producers = {} self.publish_serializers = {} self.current_message_id = None -self.current_topic_name = None +self.current_input_topic_name = None self.current_start_time = None # Called on a per message basis to set the context for the current message def set_current_message_context(self, msgid, topic): self.current_message_id = msgid -self.current_topic_name = topic +self.current_input_topic_name = topic self.current_start_time = time.time() def get_message_id(self): return self.current_message_id - def get_topic_name(self): + def get_current_message_topi
[incubator-pulsar] branch master updated: Protobuf documentation update (#1686)
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 31131c2 Protobuf documentation update (#1686) 31131c2 is described below commit 31131c23644a3e9c9e951a6fb64741c290c84bb1 Author: Luc Perkins <lucperk...@gmail.com> AuthorDate: Mon Apr 30 13:47:28 2018 -0700 Protobuf documentation update (#1686) * use go get for protoc-gen-doc * modify Dockerfile for website build --- build/docker/Dockerfile | 9 +++-- site/.gitignore | 1 - site/Makefile| 6 +- site/scripts/protobuf-doc-gen.sh | 2 +- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile index 2075135..e948375 100644 --- a/build/docker/Dockerfile +++ b/build/docker/Dockerfile @@ -28,7 +28,7 @@ RUN apt-get install -y maven tig g++ cmake libssl-dev libcurl4-openssl-dev \ liblog4cxx-dev libprotobuf-dev libboost-all-dev google-mock libgtest-dev \ libjsoncpp-dev libxml2-utils protobuf-compiler wget \ curl doxygen openjdk-8-jdk-headless clang-format-5.0 \ -gnupg2 +gnupg2 golang-1.10-go # Compile and install gtest RUN cd /usr/src/gtest && cmake . && make && cp libgtest.a /usr/lib @@ -54,11 +54,8 @@ RUN rvm install 2.4.1 RUN wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py RUN pip install pdoc -# Protogen doc generator -RUN wget https://github.com/pseudomuto/protoc-gen-doc/releases/download/v1.0.0-alpha/protoc-gen-doc-1.0.0-alpha.linux-amd64.go1.8.1.tar.gz && \ -tar xvfz protoc-gen-doc-1.0.0-alpha.linux-amd64.go1.8.1.tar.gz && \ -cp protoc-gen-doc-1.0.0-alpha.linux-amd64.go1.8.1/protoc-gen-doc /usr/local/bin && \ -rm protoc-gen-doc-1.0.0-alpha.linux-amd64.go1.8.1.tar.gz +# Install Protobuf doc generator +RUN go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc # Build the patched protoc RUN git clone https://github.com/google/protobuf.git /pulsar/protobuf && \ diff --git a/site/.gitignore b/site/.gitignore index 2a2780d..3ebc224 100644 --- a/site/.gitignore +++ b/site/.gitignore @@ -12,6 +12,5 @@ generated/ _data/config/*.bak _data/admin-rest-api-swagger.json _data/protobuf.json -scripts/protoc-gen-doc scripts/doxygen scripts/htmltest-* diff --git a/site/Makefile b/site/Makefile index 970959d..1fe6253 100644 --- a/site/Makefile +++ b/site/Makefile @@ -87,11 +87,7 @@ protobuf_doc_gen: scripts/protobuf-doc-gen.sh protobuf_setup: - rm -rf protoc-gen-doc scripts/protoc-gen-doc - git clone https://github.com/pseudomuto/protoc-gen-doc - rm -rf protoc-gen-doc/.git - mv protoc-gen-doc scripts - (cd scripts/protoc-gen-doc && PROTOBUF_PREFIX=$(shell brew --prefix protobuf) qmake && make) + go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc api_docs: javadoc python_doc_gen cpp_doc_gen diff --git a/site/scripts/protobuf-doc-gen.sh b/site/scripts/protobuf-doc-gen.sh index 0dfa2c0..01670ba 100755 --- a/site/scripts/protobuf-doc-gen.sh +++ b/site/scripts/protobuf-doc-gen.sh @@ -23,6 +23,6 @@ ROOT_DIR=$(git rev-parse --show-toplevel) PROTO_FILE=pulsar-common/src/main/proto/PulsarApi.proto ( - cd $(git rev-parse --show-toplevel) + cd $ROOT_DIR protoc --doc_out=json,protobuf.json:site/_data/ $PROTO_FILE ) -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Add admin api to delete topic forcefully (#1656)
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 40f3933 Add admin api to delete topic forcefully (#1656) 40f3933 is described below commit 40f39333ccaf2497b4dbb3ed11665aaca7c5bf69 Author: Rajan Dhabalia <rdhaba...@apache.org> AuthorDate: Tue May 1 14:53:26 2018 -0700 Add admin api to delete topic forcefully (#1656) * Add admin api to delete topic forcefully * Added option on CmdTopics as well * Fixed mocked test * Fixed other mock verification --- .../broker/admin/impl/PersistentTopicsBase.java| 24 +- .../pulsar/broker/admin/v1/PersistentTopics.java | 9 ++- .../pulsar/broker/admin/v2/PersistentTopics.java | 10 ++- .../org/apache/pulsar/broker/service/Topic.java| 2 + .../service/nonpersistent/NonPersistentTopic.java | 90 +++--- .../broker/service/persistent/PersistentTopic.java | 3 +- .../broker/service/ReplicatorGlobalNSTest.java | 33 ++-- .../pulsar/client/admin/PersistentTopics.java | 7 +- .../org/apache/pulsar/client/admin/Topics.java | 57 -- .../pulsar/client/admin/internal/TopicsImpl.java | 22 +- .../pulsar/admin/cli/PulsarAdminToolTest.java | 8 +- .../pulsar/admin/cli/CmdPersistentTopics.java | 10 ++- .../org/apache/pulsar/admin/cli/CmdTopics.java | 12 ++- 13 files changed, 221 insertions(+), 66 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java index 21b14d0..ff50ec1 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java @@ -38,6 +38,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeMap; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -285,6 +286,17 @@ public class PersistentTopicsBase extends AdminResource { } } +protected void internalDeleteTopicForcefully(boolean authoritative) { +validateAdminOperationOnTopic(true); +Topic topic = getTopicReference(topicName); +try { +topic.deleteForcefully().get(); +} catch (Exception e) { +log.error("[{}] Failed to delete topic forcefully {}", clientAppId(), topicName, e); +throw new RestException(e); +} +} + protected void internalRevokePermissionsOnTopic(String role) { // This operation should be reading from zookeeper and it should be allowed without having admin privileges validateAdminAccessForTenant(namespaceName.getTenant()); @@ -394,7 +406,7 @@ public class PersistentTopicsBase extends AdminResource { return metadata; } -protected void internalDeletePartitionedTopic(boolean authoritative) { +protected void internalDeletePartitionedTopic(boolean authoritative, boolean force) { validateAdminAccessForTenant(topicName.getTenant()); PartitionedTopicMetadata partitionMetadata = getPartitionedTopicMetadata(topicName, authoritative); int numPartitions = partitionMetadata.partitions; @@ -404,7 +416,7 @@ public class PersistentTopicsBase extends AdminResource { try { for (int i = 0; i < numPartitions; i++) { TopicName topicNamePartition = topicName.getPartition(i); - pulsar().getAdminClient().topics().deleteAsync(topicNamePartition.toString()) + pulsar().getAdminClient().persistentTopics().deleteAsync(topicNamePartition.toString(), force) .whenComplete((r, ex) -> { if (ex != null) { if (ex instanceof NotFoundException) { @@ -465,6 +477,14 @@ public class PersistentTopicsBase extends AdminResource { unloadTopic(topicName, authoritative); } +protected void internalDeleteTopic(boolean authoritative, boolean force) { +if (force) { +internalDeleteTopicForcefully(authoritative); +} else { +internalDeleteTopic(authoritative); +} +} + protected void internalDeleteTopic(boolean authoritative) { validateAdminOperationOnTopic(authoritative); Topic topic = getTopicReference(topicName); diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/PersistentTopics.java b/pulsar-broker/src/main/java/org/apache/
[incubator-pulsar] branch master updated: adding mock sink for future compatibility purposes with connector framework (#1703)
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 ab59a41 adding mock sink for future compatibility purposes with connector framework (#1703) ab59a41 is described below commit ab59a41e2b3bbe3a86a49770cf7d011ece493edd Author: Boyang Jerry Peng <jerry.boyang.p...@gmail.com> AuthorDate: Tue May 1 22:34:45 2018 -0700 adding mock sink for future compatibility purposes with connector framework (#1703) --- .../org/apache/pulsar/admin/cli/CmdFunctions.java | 4 .../apache/pulsar/functions/sink/PulsarSink.java | 22 ++ 2 files changed, 26 insertions(+) diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java index 7c4d161..df15fc9 100644 --- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java +++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java @@ -52,6 +52,7 @@ import org.apache.pulsar.client.admin.internal.FunctionsImpl; import org.apache.pulsar.client.api.PulsarClientException; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.functions.api.Function; +import org.apache.pulsar.functions.sink.PulsarSink; import org.apache.pulsar.functions.source.PulsarSource; import org.apache.pulsar.functions.utils.FunctionConfig; import org.apache.pulsar.functions.api.SerDe; @@ -556,6 +557,9 @@ public class CmdFunctions extends CmdBase { // Setup sink SinkSpec.Builder sinkSpecBuilder = SinkSpec.newBuilder(); +if (functionConfig.getRuntime() == FunctionConfig.Runtime.JAVA) { +sinkSpecBuilder.setClassName(PulsarSink.class.getName()); +} if (functionConfig.getOutput() != null) { sinkSpecBuilder.setTopic(functionConfig.getOutput()); } diff --git a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/sink/PulsarSink.java b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/sink/PulsarSink.java new file mode 100644 index 000..7c89d92 --- /dev/null +++ b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/sink/PulsarSink.java @@ -0,0 +1,22 @@ +/** + * 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.functions.sink; + +public class PulsarSink { +} -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] 02/02: Release 2.0.0-rc1-incubating
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git commit d04981c728b99da6163ea4d1d94816a2c6ca6433 Author: Matteo Merli <mme...@apache.org> AuthorDate: Tue May 1 18:17:16 2018 -0700 Release 2.0.0-rc1-incubating --- all/pom.xml | 2 +- docker/grafana/pom.xml| 2 +- docker/pom.xml| 2 +- docker/pulsar/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-client-admin-shaded-for-functions/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-shaded/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-test/pom.xml | 2 +- pulsar-client-tools/pom.xml | 2 +- pulsar-client/pom.xml | 2 +- pulsar-common/pom.xml | 2 +- pulsar-connect/aerospike/pom.xml | 2 +- pulsar-connect/cassandra/pom.xml | 2 +- pulsar-connect/core/pom.xml | 2 +- pulsar-connect/kafka/pom.xml | 2 +- pulsar-connect/pom.xml| 2 +- pulsar-connect/rabbitmq/pom.xml | 2 +- pulsar-connect/twitter/pom.xml| 2 +- pulsar-discovery-service/pom.xml | 2 +- pulsar-functions/api-java/pom.xml | 2 +- pulsar-functions/instance/pom.xml | 2 +- pulsar-functions/java-examples/pom.xml| 2 +- pulsar-functions/metrics/pom.xml | 2 +- pulsar-functions/pom.xml | 2 +- pulsar-functions/proto-shaded/pom.xml | 2 +- pulsar-functions/proto/pom.xml| 2 +- pulsar-functions/runtime-all/pom.xml | 2 +- pulsar-functions/runtime-shaded/pom.xml | 2 +- pulsar-functions/runtime/pom.xml | 2 +- pulsar-functions/utils/pom.xml| 2 +- pulsar-functions/worker-shaded/pom.xml| 2 +- pulsar-functions/worker/pom.xml | 2 +- pulsar-log4j2-appender/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 +- tests/docker-images/latest-version-image/pom.xml | 2 +- tests/docker-images/pom.xml | 2 +- tests/integration-tests-base/pom.xml | 2 +- tests/integration-tests-topologies/pom.xml| 2 +- tests/integration-tests-utils/pom.xml | 2 +- tests/integration/cli/pom.xml | 2 +- tests/integration/compaction/pom.xml | 2 +- tests/integration/pom.xml | 2 +- tests/integration/smoke/pom.xml | 2 +- tests/pom.xml | 2 +- 62 files changed, 62 insertions(+), 62 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 5251fae..402309b 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -25,7 +25,7 @@ org.apache.pulsar pulsar -2.0.0-incubating-SNAPSHOT +2.0.0-rc1-incubating .. diff
[incubator-pulsar] 01/02: Added missing license header in terraform.tfvars (#1706)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git commit b3aa66abff3b920b84c47c9866489425a3b9e430 Author: Matteo Merli <mme...@apache.org> AuthorDate: Tue May 1 22:57:01 2018 -0700 Added missing license header in terraform.tfvars (#1706) --- deployment/terraform-ansible/aws/terraform.tfvars | 19 +++ pom.xml | 1 + 2 files changed, 20 insertions(+) diff --git a/deployment/terraform-ansible/aws/terraform.tfvars b/deployment/terraform-ansible/aws/terraform.tfvars index 65f4ea5..7af884b 100644 --- a/deployment/terraform-ansible/aws/terraform.tfvars +++ b/deployment/terraform-ansible/aws/terraform.tfvars @@ -1,3 +1,22 @@ +# +# 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. +# + public_key_path = "~/.ssh/id_rsa.pub" region = "us-west-2" availability_zone = "us-west-2a" diff --git a/pom.xml b/pom.xml index 761c710..491b5ad 100644 --- a/pom.xml +++ b/pom.xml @@ -904,6 +904,7 @@ flexible messaging model and an intuitive client API. SCRIPT_STYLE SCRIPT_STYLE SCRIPT_STYLE +SCRIPT_STYLE -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch branch-2.0 updated (96c8981 -> d04981c)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a change to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git. discard 96c8981 Release 2.0.0-rc1-incubating new b3aa66a Added missing license header in terraform.tfvars (#1706) new d04981c Release 2.0.0-rc1-incubating This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (96c8981) \ N -- N -- N refs/heads/branch-2.0 (d04981c) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: deployment/terraform-ansible/aws/terraform.tfvars | 19 +++ pom.xml | 1 + 2 files changed, 20 insertions(+) -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] annotated tag v2.0.0-rc1-incubating-candidate-1 updated (d04981c -> 91c3137)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a change to annotated tag v2.0.0-rc1-incubating-candidate-1 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git. *** WARNING: tag v2.0.0-rc1-incubating-candidate-1 was modified! *** from d04981c (commit) to 91c3137 (tag) tagging d04981c728b99da6163ea4d1d94816a2c6ca6433 (commit) by Matteo Merli on Tue May 1 23:06:16 2018 -0700 - Log - Release v2.0.0-rc1-incubating-candidate-1 -BEGIN PGP SIGNATURE- iQFGBAABCgAwFiEEjHXHOMMzcq4Zj9EMwjioyqwFX9IFAlrpVVgSHG1tZXJsaUBh cGFjaGUub3JnAAoJEMI4qMqsBV/SE4UIAKCF2KmYNPj8/oqQygCkxg7ahUwSC3CM gmCimDsjAz2+mdRKpmzvHylD/29aho9ezD7vKqUhdBjHv4B6YcLFQfnwx9SPGozy eDov18FEBOXQVfEcyZkMXIlpjxYtHnAanvQLbHY/OKTNukdESvMNQ1ZKW0uVS9N9 8lyh1xkQqzMsJ0I+Mb3SqT6j+AiVWILNgPHSCCcfv1RRX1n1B8scrhut95qKL5WH CSN7MPAd+m9mg5CLQn5ub3rV4VHDEcAowPsGgEK5L7veXlk95uj1MTe3AA2WCQvF NSyBooItolBTjKI9KWeu2LsmWXId5EZz9wKw/9PDKYPhEO4t04cyGCI= =1HPG -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes: -- To stop receiving notification emails like this one, please contact mme...@apache.org.
svn commit: r26630 - /dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/
Author: mmerli Date: Wed May 2 06:50:34 2018 New Revision: 26630 Log: Staging artifacts and signature for Pulsar release 2.0.0-rc1-incubating Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/ dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz (with props) dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.asc dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha1 dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha512 dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz (with props) dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz.asc dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz.sha1 dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz.sha512 Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz == Binary file - no diff available. Propchange: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz -- svn:mime-type = application/octet-stream Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.asc == --- dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.asc (added) +++ dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.asc Wed May 2 06:50:34 2018 @@ -0,0 +1,11 @@ +-BEGIN PGP SIGNATURE- + +iQEzBAABCgAdFiEEjHXHOMMzcq4Zj9EMwjioyqwFX9IFAlrpXqcACgkQwjioyqwF +X9L+HwgAw+lJ5Y6KEjA2Q58hLIDhAqdg1SncnscqCcycZG1Urav/ZTzMxeWzV7No +bJZyedtKDn61lbTBoTat+VLyR/Qs+POzirOjlEInXQLPByJ4KYobRa8eV/2Lr7HL +ChJ0AURlDbUbzunhxqRSGt6HCP8YQteYUsETcs1ituwRhZzct1u5tdyQ2Y3vfM6R +z9uXeEwLPIILHzuq2tODIaNCahagKluumcfV6/yV7wZE5N9t5m5G+W7Jp3ljH56j +XxunKkBtO0v8+xxHg/qbe5ydnbOKm8q1H0f3vHT8Zv03Bgy8oyBIM05Pha27EOxq +Du1Bqhq0NecV0BSdaEw16bdgEeHwGw== +=ftZG +-END PGP SIGNATURE- Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha1 == --- dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha1 (added) +++ dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha1 Wed May 2 06:50:34 2018 @@ -0,0 +1 @@ +0054815ecfde558ce730259b1a1b3c40dfecb727 apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha512 == --- dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha512 (added) +++ dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha512 Wed May 2 06:50:34 2018 @@ -0,0 +1 @@ +cea98e5eed97eade61363937b17a64a86c7352e7b3c5691809850daf03580174c05cefea78682b2605b8cda76d4a90c3858567abe47861481917f5eeaa303d95 apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz == Binary file - no diff available. Propchange: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz -- svn:mime-type = application/octet-stream Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz.asc == --- dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz.asc (added) +++ dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz.asc Wed May 2 06:50:34 2018 @@ -0,0 +1,11 @@ +-BEGIN PGP SIGNATURE- + +iQEzBAABCgAdFiEEjHXHOMMzcq4Zj9EMwjioyqwFX9IFAlrpXrAACgkQwjioyqwF +X9KPyQf/XB2r90BeKucMv9cleL8zdWAm46972JgKhA9YXfdrg36SChEtD2O7a7xX
[incubator-pulsar.wiki] branch master updated: Updated Release process (markdown)
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.wiki.git The following commit(s) were added to refs/heads/master by this push: new 96b1a85 Updated Release process (markdown) 96b1a85 is described below commit 96b1a8597d3b97b37c6b0fe969056f4f609434c9 Author: Matteo Merli <mme...@apache.org> AuthorDate: Tue May 1 23:57:33 2018 -0700 Updated Release process (markdown) --- Release-process.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Release-process.md b/Release-process.md index 236030e..58fae27 100644 --- a/Release-process.md +++ b/Release-process.md @@ -154,6 +154,7 @@ We need to move master version to next iteration `X + 1`. ``` git checkout master mvn versions:set -DnewVersion=1.Y.0-incubating-SNAPSHOT +mvn versions:set -DnewVersion=1.Y.0-incubating-SNAPSHOT -pl buildtools git commit -m 'Bumped version to 1.Y.0-incubating-SNAPSHOT' -a ``` -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] annotated tag v2.0.0-rc1-incubating-candidate-1 updated (96c8981 -> ace9e3d)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a change to annotated tag v2.0.0-rc1-incubating-candidate-1 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git. *** WARNING: tag v2.0.0-rc1-incubating-candidate-1 was modified! *** from 96c8981 (commit) to ace9e3d (tag) tagging 96c8981f0d844e90648e3e5529d2a7e8068e84d8 (commit) by Matteo Merli on Tue May 1 22:37:52 2018 -0700 - Log - Release v2.0.0-rc1-incubating-candidate-1 -BEGIN PGP SIGNATURE- iQFGBAABCgAwFiEEjHXHOMMzcq4Zj9EMwjioyqwFX9IFAlrpTrASHG1tZXJsaUBh cGFjaGUub3JnAAoJEMI4qMqsBV/SwoYH/RrMpBVbEA9F15vZF1bHVykY9Ju03jce wV4iQ7dTUtd3Ep6RtlLOwtyVk/xGnXs361I+DcgTLdwvf2rxqLDrBJItUzB/M97n SAwFmWeQ7aRwL8z8kyYm2qJRslHCxx3SU+IXjwDT9TMgE7AgeS3FUlCaGNukFRO5 XjsM2UFC5YD2uTmeNFcHnFdl94d/7SGfwm1fZZjPSzH5lfUbCYOGL56lipfzEP1v FTdg6cn9xfqdxxH8UapDF9dOQiNMPg3acF6bWJyQgPaw4VJTMhApql5bs5A5qeyq e3ZD/e6s7w7ZzkCsSMM2EywXsmKtKyjtD6F1uVDMcXp1d7FqUJEXcHo= =DK3w -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes: -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] annotated tag v2.0.0-rc1-incubating-candidate-1 deleted (was 91c3137)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a change to annotated tag v2.0.0-rc1-incubating-candidate-1 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git. *** WARNING: tag v2.0.0-rc1-incubating-candidate-1 was deleted! *** tag was 91c3137 The revisions that were on this annotated tag are still contained in other references; therefore, this change does not discard any commits from the repository. -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch branch-2.0 updated (d04981c -> 7c951c6)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a change to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git. discard d04981c Release 2.0.0-rc1-incubating add 7c951c6 Release 2.0.0-rc1-incubating This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (d04981c) \ N -- N -- N refs/heads/branch-2.0 (7c951c6) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: buildtools/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar.wiki] branch master updated: Updated Release process (markdown)
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.wiki.git The following commit(s) were added to refs/heads/master by this push: new c837dc6 Updated Release process (markdown) c837dc6 is described below commit c837dc6a1b8ff1a237da454e095ff3621105ed38 Author: Matteo Merli <mme...@apache.org> AuthorDate: Tue May 1 23:11:30 2018 -0700 Updated Release process (markdown) --- Release-process.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Release-process.md b/Release-process.md index dca54ef..236030e 100644 --- a/Release-process.md +++ b/Release-process.md @@ -61,6 +61,7 @@ be the final one. ```shell # Bump to the release version mvn versions:set -DnewVersion=1.X.0-incubating +mvn versions:set -DnewVersion=1.X.0-incubating -pl buildtools/ # Commit git commit -m 'Release 1.X.0-incubating' -a -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] annotated tag v2.0.0-rc1-incubating-candidate-1 updated (7c951c6 -> ac62f3a)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a change to annotated tag v2.0.0-rc1-incubating-candidate-1 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git. *** WARNING: tag v2.0.0-rc1-incubating-candidate-1 was modified! *** from 7c951c6 (commit) to ac62f3a (tag) tagging 7c951c650822cd52be722e7050d9ee66b44e3812 (commit) by Matteo Merli on Tue May 1 23:12:14 2018 -0700 - Log - Release v2.0.0-rc1-incubating-candidate-1 -BEGIN PGP SIGNATURE- iQFGBAABCgAwFiEEjHXHOMMzcq4Zj9EMwjioyqwFX9IFAlrpVr4SHG1tZXJsaUBh cGFjaGUub3JnAAoJEMI4qMqsBV/S6+4H/iJVTgRmydZZs6MqsTgHrNdEEyfu4wIL pLUzE3qPorHCCGbYNG62vzftYs51W7RnwiuT4MoQhBuQ5EKEH+jWU8er/nBVXd0z VfHMw/H5MpaGxZcDDi0IhBItuwf08FHIDCayfbWvUydeJFQmlxAQTV66q1sZIfVv ySjBWIlLsQWnj9tV8jpkyrXesvqiYQH60mup49R2mexr1ngZET/kIxTbTPsiwzYZ xQO1ySUKNuYJW0zCu79JjZruO1g+76P0JRvpEqowUrB4KD4rMMcglzO9o4g8JP3a Wp8lYTVV5TLFm/0acpjuHSQhWmuLb6YTKtAXtGK+WzLa6Sv6CTkDB3c= =ZUXk -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes: -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] annotated tag v2.0.0-rc1-incubating-candidate-1 updated (60869dd -> 6a56cdd)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a change to annotated tag v2.0.0-rc1-incubating-candidate-1 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git. *** WARNING: tag v2.0.0-rc1-incubating-candidate-1 was modified! *** from 60869dd (commit) to 6a56cdd (tag) tagging 60869dd69e2a99d835b440421716339b145e9c70 (commit) by Matteo Merli on Tue May 1 23:30:12 2018 -0700 - Log - Release v2.0.0-rc1-incubating-candidate-1 -BEGIN PGP SIGNATURE- iQFGBAABCgAwFiEEjHXHOMMzcq4Zj9EMwjioyqwFX9IFAlrpWvQSHG1tZXJsaUBh cGFjaGUub3JnAAoJEMI4qMqsBV/SF0YH/1s2TwtcwOGx/f4PoohazUfULgRviHGy dF7K4DRER6/sNww7dD+2NMN3l44Fw/fSOxTRM78akBsDKw6Zhp4g6s7X1UMsIilM ljzV5ovBTr7gjjVB5qbawiqsKWBaoE/v5XEERgIxPYdV6irLNupMuFzyxRGEjtuV zrpafPqHmsT/1TDCRbQNj5rMl8qxxTc1n9WrDxbRH6k/ieCFQKEJMZLW7swSBE2Y GriJSbrnZlxhbyWbMhqwjxKnjZeV7yQpBfSr8QYeXWY4ioB93B91e0DGMxWvgKkO APVq3FfIk7tIRtg0kmiM/+HXeO3B4lb+mb0fKvmHC2vKvlSa/9ZhUrM= =fJez -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes: -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch branch-2.0 updated (7c951c6 -> 60869dd)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a change to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git. discard 7c951c6 Release 2.0.0-rc1-incubating discard b3aa66a Added missing license header in terraform.tfvars (#1706) add 48787c8 Added documentation on how to configure load manager and bundles (#1704) new 718a123 Added missing license header in terraform.tfvars (#1706) new 60869dd Release 2.0.0-rc1-incubating This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (7c951c6) \ N -- N -- N refs/heads/branch-2.0 (60869dd) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: conf/broker.conf | 6 + pom.xml| 3 + site/_data/sidebar.yaml| 6 +- site/docs/latest/admin/LoadDistribution.md | 235 + .../{admin => project}/ModularLoadManager.md | 0 tests/README.md| 21 ++ 6 files changed, 269 insertions(+), 2 deletions(-) create mode 100644 site/docs/latest/admin/LoadDistribution.md rename site/docs/latest/{admin => project}/ModularLoadManager.md (100%) -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] 01/02: Added missing license header in terraform.tfvars (#1706)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git commit 718a1238c034f86990302304d182c432b6c47d3f Author: Matteo Merli <mme...@apache.org> AuthorDate: Tue May 1 22:57:01 2018 -0700 Added missing license header in terraform.tfvars (#1706) --- deployment/terraform-ansible/aws/terraform.tfvars | 19 +++ pom.xml | 4 tests/README.md | 21 + 3 files changed, 44 insertions(+) diff --git a/deployment/terraform-ansible/aws/terraform.tfvars b/deployment/terraform-ansible/aws/terraform.tfvars index 65f4ea5..7af884b 100644 --- a/deployment/terraform-ansible/aws/terraform.tfvars +++ b/deployment/terraform-ansible/aws/terraform.tfvars @@ -1,3 +1,22 @@ +# +# 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. +# + public_key_path = "~/.ssh/id_rsa.pub" region = "us-west-2" availability_zone = "us-west-2a" diff --git a/pom.xml b/pom.xml index 761c710..29e8dca 100644 --- a/pom.xml +++ b/pom.xml @@ -904,6 +904,7 @@ flexible messaging model and an intuitive client API. SCRIPT_STYLE SCRIPT_STYLE SCRIPT_STYLE +SCRIPT_STYLE @@ -967,6 +968,9 @@ flexible messaging model and an intuitive client API. **/*.htpasswd src/test/resources/athenz.conf.test deployment/terraform-ansible/templates/myid + + +**/requirements.txt diff --git a/tests/README.md b/tests/README.md index 2fb4e8f..ccd4a8f 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,3 +1,24 @@ + + This directory contains integration tests for Pulsar. The integration tests use a framework called [Arquillian Cube](https://github.com/arquillian/arquillian-cube) to bring up a bunch of docker containers running Pulsar services. TestNG can then be used to test functionallity against these containers. -- To stop receiving notification emails like this one, please contact mme...@apache.org.
svn commit: r26629 - in /dev/incubator/pulsar: pulsar-1.22.0-incubating-candidate-0/ pulsar-1.22.0-incubating-candidate-1/ pulsar-1.22.0-incubating-candidate-2/
Author: mmerli Date: Wed May 2 06:44:19 2018 New Revision: 26629 Log: Removed old Pulsar-1.22 release canditates Removed: dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-0/ dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-1/ dev/incubator/pulsar/pulsar-1.22.0-incubating-candidate-2/
[incubator-pulsar] 02/02: Release 2.0.0-rc1-incubating
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git commit 60869dd69e2a99d835b440421716339b145e9c70 Author: Matteo Merli <mme...@apache.org> AuthorDate: Tue May 1 18:17:16 2018 -0700 Release 2.0.0-rc1-incubating --- all/pom.xml | 2 +- buildtools/pom.xml| 2 +- docker/grafana/pom.xml| 2 +- docker/pom.xml| 2 +- docker/pulsar/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-client-admin-shaded-for-functions/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-shaded/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-test/pom.xml | 2 +- pulsar-client-tools/pom.xml | 2 +- pulsar-client/pom.xml | 2 +- pulsar-common/pom.xml | 2 +- pulsar-connect/aerospike/pom.xml | 2 +- pulsar-connect/cassandra/pom.xml | 2 +- pulsar-connect/core/pom.xml | 2 +- pulsar-connect/kafka/pom.xml | 2 +- pulsar-connect/pom.xml| 2 +- pulsar-connect/rabbitmq/pom.xml | 2 +- pulsar-connect/twitter/pom.xml| 2 +- pulsar-discovery-service/pom.xml | 2 +- pulsar-functions/api-java/pom.xml | 2 +- pulsar-functions/instance/pom.xml | 2 +- pulsar-functions/java-examples/pom.xml| 2 +- pulsar-functions/metrics/pom.xml | 2 +- pulsar-functions/pom.xml | 2 +- pulsar-functions/proto-shaded/pom.xml | 2 +- pulsar-functions/proto/pom.xml| 2 +- pulsar-functions/runtime-all/pom.xml | 2 +- pulsar-functions/runtime-shaded/pom.xml | 2 +- pulsar-functions/runtime/pom.xml | 2 +- pulsar-functions/utils/pom.xml| 2 +- pulsar-functions/worker-shaded/pom.xml| 2 +- pulsar-functions/worker/pom.xml | 2 +- pulsar-log4j2-appender/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 +- tests/docker-images/latest-version-image/pom.xml | 2 +- tests/docker-images/pom.xml | 2 +- tests/integration-tests-base/pom.xml | 2 +- tests/integration-tests-topologies/pom.xml| 2 +- tests/integration-tests-utils/pom.xml | 2 +- tests/integration/cli/pom.xml | 2 +- tests/integration/compaction/pom.xml | 2 +- tests/integration/pom.xml | 2 +- tests/integration/smoke/pom.xml | 2 +- tests/pom.xml | 2 +- 63 files changed, 63 insertions(+), 63 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 5251fae..402309b 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -25,7 +25,7 @@ org.apache.pulsar pulsar -
[incubator-pulsar] branch master updated: Pulsar 2.0 docs (#1553)
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 6cdc3a9 Pulsar 2.0 docs (#1553) 6cdc3a9 is described below commit 6cdc3a9d6d84dc3950e3c4fd0a72332d4af9218a Author: Luc Perkins <lucperk...@gmail.com> AuthorDate: Tue May 1 17:52:42 2018 -0700 Pulsar 2.0 docs (#1553) * add new doc and update topic.html include * Begin change property/tenant language * fix topic.html includes * change name of explanation include * Begin s/global Zk/configuration store changes * fix global ZK popovers * more overhaul for configuration store change * begin documenting schemas in java client * more info on async java * add section on schemas * fix async consumer example * add missing byte[]s * more YAML changes for configuration store * use shortened topic names in CLI docs * add images for each subscription mode * add new image for partitioning and routing * topic naming explanation * add compaction-specific commands to pulsar-admin docs * add missing pulsar-admin command * consolidate into pulsar-admin topics command * add note on persistent only to compact commands * fix topic naming shorthand table * fix issues with pulsar CLI docs * revert file name for global_zookeeper.yaml * remove unneeded 'prop' terminology * note that persistent topics are the default * remove TODO that isn't rendering properly * remove unused YAML file * add figure include * add missing license header --- site/_config.yml | 7 +- site/_data/cli/pulsar-admin.yaml | 206 ++--- site/_data/cli/pulsar.yaml | 22 +-- ...global-zookeeper.yaml => global_zookeeper.yaml} | 0 site/_data/messages.yaml | 2 - site/_data/popovers.yaml | 9 +- site/_data/pulsar-functions.yaml | 85 - site/_data/sidebar.yaml| 6 +- site/_includes/admonition.html | 2 +- site/_includes/explanations/client-url.md | 14 -- site/_includes/explanations/deploying-zk.md| 12 +- site/_includes/explanations/install-package.md | 2 + .../explanations/non-persistent-topics.md | 2 +- .../explanations/partitioned-topic-admin.md| 2 +- site/_includes/explanations/partitioned-topics.md | 6 +- .../explanations/properties-namespaces.md | 42 - .../explanations/service-discovery-setup.md| 6 +- site/_includes/explanations/tenants-namespaces.md | 42 + site/_includes/{topic.html => figure.html} | 4 +- site/_includes/{topic.html => pulsar-2.html} | 6 +- site/_includes/topic.html | 2 +- site/_layouts/docs.html| 4 +- site/_sass/_docs.scss | 11 +- site/docs/latest/admin-api/partitioned-topics.md | 2 +- site/docs/latest/admin-api/persistent-topics.md| 2 +- site/docs/latest/admin-api/properties.md | 105 --- site/docs/latest/admin-api/tenants.md | 104 +++ site/docs/latest/admin/Authz.md| 2 +- site/docs/latest/admin/Proxy.md| 2 +- site/docs/latest/admin/ZooKeeperBookKeeper.md | 2 +- site/docs/latest/clients/Java.md | 110 +++ site/docs/latest/deployment/cluster.md | 8 +- site/docs/latest/deployment/instance.md| 42 ++--- .../getting-started/ConceptsAndArchitecture.md | 90 - site/docs/latest/getting-started/LocalCluster.md | 21 +-- site/docs/latest/getting-started/Pulsar-2.0.md | 62 +++ site/docs/latest/reference/Configuration.md| 6 +- site/img/exclusive-subscriptions.png | Bin 0 -> 59440 bytes site/img/partitioning.png | Bin 0 -> 125576 bytes site/img/pulsar-service-discovery.png | Bin 0 -> 65898 bytes site/img/pulsar-subscription-modes.png | Bin 0 -> 66178 bytes ...itecture.png => pulsar-system-architecture.png} | Bin site/img/shared-subscriptions.png | Bin 0 -> 68922 bytes 43 files changed, 514 insertions(+), 538 deletions(-) diff --git a/site/_config.yml b/site/_config.yml index b154071..d4a060e 100644 --- a/site/_config.yml +++ b/site/_config.yml @@ -29,6 +29,7 @@ preview_version_id: 20180426.125800-32 current_version: 1.22.0-incubating python_latest: "1.22.0" archived_releases: +
[incubator-pulsar] branch master updated: Allow to configure TLS hostname verification in PulsarAdmin (#1702)
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 e4a0a5e Allow to configure TLS hostname verification in PulsarAdmin (#1702) e4a0a5e is described below commit e4a0a5e52965fab9b54f4ab5428646b86faa4f4f Author: Matteo Merli <mme...@apache.org> AuthorDate: Tue May 1 17:52:15 2018 -0700 Allow to configure TLS hostname verification in PulsarAdmin (#1702) * Allow to configure TLS hostname verification in PulsarAdmin * Fixed test and typo --- conf/client.conf | 5 +- .../pulsar/client/api/TlsHostVerification.java | 64 ++ .../pulsar/client/api/TlsProducerConsumerTest.java | 24 +++- .../apache/pulsar/client/admin/PulsarAdmin.java| 8 +++ .../pulsar/client/admin/PulsarAdminBuilder.java| 10 .../admin/internal/PulsarAdminBuilderImpl.java | 6 ++ .../apache/pulsar/admin/cli/PulsarAdminTool.java | 15 - .../apache/pulsar/client/cli/PulsarClientTool.java | 6 +- 8 files changed, 118 insertions(+), 20 deletions(-) diff --git a/conf/client.conf b/conf/client.conf index 5afa987..f9e0bc3 100644 --- a/conf/client.conf +++ b/conf/client.conf @@ -17,11 +17,12 @@ # under the License. # -# Pulsar Client configuration +# Pulsar Client and pulsar-admin configuration webServiceUrl=http://localhost:8080/ brokerServiceUrl=pulsar://localhost:6650/ #authPlugin= #authParams= #useTls= -#tlsAllowInsecureConnection +tlsAllowInsecureConnection=false +tlsEnableHostnameVerification=false #tlsTrustCertsFilePath diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/TlsHostVerification.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/TlsHostVerification.java new file mode 100644 index 000..c3409bd --- /dev/null +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/TlsHostVerification.java @@ -0,0 +1,64 @@ +/** + * 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.api; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.pulsar.client.admin.PulsarAdmin; +import org.apache.pulsar.client.admin.PulsarAdminException; +import org.apache.pulsar.client.impl.auth.AuthenticationTls; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class TlsHostVerification extends TlsProducerConsumerBase { +@Test +public void testTlsHostVerificationAdminClient() throws Exception { +Map<String, String> authParams = new HashMap<>(); +authParams.put("tlsCertFile", TLS_CLIENT_CERT_FILE_PATH); +authParams.put("tlsKeyFile", TLS_CLIENT_KEY_FILE_PATH); +PulsarAdmin adminClientTls = PulsarAdmin.builder() +.serviceHttpUrl("https://127.0.0.1:; + BROKER_WEBSERVICE_PORT_TLS) + .tlsTrustCertsFilePath(TLS_TRUST_CERT_FILE_PATH).allowTlsInsecureConnection(false) +.authentication(AuthenticationTls.class.getName(), authParams).enableTlsHostnameVerification(true) +.build(); + +try { +adminClientTls.tenants().getTenants(); +Assert.fail("Admin call should be failed due to hostnameVerification enabled"); +} catch (PulsarAdminException e) { +// Ok +} +} + +@Test +public void testTlsHostVerificationDisabledAdminClient() throws Exception { +Map<String, String> authParams = new HashMap<>(); +authParams.put("tlsCertFile", TLS_CLIENT_CERT_FILE_PATH); +authParams.put("tlsKeyFile", TLS_CLIENT_KEY_FILE_PATH); +PulsarAdmin adminClient = PulsarAdmin.builder() +.serviceHttpUrl("https://127.0.0.1:; + BROKER_WEBSERVICE_PORT_TLS) + .tlsTrustCertsFilePath(TLS_TRUST_CERT_FILE_PATH).allowTlsInsecureConnection(false) +.authentication(AuthenticationTls.class.getName(), authParams).enableTlsHostnameVerification(false) +.bu
[incubator-pulsar] branch master updated: Added missing license header in terraform.tfvars (#1706)
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 b837af8 Added missing license header in terraform.tfvars (#1706) b837af8 is described below commit b837af8612165bb880d7d66f8291f8163a5507a5 Author: Matteo Merli <mme...@apache.org> AuthorDate: Wed May 2 09:05:50 2018 -0700 Added missing license header in terraform.tfvars (#1706) --- deployment/terraform-ansible/aws/terraform.tfvars | 19 +++ pom.xml | 4 tests/README.md | 21 + 3 files changed, 44 insertions(+) diff --git a/deployment/terraform-ansible/aws/terraform.tfvars b/deployment/terraform-ansible/aws/terraform.tfvars index 65f4ea5..7af884b 100644 --- a/deployment/terraform-ansible/aws/terraform.tfvars +++ b/deployment/terraform-ansible/aws/terraform.tfvars @@ -1,3 +1,22 @@ +# +# 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. +# + public_key_path = "~/.ssh/id_rsa.pub" region = "us-west-2" availability_zone = "us-west-2a" diff --git a/pom.xml b/pom.xml index 761c710..29e8dca 100644 --- a/pom.xml +++ b/pom.xml @@ -904,6 +904,7 @@ flexible messaging model and an intuitive client API. SCRIPT_STYLE SCRIPT_STYLE SCRIPT_STYLE +SCRIPT_STYLE @@ -967,6 +968,9 @@ flexible messaging model and an intuitive client API. **/*.htpasswd src/test/resources/athenz.conf.test deployment/terraform-ansible/templates/myid + + +**/requirements.txt diff --git a/tests/README.md b/tests/README.md index 2fb4e8f..ccd4a8f 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,3 +1,24 @@ + + This directory contains integration tests for Pulsar. The integration tests use a framework called [Arquillian Cube](https://github.com/arquillian/arquillian-cube) to bring up a bunch of docker containers running Pulsar services. TestNG can then be used to test functionallity against these containers. -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Fix website sidebar (#1717)
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 8056df5 Fix website sidebar (#1717) 8056df5 is described below commit 8056df573514e2a34224ee0cfe7385a9fd179589 Author: Luc Perkins <lucperk...@gmail.com> AuthorDate: Wed May 2 12:32:17 2018 -0700 Fix website sidebar (#1717) * use proper YAML syntax * add swagger docs build to make build command * rename make commands --- site/Makefile | 6 +++--- site/_data/sidebar.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/Makefile b/site/Makefile index 9fcd9d6..3694bdf 100644 --- a/site/Makefile +++ b/site/Makefile @@ -63,7 +63,7 @@ travis_build: javadoc travis_publish: scripts/publish-website.sh -build: api_docs +build: api_docs swagger_docs_build scripts/build-all-versions.sh serve: clean_local @@ -86,7 +86,7 @@ swagger_definition_copy: (cd $(shell git rev-parse --show-toplevel) && \ cp pulsar-broker/target/docs/swagger.json site/_data/admin-rest-api-swagger.json) -swagger_docs_update: swagger_definition_gen swagger_definition_copy +swagger_docs_build: swagger_definition_gen swagger_definition_copy protobuf_doc_gen: scripts/protobuf-doc-gen.sh @@ -96,4 +96,4 @@ protobuf_setup: api_docs: javadoc python_doc_gen cpp_doc_gen -publish: deep_clean setup swagger_docs_update build +publish: deep_clean setup build diff --git a/site/_data/sidebar.yaml b/site/_data/sidebar.yaml index c145a18..9f701bc 100644 --- a/site/_data/sidebar.yaml +++ b/site/_data/sidebar.yaml @@ -82,7 +82,7 @@ groups: endpoint: Dashboard - title: Pulsar statistics endpoint: Stats - - Load distribution + - title: Load distribution endpoint: LoadDistribution - title: Pulsar proxy endpoint: Proxy -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Add release notes page in website (#1705)
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 4fff8d6 Add release notes page in website (#1705) 4fff8d6 is described below commit 4fff8d6827544772ed38c0c6f5dcc09a3f7268e4 Author: Matteo Merli <mme...@apache.org> AuthorDate: Wed May 2 10:35:44 2018 -0700 Add release notes page in website (#1705) --- site/download.md | 4 +- site/release-notes.md | 363 ++ 2 files changed, 365 insertions(+), 2 deletions(-) diff --git a/site/download.md b/site/download.md index 9aab82f..94d45e8 100644 --- a/site/download.md +++ b/site/download.md @@ -46,9 +46,9 @@ Pulsar's Release Managers. We also provide `MD5` and `SHA-512` checksums for eve After you download the file, you should calculate a checksum for your download, and make sure it is the same as ours. -### Release notes for the {{ site.current_version }} release +### Release notes -[https://github.com/apache/incubator-pulsar/releases/tag/v{{site.current_version}}](https://github.com/apache/incubator-pulsar/releases/tag/v{{site.current_version}}) +[Release notes](../release-notes) for all Pulsar's versions ### Getting started diff --git a/site/release-notes.md b/site/release-notes.md new file mode 100644 index 000..629851a --- /dev/null +++ b/site/release-notes.md @@ -0,0 +1,363 @@ +--- +title: Apache Pulsar Release Notes +layout: content +--- + + + +## Apache incubator + +### 1.22.0-incubating 2018-03-06 + +This is the fourth of Apache Pulsar since entering the ASF incubator. + +Major changes in this release include: + + Features + * [#896](https://github.com/apache/incubator-pulsar/pull/896) PIP-7 Introduce Failure-domain and Anti-affinity-namespace group + * [#1031](https://github.com/apache/incubator-pulsar/pull/1031) Add optional key/value metadata to producers/consumers + * [#1129](https://github.com/apache/incubator-pulsar/pull/1129) Added end to end encryption in C++ client + * [#1151](https://github.com/apache/incubator-pulsar/pull/1151) Added REST handler to create a subscription on a topic + * [#1087](https://github.com/apache/incubator-pulsar/pull/1087) Add basic authentication plugin + * [#1200](https://github.com/apache/incubator-pulsar/pull/1200) Add pluggable authorization mechanism + * [#1208](https://github.com/apache/incubator-pulsar/pull/1208) Add hostname-verification at client tls connection + * [#950](https://github.com/apache/incubator-pulsar/pull/950) Provided an DCOS Universe package for pulsar + * [#1046](https://github.com/apache/incubator-pulsar/pull/1046) Introduce config to skip non-recoverable data-ledger + * [#899](https://github.com/apache/incubator-pulsar/pull/899) Add subscription auth mode by prefix + * [#1135](https://github.com/apache/incubator-pulsar/pull/1135) Added infinite time retention configuration option + + Enhancements + + * [#1094](https://github.com/apache/incubator-pulsar/pull/1094) Include BoringSSL native implementation for faster TLS + * [#1204](https://github.com/apache/incubator-pulsar/pull/1204) Reduce size of buffer used to assemble batches + * [#930](https://github.com/apache/incubator-pulsar/pull/930) Perform async DNS resolution + * [#1124](https://github.com/apache/incubator-pulsar/pull/1124) Support Pulsar proxy from C++/Python client library + * [#1012](https://github.com/apache/incubator-pulsar/pull/1012) Made load shedding for load manager Dynamically configurable + * [#962](https://github.com/apache/incubator-pulsar/pull/962) Raw Reader for Pulsar Topics + * [#941](https://github.com/apache/incubator-pulsar/pull/941) Upgraded Jackson version + * [#1002](https://github.com/apache/incubator-pulsar/pull/1002), [#1169](https://github.com/apache/incubator-pulsar/pull/1169), [#1168](https://github.com/apache/incubator-pulsar/pull/1168) Making Pulsar Proxy more secure + * [#1029](https://github.com/apache/incubator-pulsar/pull/1029) Fix MessageRouter hash inconsistent on C++/Java client + + Fixes + + * [#1153](https://github.com/apache/incubator-pulsar/pull/1153) Fixed increase partitions on a partitioned topic + * [#1195](https://github.com/apache/incubator-pulsar/pull/1195) Ensure the checksum is not stripped after validation in the broker + * [#1203](https://github.com/apache/incubator-pulsar/pull/1203) Use duplicates when writing from ByteBuf pair to avoid multiple threads issues + * [#1210](https://github.com/apache/incubator-pulsar/pull/1210) Cancel keep-alive timer task after the proxy switch to TCP proxy + * [#1170](https://github.com/apache/incubator-pulsar/pull/1170) Upgrade BK version: BK-4.3.1.91-yahoo (fix: stats + DoubleByteBuf) + * [#875](https://github.com/apache/incubator-pulsar/pull/875) Bug fixes for Websocket proxy + +The complete list of chang
[incubator-pulsar] branch master updated: Bumped version to 2.1.0-incubating-SNAPSHOT (#1709)
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 efc893b Bumped version to 2.1.0-incubating-SNAPSHOT (#1709) efc893b is described below commit efc893b6997f6181e9cd785c9fd023d7632736ab Author: Matteo Merli <mme...@apache.org> AuthorDate: Wed May 2 16:35:54 2018 -0700 Bumped version to 2.1.0-incubating-SNAPSHOT (#1709) --- all/pom.xml | 2 +- buildtools/pom.xml| 2 +- docker/grafana/pom.xml| 2 +- docker/pom.xml| 2 +- docker/pulsar/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-client-admin-shaded-for-functions/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-shaded/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-test/pom.xml | 2 +- pulsar-client-tools/pom.xml | 2 +- pulsar-client/pom.xml | 2 +- pulsar-common/pom.xml | 2 +- pulsar-connect/aerospike/pom.xml | 2 +- pulsar-connect/cassandra/pom.xml | 2 +- pulsar-connect/core/pom.xml | 2 +- pulsar-connect/kafka/pom.xml | 2 +- pulsar-connect/pom.xml| 2 +- pulsar-connect/rabbitmq/pom.xml | 2 +- pulsar-connect/twitter/pom.xml| 2 +- pulsar-discovery-service/pom.xml | 2 +- pulsar-functions/api-java/pom.xml | 2 +- pulsar-functions/instance/pom.xml | 2 +- pulsar-functions/java-examples/pom.xml| 2 +- pulsar-functions/metrics/pom.xml | 2 +- pulsar-functions/pom.xml | 2 +- pulsar-functions/proto-shaded/pom.xml | 2 +- pulsar-functions/proto/pom.xml| 2 +- pulsar-functions/runtime-all/pom.xml | 2 +- pulsar-functions/runtime-shaded/pom.xml | 2 +- pulsar-functions/runtime/pom.xml | 2 +- pulsar-functions/utils/pom.xml| 2 +- pulsar-functions/worker-shaded/pom.xml| 2 +- pulsar-functions/worker/pom.xml | 2 +- pulsar-log4j2-appender/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 +- tests/docker-images/latest-version-image/pom.xml | 2 +- tests/docker-images/pom.xml | 2 +- tests/integration-tests-base/pom.xml | 2 +- tests/integration-tests-topologies/pom.xml| 2 +- tests/integration-tests-utils/pom.xml | 2 +- tests/integration/cli/pom.xml | 2 +- tests/integration/compaction/pom.xml | 2 +- tests/integration/pom.xml | 2 +- tests/integration/smoke/pom.xml | 2 +- tests/pom.xml | 2 +- 63 files changed, 63 insertions(
[incubator-pulsar] branch asf-site updated: Updated site at revision ab0d081
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git The following commit(s) were added to refs/heads/asf-site by this push: new 4834bac Updated site at revision ab0d081 4834bac is described below commit 4834bac1cbe635ebf971628dbe9c5957d38e3d8c Author: jenkins <bui...@apache.org> AuthorDate: Thu May 3 08:29:41 2018 + Updated site at revision ab0d081 --- .../ConceptsAndArchitecture/index.html | 2 +- .../docs/latest/project/BinaryProtocol/index.html | 6 ++- content/img/failover-subscriptions.png | Bin 0 -> 64604 bytes content/ja/project/BinaryProtocol/index.html | 6 ++- content/release-notes/index.html | 52 ++--- 5 files changed, 35 insertions(+), 31 deletions(-) diff --git a/content/docs/latest/getting-started/ConceptsAndArchitecture/index.html b/content/docs/latest/getting-started/ConceptsAndArchitecture/index.html index 61015a8..28309d0 100644 --- a/content/docs/latest/getting-started/ConceptsAndArchitecture/index.html +++ b/content/docs/latest/getting-started/ConceptsAndArchitecture/index.html @@ -1747,7 +1747,7 @@ under the License. --> - + Multi-topic subscriptions diff --git a/content/docs/latest/project/BinaryProtocol/index.html b/content/docs/latest/project/BinaryProtocol/index.html index 62d194c..e4c90b4 100644 --- a/content/docs/latest/project/BinaryProtocol/index.html +++ b/content/docs/latest/project/BinaryProtocol/index.html @@ -3804,7 +3804,8 @@ of any number previously specified optional - Original principal that was verified by + TODO - Remove original_principal, original_auth_data, original_auth_method +Original principal that was verified by a Pulsar proxy. @@ -4045,7 +4046,8 @@ lookup has been completed. optional - Original principal that was verified by + TODO - Remove original_principal, original_auth_data, original_auth_method +Original principal that was verified by a Pulsar proxy. diff --git a/content/img/failover-subscriptions.png b/content/img/failover-subscriptions.png new file mode 100644 index 000..2cf83fc Binary files /dev/null and b/content/img/failover-subscriptions.png differ diff --git a/content/ja/project/BinaryProtocol/index.html b/content/ja/project/BinaryProtocol/index.html index fba8be8..08e2e56 100644 --- a/content/ja/project/BinaryProtocol/index.html +++ b/content/ja/project/BinaryProtocol/index.html @@ -3439,7 +3439,8 @@ of any number previously specified optional - Original principal that was verified by + TODO - Remove original_principal, original_auth_data, original_auth_method +Original principal that was verified by a Pulsar proxy. @@ -3680,7 +3681,8 @@ lookup has been completed. optional - Original principal that was verified by + TODO - Remove original_principal, original_auth_data, original_auth_method +Original principal that was verified by a Pulsar proxy. diff --git a/content/release-notes/index.html b/content/release-notes/index.html index d858c24..9ef9a75 100644 --- a/content/release-notes/index.html +++ b/content/release-notes/index.html @@ -280,7 +280,7 @@ Apache incubator -1.22.0-incubating — 2018-03-06 +1.22.0-incubating — 2018-03-06 This is the fourth of Apache Pulsar since entering the ASF incubator. @@ -331,7 +331,7 @@ https://github.com/apache/incubator-pulsar/milestone/11?closed=1 https://github.com/apache/incubator-pulsar/releases/tag/v1.22.0-incubating -1.21.0-incubating — 2017-12-17 +1.21.0-incubating — 2017-12-17 This is the third of Apache Pulsar since entering the ASF incubator. @@ -355,7 +355,7 @@ https://github.com/apache/incubator-pulsar/milestone/10?closed=1 https://github.com/apache/incubator-pulsar/releases/tag/v1.21.0-incubating -1.20.0-incubating — 2017-08-08 +1.20.0-incubating — 2017-08-08 This is the second of Apache Pulsar since entering the ASF incubator. @@ -375,7 +375,7 @@ https://github.com/apache/incubator-pulsar/milestone/9?closed=1 https://github.com/apache/incubator-pulsar/releases/tag/v1.20.0-incubating -1.19.0-incubating — 2017-08-08 +1.19.0-incubating — 2017-08-08 This is the first of Apache Pulsar since entering the ASF incubator. @@ -397,7 +397,7 @@ https://github.com/apache/incubator-pulsar/milestone/8?closed=1 Pre-Apache -1.18 — 2017-06-17 +1.18 — 2017-06-17 Main changes: @@ -440,7 +440,7 @@ https://github.com/apache/incubator-pulsar/milestone/8?closed=1 https://github.com/apache/incu
[incubator-pulsar] branch master updated: Hide namespace cli commands that are no longer relevant (#1645)
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 fc3417f Hide namespace cli commands that are no longer relevant (#1645) fc3417f is described below commit fc3417fc3b48fc43184eaff06dcab772d8ede554 Author: Sanjeev Kulkarni <sanjee...@gmail.com> AuthorDate: Wed Apr 25 22:40:22 2018 -0700 Hide namespace cli commands that are no longer relevant (#1645) --- .../java/org/apache/pulsar/admin/cli/CmdNamespaces.java | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java index d40db50..5259879 100644 --- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java +++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java @@ -56,7 +56,7 @@ public class CmdNamespaces extends CmdBase { } } -@Parameters(commandDescription = "Get the namespaces for a tenant in a cluster") +@Parameters(commandDescription = "Get the namespaces for a tenant in a cluster", hidden = true) private class GetNamespacesPerCluster extends CliCommand { @Parameter(description = "tenant/cluster\n", required = true) private java.util.List params; @@ -80,6 +80,18 @@ public class CmdNamespaces extends CmdBase { } } +@Parameters(commandDescription = "Get the list of destinations for a namespace", hidden = true) +private class GetDestinations extends CliCommand { +@Parameter(description = "tenant/namespace\n", required = true) +private java.util.List params; + +@Override +void run() throws PulsarAdminException { +String namespace = validateNamespace(params); +print(admin.namespaces().getTopics(namespace)); +} +} + @Parameters(commandDescription = "Get the configuration policies of a namspace") private class GetPolicies extends CliCommand { @Parameter(description = "tenant/namespace\n", required = true) @@ -809,7 +821,8 @@ public class CmdNamespaces extends CmdBase { jcommander.addCommand("list", new GetNamespacesPerProperty()); jcommander.addCommand("list-cluster", new GetNamespacesPerCluster()); -jcommander.addCommand("topics", new GetTopics(), "destinations"); +jcommander.addCommand("topics", new GetTopics()); +jcommander.addCommand("destinations", new GetDestinations()); jcommander.addCommand("policies", new GetPolicies()); jcommander.addCommand("create", new Create()); jcommander.addCommand("delete", new Delete()); -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Fix the exception output for admin commands (#1646)
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 43d2257 Fix the exception output for admin commands (#1646) 43d2257 is described below commit 43d22579fa78ae863ff16cd2e14b87113355243d Author: Sijie Guo <guosi...@gmail.com> AuthorDate: Wed Apr 25 22:41:05 2018 -0700 Fix the exception output for admin commands (#1646) --- .../src/main/java/org/apache/pulsar/admin/cli/CmdBase.java | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java index 4601c89..bf8ce6c 100644 --- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java +++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java @@ -72,17 +72,9 @@ public abstract class CmdBase { System.err.println("Error connecting to: " + admin.getServiceUrl()); return false; } catch (PulsarAdminException e) { -if (e.getCause() instanceof WebApplicationException) { -WebApplicationException wae = (WebApplicationException) e.getCause(); -System.err.println("Code: " + wae.getResponse().getStatus()); -System.err.println("Header: " + wae.getResponse().getHeaders()); -System.err.println("Location: " + wae.getResponse().getLocation()); -System.err.println("Reason: " + wae.getResponse().getEntity()); -} else { -System.err.println(e.getHttpError()); -System.err.println(); -System.err.println("Reason: " + e.getMessage()); -} +System.err.println(e.getHttpError()); +System.err.println(); +System.err.println("Reason: " + e.getMessage()); return false; } catch (Exception e) { System.err.println("Got exception: " + e.getMessage()); -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Use java.time.Clock in managed ledger (#1642)
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 61cb7ca Use java.time.Clock in managed ledger (#1642) 61cb7ca is described below commit 61cb7caa920f468b6fb53176e2994cefb8cbcae3 Author: Ivan Kelly <iv...@apache.org> AuthorDate: Thu Apr 26 23:49:33 2018 +0200 Use java.time.Clock in managed ledger (#1642) Rather than direct calls to currentTimeMillis. This allows us to test time based functionallity with a mocked clock, and avoid Thread.sleep. --- .../bookkeeper/mledger/ManagedLedgerConfig.java| 21 + .../bookkeeper/mledger/impl/ManagedCursorImpl.java | 7 -- .../bookkeeper/mledger/impl/ManagedLedgerImpl.java | 27 -- 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedgerConfig.java b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedgerConfig.java index 3cb3fa9..f3add7c 100644 --- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedgerConfig.java +++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedgerConfig.java @@ -22,6 +22,7 @@ import static com.google.common.base.Preconditions.checkArgument; import com.google.common.annotations.Beta; import com.google.common.base.Charsets; +import java.time.Clock; import java.util.Arrays; import java.util.concurrent.TimeUnit; import org.apache.bookkeeper.client.api.DigestType; @@ -57,6 +58,7 @@ public class ManagedLedgerConfig { private DigestType digestType = DigestType.CRC32C; private byte[] password = "".getBytes(Charsets.UTF_8); private LedgerOffloader ledgerOffloader = NullLedgerOffloader.INSTANCE; +private Clock clock = Clock.systemUTC(); public boolean isCreateIfMissing() { return createIfMissing; @@ -445,4 +447,23 @@ public class ManagedLedgerConfig { this.ledgerOffloader = offloader; return this; } + +/** + * Get clock to use to time operations + * + * @return a clock + */ +public Clock getClock() { +return clock; +} + +/** + * Set clock to use for time operations + * + * @param clock the clock to use + */ +public ManagedLedgerConfig setClock(Clock clock) { +this.clock = clock; +return this; +} } diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java index 6d9e0de..695f22d 100644 --- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java +++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java @@ -38,6 +38,7 @@ import com.google.common.collect.TreeRangeSet; import com.google.common.util.concurrent.RateLimiter; import com.google.protobuf.InvalidProtocolBufferException; +import java.time.Clock; import java.util.ArrayDeque; import java.util.Collections; import java.util.List; @@ -155,6 +156,7 @@ public class ManagedCursorImpl implements ManagedCursor { @SuppressWarnings("unused") private volatile int pendingMarkDeletedSubmittedCount = 0; private long lastLedgerSwitchTimestamp; +private final Clock clock; enum State { Uninitialized, // Cursor is being initialized @@ -186,7 +188,8 @@ public class ManagedCursorImpl implements ManagedCursor { PENDING_READ_OPS_UPDATER.set(this, 0); RESET_CURSOR_IN_PROGRESS_UPDATER.set(this, FALSE); WAITING_READ_OP_UPDATER.set(this, null); -this.lastLedgerSwitchTimestamp = System.currentTimeMillis(); +this.clock = config.getClock(); +this.lastLedgerSwitchTimestamp = this.clock.millis(); if (config.getThrottleMarkDelete() > 0.0) { markDeleteLimiter = RateLimiter.create(config.getThrottleMarkDelete()); @@ -2110,7 +2113,7 @@ public class ManagedCursorImpl implements ManagedCursor { } boolean shouldCloseLedger(LedgerHandle lh) { -long now = System.currentTimeMillis(); +long now = clock.millis(); if ((lh.getLastAddConfirmed() >= config.getMetadataMaxEntriesPerLedger() || lastLedgerSwitchTimestamp < (now - config.getLedgerRolloverTimeout() * 1000)) && STATE_UPDATER.get(this) != State.Closed) { diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java index 50bc85d..59f4ad7 100644 --- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java +++ b/managed-ledger/src/m
[incubator-pulsar] branch asf-site updated: Updated site at revision 064ba5a
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git The following commit(s) were added to refs/heads/asf-site by this push: new b442c96 Updated site at revision 064ba5a b442c96 is described below commit b442c964a507361be29257272e36481da0cc86b2 Author: jenkins <bui...@apache.org> AuthorDate: Thu Apr 26 08:23:32 2018 + Updated site at revision 064ba5a --- .../docs/latest/adaptors/PulsarSpark/index.html| 10 - .../docs/latest/adaptors/PulsarStorm/index.html| 8 content/docs/latest/admin-api/overview/index.html | 18 content/docs/latest/admin/Authz/index.html | 24 +++--- content/docs/latest/clients/Cpp/index.html | 8 content/docs/latest/clients/Java/index.html| 10 - content/docs/latest/clients/Python/index.html | 8 content/docs/latest/clients/WebSocket/index.html | 8 .../docs/latest/cookbooks/Encryption/index.html| 2 +- .../latest/cookbooks/PartitionedTopics/index.html | 12 +-- .../latest/cookbooks/RetentionExpiry/index.html| 12 +-- .../cookbooks/message-deduplication/index.html | 8 .../docs/latest/deployment/Kubernetes/index.html | 4 ++-- .../docs/latest/deployment/aws-cluster/index.html | 6 +++--- content/docs/latest/deployment/cluster/index.html | 6 +++--- content/docs/latest/deployment/instance/index.html | 6 +++--- .../ConceptsAndArchitecture/index.html | 4 ++-- .../latest/getting-started/LocalCluster/index.html | 4 ++-- .../docs/latest/getting-started/docker/index.html | 4 ++-- .../docs/latest/project/BinaryProtocol/index.html | 4 ++-- .../docs/latest/project/SimulationTools/index.html | 2 +- content/docs/latest/reference/CliTools/index.html | 20 +- content/ja/adaptors/PulsarSpark/index.html | 8 content/ja/adaptors/PulsarStorm/index.html | 6 +++--- content/ja/admin/AdminInterface/index.html | 14 ++--- content/ja/admin/Authz/index.html | 24 +++--- content/ja/admin/ClustersBrokers/index.html| 8 content/ja/admin/PropertiesNamespaces/index.html | 8 content/ja/advanced/PartitionedTopics/index.html | 14 ++--- content/ja/advanced/RetentionExpiry/index.html | 14 ++--- content/ja/clients/Cpp/index.html | 8 content/ja/clients/Java/index.html | 8 content/ja/clients/Python/index.html | 8 content/ja/clients/WebSocket/index.html| 8 content/ja/deployment/InstanceSetup/index.html | 8 content/ja/deployment/Kubernetes/index.html| 4 ++-- .../ConceptsAndArchitecture/index.html | 2 +- content/ja/getting-started/LocalCluster/index.html | 4 ++-- content/ja/project/BinaryProtocol/index.html | 4 ++-- content/ja/project/SimulationTools/index.html | 2 +- content/ja/reference/CliTools/index.html | 20 +- 41 files changed, 180 insertions(+), 180 deletions(-) diff --git a/content/docs/latest/adaptors/PulsarSpark/index.html b/content/docs/latest/adaptors/PulsarSpark/index.html index 8fc389e..9a5bd6b 100644 --- a/content/docs/latest/adaptors/PulsarSpark/index.html +++ b/content/docs/latest/adaptors/PulsarSpark/index.html @@ -928,9 +928,9 @@ - Spark Streaming Pulsar receiver + Spark Streaming Pulsar receiver @@ -1140,9 +1140,9 @@ - Spark Streaming Pulsar receiver + Spark Streaming Pulsar receiver @@ -1276,6 +1276,8 @@ + + Authentication and authorization in Pulsar @@ -1432,13 +1434,11 @@ + The Pulsar admin interface - The Pulsar admin interface - - diff --git a/content/docs/latest/adaptors/PulsarStorm/index.html b/content/docs/latest/adaptors/PulsarStorm/index.html index 1be4f88..81b1ede 100644 --- a/content/docs/latest/adaptors/PulsarStorm/index.html +++ b/content/docs/latest/adaptors/PulsarStorm/index.html @@ -932,9 +932,9 @@ - Pulsar adaptor for Apache Storm + Pulsar adaptor for Apache Storm @@ -1064,6 +1064,8 @@ + + Authentication and authorization in
[incubator-pulsar] branch master updated: Fix: NPE when cursor failed to close empty subscription (#1662)
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 8335d7c Fix: NPE when cursor failed to close empty subscription (#1662) 8335d7c is described below commit 8335d7cb0c85ebcd054b80f5da91cbc419d25121 Author: Rajan Dhabalia <rdhaba...@apache.org> AuthorDate: Thu Apr 26 21:59:27 2018 -0700 Fix: NPE when cursor failed to close empty subscription (#1662) --- .../pulsar/broker/service/persistent/PersistentSubscription.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java index 58eb101..65f5f97 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java @@ -542,7 +542,9 @@ public class PersistentSubscription implements Subscription { disconnectFuture.complete(null); }).exceptionally(exception -> { IS_FENCED_UPDATER.set(this, FALSE); -dispatcher.reset(); +if (dispatcher != null) { +dispatcher.reset(); +} log.error("[{}][{}] Error disconnecting consumers from subscription", topicName, subName, exception); disconnectFuture.completeExceptionally(exception); -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar.wiki] branch master updated: Updated Release process (markdown)
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.wiki.git The following commit(s) were added to refs/heads/master by this push: new 64d66a7 Updated Release process (markdown) 64d66a7 is described below commit 64d66a76c42ca76164dd7661200b776705bdcd43 Author: Matteo Merli <mme...@apache.org> AuthorDate: Thu Apr 26 22:11:31 2018 -0700 Updated Release process (markdown) --- Release-process.md | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Release-process.md b/Release-process.md index 3f3af47..52a0526 100644 --- a/Release-process.md +++ b/Release-process.md @@ -66,11 +66,11 @@ mvn versions:set -DnewVersion=1.X.0-incubating git commit -m 'Release 1.X.0-incubating' -a # Create a "candidate" tag -git tag -u $u...@apache.org v1.X.0-incubating-candidate-0 -m 'Release v1.X.0-incubating-candidate-0' +git tag -u $u...@apache.org v1.X.0-incubating-candidate-1 -m 'Release v1.X.0-incubating-candidate-1' # Push both the branch and the tag to Github repo git push origin branch-1.X -git push origin v1.X.0-incubating-candidate-0 +git push origin v1.X.0-incubating-candidate-1 ``` 3. Build and inspect the artifacts @@ -108,11 +108,11 @@ repository for staging. svn co https://dist.apache.org/repos/dist/dev/incubator/pulsar pulsar-dist-dev cd svn pulsar-dist-dev -# '-candidate-0' needs to be incremented in case of multiple iteration in getting +# '-candidate-1' needs to be incremented in case of multiple iteration in getting #to the final release) -svn mkdir pulsar-1.X.0-incubating-candidate-0 +svn mkdir pulsar-1.X.0-incubating-candidate-1 -cd pulsar-1.X.0-incubating-candidate-0 +cd pulsar-1.X.0-incubating-candidate-1 cp /path/to/apachepulsar-1.X.0-incubating-src.tar.gz . cp /path/to/apachepulsar-1.X.0-incubating-bin.tar.gz . @@ -188,14 +188,14 @@ Note that we are voting upon the source (tag), binaries are provided for convenience. Source and binary files: -https://dist.apache.org/repos/dist/dev/incubator/pulsar/pulsar-1.X.0-incubating-candidate-0/ +https://dist.apache.org/repos/dist/dev/incubator/pulsar/pulsar-1.X.0-incubating-candidate-1/ Maven staging repo: https://repository.apache.org/content/repositories/orgapachepulsar-169/ The tag to be voted upon: -v1.X.0-incubating-candidate-0 (21f4a4cffefaa9391b79d79a7849da9c539af834) -https://github.com/apache/incubator-pulsar/releases/tag/v1.X.0-incubating-candidate-0 +v1.X.0-incubating-candidate-1 (21f4a4cffefaa9391b79d79a7849da9c539af834) +https://github.com/apache/incubator-pulsar/releases/tag/v1.X.0-incubating-candidate-1 Pulsar's KEYS file containing PGP keys we use to sign the release: https://dist.apache.org/repos/dist/release/incubator/pulsar/KEYS @@ -240,7 +240,7 @@ git push origin v1.X.0-incubating Promote the artifacts on the release location: ```shell -svn move https://dist.apache.org/repos/dist/dev/incubator/pulsar/pulsar-1.X.0-incubating-candidate-0 \ +svn move https://dist.apache.org/repos/dist/dev/incubator/pulsar/pulsar-1.X.0-incubating-candidate-1 \ https://dist.apache.org/repos/dist/release/incubator/pulsar/pulsar-1.X.0-incubating ``` -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar.wiki] branch master updated: Updated Release process (markdown)
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.wiki.git The following commit(s) were added to refs/heads/master by this push: new f2ad20e Updated Release process (markdown) f2ad20e is described below commit f2ad20e0b8c5a9e989df71e51bcb0e5a15ed079c Author: Matteo Merli <mme...@apache.org> AuthorDate: Thu Apr 26 22:13:45 2018 -0700 Updated Release process (markdown) --- Release-process.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Release-process.md b/Release-process.md index 52a0526..df10932 100644 --- a/Release-process.md +++ b/Release-process.md @@ -175,7 +175,7 @@ Send an email on the Pulsar Dev mailing list: ``` To: d...@pulsar.incubator.apache.org -Subject: [VOTE] Pulsar 1.X.0-incubating Release Candidate 0 +Subject: [VOTE] Pulsar Release 1.X.0-incubating Candidate 1 This is the first release candidate for Apache Pulsar, version 1.X.0-incubating. @@ -219,7 +219,7 @@ Start a `VOTE` thread on the incubator mailing list: ``` To: gene...@incubator.apache.org -Subject: [VOTE] Pulsar 1.X.0-incubating Release Candidate 0 +Subject: [VOTE] Pulsar Release 1.X.0-incubating Candidate 1 ``` -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar.wiki] branch master updated: Updated Release process (markdown)
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.wiki.git The following commit(s) were added to refs/heads/master by this push: new 8273d71 Updated Release process (markdown) 8273d71 is described below commit 8273d71d778f77458919674ad006cd51a4cdec3a Author: Matteo Merli <mme...@apache.org> AuthorDate: Thu Apr 26 22:16:20 2018 -0700 Updated Release process (markdown) --- Release-process.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Release-process.md b/Release-process.md index df10932..4bb50ff 100644 --- a/Release-process.md +++ b/Release-process.md @@ -182,7 +182,8 @@ This is the first release candidate for Apache Pulsar, version 1.X.0-incubating. It fixes the following issues: https://github.com/apache/incubator-pulsar/milestone/8?closed=1 -*** Please download, test and vote by July 29th 2017, 10:00 GMT. +*** Please download, test and vote on this release. This vote will stay open +for at least 72 hours *** Note that we are voting upon the source (tag), binaries are provided for convenience. -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch pull/1059/head deleted (was f1f4b36)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a change to branch pull/1059/head in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git. was f1f4b36 Hide deprecated options and few more adjustments This change permanently discards the following revisions: discard f1f4b36 Hide deprecated options and few more adjustments -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch pull/1059 created (now f1f4b36)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a change to branch pull/1059 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git. at f1f4b36 Hide deprecated options and few more adjustments This branch includes the following new commits: new f1f4b36 Hide deprecated options and few more adjustments The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] 01/01: Hide deprecated options and few more adjustments
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch pull/1059 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git commit f1f4b3631e5aa4cfadff5208d1f3ec1353932638 Author: Matteo Merli <mme...@apache.org> AuthorDate: Thu Apr 26 22:32:10 2018 -0700 Hide deprecated options and few more adjustments --- bin/pulsar | 13 - bin/pulsar-admin | 1 - bin/pulsar-daemon | 13 + conf/broker.conf | 9 --- conf/discovery.conf| 9 --- conf/proxy.conf| 13 + conf/standalone.conf | 9 --- conf/websocket.conf| 9 --- .../apache/pulsar/broker/ServiceConfiguration.java | 6 + .../apache/pulsar/PulsarClusterMetadataSetup.java | 5 ++-- .../pulsar/zookeeper/GlobalZooKeeperStarter.java | 31 -- site/docs/latest/deployment/cluster.md | 4 +-- 12 files changed, 55 insertions(+), 67 deletions(-) diff --git a/bin/pulsar b/bin/pulsar index 16854b4..4a58d30 100755 --- a/bin/pulsar +++ b/bin/pulsar @@ -24,7 +24,6 @@ PULSAR_HOME=`cd $BINDIR/..;pwd` DEFAULT_BROKER_CONF=$PULSAR_HOME/conf/broker.conf DEFAULT_BOOKKEEPER_CONF=$PULSAR_HOME/conf/bookkeeper.conf DEFAULT_ZK_CONF=$PULSAR_HOME/conf/zookeeper.conf -DEFAULT_GLOBAL_ZK_CONF=$PULSAR_HOME/conf/global_zookeeper.conf DEFAULT_CONFIGURATION_STORE_CONF=$PULSAR_HOME/conf/global_zookeeper.conf DEFAULT_DISCOVERY_CONF=$PULSAR_HOME/conf/discovery.conf DEFAULT_PROXY_CONF=$PULSAR_HOME/conf/proxy.conf @@ -104,19 +103,19 @@ pulsar_help() { cat < where command is one of: + broker Run a broker server bookie Run a bookie server zookeeper Run a zookeeper server -global-zookeeperRun a configuration-store server (Deprecated. Use "bin/pulsar configuration-store" instead) configuration-store Run a configuration-store server discovery Run a discovery server proxy Run a pulsar proxy websocket Run a web socket proxy server functions-workerRun a functions worker server standalone Run a broker server with local bookies and local zookeeper -compact-topic Run compaction against a topic initialize-cluster-metadata One-time metadata initialization +compact-topic Run compaction against a topic zookeeper-shell Open a ZK shell client helpThis help message @@ -128,8 +127,7 @@ Environment variables: PULSAR_BROKER_CONFConfiguration file for broker (default: $DEFAULT_BROKER_CONF) PULSAR_BOOKKEEPER_CONFConfiguration file for bookie (default: $DEFAULT_BOOKKEEPER_CONF) PULSAR_ZK_CONFConfiguration file for zookeeper (default: $DEFAULT_ZK_CONF) - PULSAR_GLOBAL_ZK_CONF Configuration file for global configuration zookeeper (default: $DEFAULT_GLOBAL_ZK_CONF) (Deprecated. Replace with "PULSAR_CONFIGURATION_STORE_CONF") - PULSAR_CONFIGURATION_STORE_CONF Configuration file for global configuration zookeeper (default: $DEFAULT_CONFIGURATION_STORE_CONF) + PULSAR_CONFIGURATION_STORE_CONF Configuration file for global configuration store (default: $DEFAULT_CONFIGURATION_STORE_CONF) PULSAR_DISCOVERY_CONF Configuration file for discovery service (default: $DEFAULT_DISCOVERY_CONF) PULSAR_WEBSOCKET_CONF Configuration file for websocket proxy (default: $DEFAULT_WEBSOCKET_CONF) PULSAR_PROXY_CONF Configuration file for Pulsar proxy (default: $DEFAULT_PROXY_CONF) @@ -298,5 +296,8 @@ elif [ $COMMAND == "compact-topic" ]; then elif [ $COMMAND == "help" ]; then pulsar_help; else -exec $JAVA $OPTS $COMMAND $@ +echo "" +echo "-- Invalid command '$COMMAND' -- Use '$0 help' to get a list of valid commands" +echo "" +exit 1 fi diff --git a/bin/pulsar-admin b/bin/pulsar-admin index c8b41da..837a605 100755 --- a/bin/pulsar-admin +++ b/bin/pulsar-admin @@ -146,5 +146,4 @@ OPTS="$OPTS -Dpulsar.functions.python.instance.file=${PY_INSTANCE_FILE}" #Change to PULSAR_HOME to support relative paths cd "$PULSAR_HOME" - exec $JAVA $OPTS org.apache.pulsar.admin.cli.PulsarAdminTool $PULSAR_CLIENT_CONF "$@" diff --git a/bin/pulsar-daemon b/bin/pulsar-daemon index ee102d0..0957413 100755 --- a/bin/pulsar-daemon +++ b/bin/pulsar-daemon @@ -22,14 +22,13 @@ usage() { cat < where command is one of: -broker Run a broker server -bookie Run a bookie server -zookeeperRun a zookeeper server -global-zookeeper Run a conf
[incubator-pulsar] branch master updated: Pulsar Functions CLI fixes (#1655)
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 7484664 Pulsar Functions CLI fixes (#1655) 7484664 is described below commit 74846643303385cce847120b86c8342e50950492 Author: Luc Perkins <lucperk...@gmail.com> AuthorDate: Thu Apr 26 16:45:36 2018 -0700 Pulsar Functions CLI fixes (#1655) * add new argument checker function * fix misspelling in variable name * add check for class name to doJavaSubmitChecks * add default service URL as constant * fix input topic checking logic * remove 'got exception' line from Exception printing * add check for Python class name * add basic topic name validation * fix misspelling in getClassname call * use formatted string for inferred output topic name * ensure topics aren't used as both input and output --- .../java/org/apache/pulsar/admin/cli/CmdBase.java | 1 - .../org/apache/pulsar/admin/cli/CmdFunctions.java | 92 -- 2 files changed, 69 insertions(+), 24 deletions(-) diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java index bf8ce6c..682413c 100644 --- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java +++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java @@ -77,7 +77,6 @@ public abstract class CmdBase { System.err.println("Reason: " + e.getMessage()); return false; } catch (Exception e) { -System.err.println("Got exception: " + e.getMessage()); e.printStackTrace(); return false; } diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java index c1446ed..1369a69 100644 --- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java +++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java @@ -20,6 +20,7 @@ package org.apache.pulsar.admin.cli; import static com.google.common.base.Preconditions.checkNotNull; import static java.nio.charset.StandardCharsets.UTF_8; +import static java.util.Objects.isNull; import static org.apache.bookkeeper.common.concurrent.FutureUtils.result; import java.io.File; @@ -27,10 +28,12 @@ import java.io.IOException; import java.lang.reflect.Type; import java.net.MalformedURLException; import java.util.Arrays; +import java.util.Collection; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.UUID; +import java.util.stream.IntStream; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; @@ -40,6 +43,7 @@ import org.apache.bookkeeper.api.kv.result.KeyValue; import org.apache.bookkeeper.clients.StorageClientBuilder; import org.apache.bookkeeper.clients.config.StorageClientSettings; import org.apache.bookkeeper.clients.utils.NetUtils; +import org.apache.commons.lang.StringUtils; import org.apache.pulsar.client.admin.PulsarAdmin; import org.apache.pulsar.client.admin.internal.FunctionsImpl; import org.apache.pulsar.client.api.PulsarClientException; @@ -76,6 +80,7 @@ import net.jodah.typetools.TypeResolver; @Slf4j @Parameters(commandDescription = "Interface for managing Pulsar Functions (lightweight, Lambda-style compute processes that work with Pulsar)") public class CmdFunctions extends CmdBase { +private static final String DEFAULT_SERVICE_URL = "pulsar://localhost:6650"; private final LocalRunner localRunner; private final CreateFunction creater; @@ -239,14 +244,20 @@ public class CmdFunctions extends CmdBase { } if (null != inputs) { - Arrays.asList(inputs.split(",")).forEach(functionConfig.getInputs()::add); +List inputTopics = Arrays.asList(inputs.split(",")); +inputTopics.forEach(this::validateTopicName); +functionConfig.setInputs(inputTopics); } if (null != customSerdeInputString) { Type type = new TypeToken<Map<String, String>>(){}.getType(); Map<String, String> customSerdeInputMap = new Gson().fromJson(customSerdeInputString, type); +customSerdeInputMap.forEach((topic, serde) -> { +validateTopicName(topic); +}); functionConfig.setCustomSerdeInputs(customSerdeInputMap); } if (null != output) { +
[incubator-pulsar] branch master updated: Enable dispatch-throttling for non backlog consumers by default. (#1654)
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 dab6695 Enable dispatch-throttling for non backlog consumers by default. (#1654) dab6695 is described below commit dab66951f36f1106b3dbfb4cb648fd2b09c5ff00 Author: Sanjeev Kulkarni <sanjee...@gmail.com> AuthorDate: Thu Apr 26 16:45:14 2018 -0700 Enable dispatch-throttling for non backlog consumers by default. (#1654) --- conf/broker.conf | 6 +++--- conf/standalone.conf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/broker.conf b/conf/broker.conf index d38abf7..2b0365c 100644 --- a/conf/broker.conf +++ b/conf/broker.conf @@ -140,9 +140,9 @@ dispatchThrottlingRatePerTopicInMsg=0 # default message-byte dispatch-throttling dispatchThrottlingRatePerTopicInByte=0 -# Default dispatch-throttling is disabled for consumers which already caught-up with published messages and -# don't have backlog. This enables dispatch-throttling for non-backlog consumers as well. -dispatchThrottlingOnNonBacklogConsumerEnabled=false +# By default we enable dispatch-throttling for both caught up consumers as well as consumers who have +# backlog. +dispatchThrottlingOnNonBacklogConsumerEnabled=true # Max number of concurrent lookup request broker allows to throttle heavy incoming lookup traffic maxConcurrentLookupRequest=1 diff --git a/conf/standalone.conf b/conf/standalone.conf index b593f00..6966287 100644 --- a/conf/standalone.conf +++ b/conf/standalone.conf @@ -129,9 +129,9 @@ dispatchThrottlingRatePerTopicInMsg=0 # default message-byte dispatch-throttling dispatchThrottlingRatePerTopicInByte=0 -# Default dispatch-throttling is disabled for consumers which already caught-up with published messages and -# don't have backlog. This enables dispatch-throttling for non-backlog consumers as well. -dispatchThrottlingOnNonBacklogConsumerEnabled=false +# By default we enable dispatch-throttling for both caught up consumers as well as consumers who have +# backlog. +dispatchThrottlingOnNonBacklogConsumerEnabled=true # Max number of concurrent lookup request broker allows to throttle heavy incoming lookup traffic maxConcurrentLookupRequest=1 -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Key the download directory by the instance id (#1691)
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 3c99306 Key the download directory by the instance id (#1691) 3c99306 is described below commit 3c99306f2e3e95e9070ea47911fbd6855d860261 Author: Sanjeev Kulkarni <sanjee...@gmail.com> AuthorDate: Mon Apr 30 16:07:09 2018 -0700 Key the download directory by the instance id (#1691) --- .../java/org/apache/pulsar/functions/worker/FunctionActioner.java | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java index d7bbc96..e6821f6 100644 --- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java +++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java @@ -108,7 +108,7 @@ public class FunctionActioner implements AutoCloseable { functionMetaData.getFunctionDetails().getName(), instance.getInstanceId()); File pkgDir = new File( workerConfig.getDownloadDirectory(), -getDownloadPackagePath(functionMetaData)); +getDownloadPackagePath(functionMetaData, instance.getInstanceId())); pkgDir.mkdirs(); int instanceId = functionRuntimeInfo.getFunctionInstance().getInstanceId(); @@ -184,7 +184,7 @@ public class FunctionActioner implements AutoCloseable { // clean up function package File pkgDir = new File( workerConfig.getDownloadDirectory(), -getDownloadPackagePath(functionMetaData)); +getDownloadPackagePath(functionMetaData, instance.getInstanceId())); if (pkgDir.exists()) { try { @@ -196,12 +196,13 @@ public class FunctionActioner implements AutoCloseable { } } -private String getDownloadPackagePath(FunctionMetaData functionMetaData) { +private String getDownloadPackagePath(FunctionMetaData functionMetaData, int instanceId) { return StringUtils.join( new String[]{ functionMetaData.getFunctionDetails().getTenant(), functionMetaData.getFunctionDetails().getNamespace(), functionMetaData.getFunctionDetails().getName(), +Integer.toString(instanceId), }, File.separatorChar); } -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Remove "global" from returned clusters list (#1695)
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 1e0e12a Remove "global" from returned clusters list (#1695) 1e0e12a is described below commit 1e0e12a72fb978abc04797b049dada100d8d0832 Author: Matteo Merli <mme...@apache.org> AuthorDate: Mon Apr 30 17:03:54 2018 -0700 Remove "global" from returned clusters list (#1695) --- .../main/java/org/apache/pulsar/broker/admin/AdminResource.java| 7 ++- .../test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java| 6 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java index 04389cc..be1b7dd 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java @@ -40,6 +40,7 @@ import org.apache.pulsar.broker.cache.LocalZooKeeperCacheService; import org.apache.pulsar.broker.web.PulsarWebResource; import org.apache.pulsar.broker.web.RestException; import org.apache.pulsar.common.naming.TopicName; +import org.apache.pulsar.common.naming.Constants; import org.apache.pulsar.common.naming.NamespaceBundle; import org.apache.pulsar.common.naming.NamespaceBundleFactory; import org.apache.pulsar.common.naming.NamespaceBundles; @@ -334,7 +335,11 @@ public abstract class AdminResource extends PulsarWebResource { protected Set clusters() { try { -return pulsar().getConfigurationCache().clustersListCache().get(); +Set clusters = pulsar().getConfigurationCache().clustersListCache().get(); + +// Remove "global" cluster from returned list +clusters.remove(Constants.GLOBAL_CLUSTER); +return clusters; } catch (Exception e) { throw new RestException(e); } diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java index 5c9346e..73dc79c 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java @@ -869,4 +869,10 @@ public class AdminApiTest2 extends MockedPulsarServiceBaseTest { } catch (PulsarAdminException.NotFoundException e) {// expected } } + +@Test +public void clustersList() throws PulsarAdminException { +final String cluster = pulsar.getConfiguration().getClusterName(); +assertEquals(admin.clusters().getClusters(), Lists.newArrayList(cluster)); +} } -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Fix Golang setup in Dockerfile (#1690)
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 f5d9502 Fix Golang setup in Dockerfile (#1690) f5d9502 is described below commit f5d95028dc3953c1ed89fb0a114b18528da76715 Author: Luc Perkins <lucperk...@gmail.com> AuthorDate: Mon Apr 30 17:04:10 2018 -0700 Fix Golang setup in Dockerfile (#1690) * When preparing pulsar-build Docker image, ensure apt-get update is not cached * add Go setup to Dockerfile for website build * update PATH * set proper env vars * re-add golang install to main apt-get statement --- build/docker/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile index 35d04a5..7a1cfff 100644 --- a/build/docker/Dockerfile +++ b/build/docker/Dockerfile @@ -54,7 +54,9 @@ RUN rvm install 2.4.1 RUN wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py RUN pip install pdoc -# Install Protobuf doc generator +# Install Protobuf doc generator (requires Go) +ENV GOPATH "$HOME/go" +ENV PATH "/usr/lib/go-1.10/bin:$GOPATH/bin:$PATH" RUN go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc # Build the patched protoc -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Renamed Schema.IDENTITY into Schema.BYTES (#1694)
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 1eff40e Renamed Schema.IDENTITY into Schema.BYTES (#1694) 1eff40e is described below commit 1eff40ebf280cc9205f2370fde8a2fd8a74dcaf3 Author: Matteo Merli <mme...@apache.org> AuthorDate: Mon Apr 30 15:59:29 2018 -0700 Renamed Schema.IDENTITY into Schema.BYTES (#1694) --- .../apache/pulsar/client/impl/RawReaderImpl.java | 2 +- .../pulsar/client/admin/internal/TopicsImpl.java | 4 +-- .../apache/pulsar/client/api/MessageBuilder.java | 2 +- .../java/org/apache/pulsar/client/api/Schema.java | 23 -- .../org/apache/pulsar/client/impl/MessageImpl.java | 2 +- .../pulsar/client/impl/PulsarClientImpl.java | 14 - .../schema/BytesSchema.java} | 36 ++ .../{api/schemas => impl/schema}/StringSchema.java | 2 +- .../pulsar/client/schemas/DefaultSchemasTest.java | 2 +- 9 files changed, 30 insertions(+), 57 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawReaderImpl.java b/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawReaderImpl.java index 4a91477..e768c3e 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawReaderImpl.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawReaderImpl.java @@ -103,7 +103,7 @@ public class RawReaderImpl implements RawReader { RawConsumerImpl(PulsarClientImpl client, ConsumerConfigurationData<byte[]> conf, CompletableFuture<Consumer<byte[]>> consumerFuture) { super(client, conf.getSingleTopic(), conf, client.externalExecutorProvider().getExecutor(), -1, -consumerFuture, SubscriptionMode.Durable, MessageId.earliest, Schema.IDENTITY); +consumerFuture, SubscriptionMode.Durable, MessageId.earliest, Schema.BYTES); incomingRawMessages = new GrowableArrayBlockingQueue<>(); pendingRawReceives = new ConcurrentLinkedQueue<>(); } diff --git a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java index 8749d6a..0ccb16e 100644 --- a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java +++ b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java @@ -851,7 +851,7 @@ public class TopicsImpl extends BaseResource implements Topics, PersistentTopics } } -return Collections.singletonList(new MessageImpl<byte[]>(msgId, properties, data, Schema.IDENTITY)); +return Collections.singletonList(new MessageImpl<byte[]>(msgId, properties, data, Schema.BYTES)); } finally { if (stream != null) { stream.close(); @@ -876,7 +876,7 @@ public class TopicsImpl extends BaseResource implements Topics, PersistentTopics properties.put(entry.getKey(), entry.getValue()); } } -ret.add(new MessageImpl<>(batchMsgId, properties, singleMessagePayload, Schema.IDENTITY)); +ret.add(new MessageImpl<>(batchMsgId, properties, singleMessagePayload, Schema.BYTES)); } catch (Exception ex) { log.error("Exception occured while trying to get BatchMsgId: {}", batchMsgId, ex); } diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/api/MessageBuilder.java b/pulsar-client/src/main/java/org/apache/pulsar/client/api/MessageBuilder.java index 6839341..cf08d07 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/api/MessageBuilder.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/api/MessageBuilder.java @@ -44,7 +44,7 @@ public interface MessageBuilder { } static MessageBuilder<byte[]> create() { -return create(Schema.IDENTITY); +return create(Schema.BYTES); } /** diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/api/Schema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/api/Schema.java index c5ff14d..81d6233 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/api/Schema.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/api/Schema.java @@ -18,7 +18,8 @@ */ package org.apache.pulsar.client.api; -import org.apache.pulsar.client.api.schemas.StringSchema; +import org.apache.pulsar.client.impl.schema.BytesSchema; +import org.apache.pulsar.client.impl.schema.StringSchema; import org.apache.pulsar.common.schema.SchemaInfo; /** @@ -5
[incubator-pulsar] branch asf-site updated: Updated site at revision 5721892
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git The following commit(s) were added to refs/heads/asf-site by this push: new 9d1a67b Updated site at revision 5721892 9d1a67b is described below commit 9d1a67b7f48d3ae271aa5d9f9cf797c929fd6dd0 Author: jenkins <bui...@apache.org> AuthorDate: Tue May 1 08:30:43 2018 + Updated site at revision 5721892 --- content/api/admin/index-all.html | 2 +- .../org/apache/pulsar/client/admin/Functions.html | 6 +++-- .../apache/pulsar/client/api/MessageBuilder.html | 5 +--- .../pulsar/client/api/PulsarClientException.html | 2 +- .../org/apache/pulsar/client/api/Schema.html | 3 +-- .../client/api/SchemaSerializationException.html | 28 -- .../pulsar/client/api/TypedMessageBuilder.html | 5 +--- .../org/apache/pulsar/client/api/package-tree.html | 6 - content/api/client/overview-tree.html | 6 - content/api/client/serialized-form.html| 2 +- .../docs/latest/adaptors/PulsarSpark/index.html| 10 .../docs/latest/adaptors/PulsarStorm/index.html| 8 +++ content/docs/latest/admin-api/overview/index.html | 18 +++--- content/docs/latest/admin/Authz/index.html | 24 +-- content/docs/latest/clients/Cpp/index.html | 8 +++ content/docs/latest/clients/Java/index.html| 10 content/docs/latest/clients/Python/index.html | 8 +++ content/docs/latest/clients/WebSocket/index.html | 8 +++ .../docs/latest/cookbooks/Encryption/index.html| 6 ++--- .../latest/cookbooks/PartitionedTopics/index.html | 16 ++--- .../latest/cookbooks/RetentionExpiry/index.html| 16 ++--- .../cookbooks/message-deduplication/index.html | 12 +- .../docs/latest/cookbooks/message-queue/index.html | 16 ++--- .../docs/latest/deployment/Kubernetes/index.html | 4 ++-- .../docs/latest/deployment/aws-cluster/index.html | 6 ++--- content/docs/latest/deployment/cluster/index.html | 6 ++--- content/docs/latest/deployment/instance/index.html | 6 ++--- .../ConceptsAndArchitecture/index.html | 4 ++-- .../latest/getting-started/LocalCluster/index.html | 4 ++-- .../docs/latest/getting-started/docker/index.html | 4 ++-- .../docs/latest/project/BinaryProtocol/index.html | 4 ++-- .../docs/latest/project/SimulationTools/index.html | 2 +- content/docs/latest/reference/CliTools/index.html | 20 content/ja/adaptors/PulsarSpark/index.html | 8 +++ content/ja/adaptors/PulsarStorm/index.html | 6 ++--- content/ja/admin/AdminInterface/index.html | 14 +-- content/ja/admin/Authz/index.html | 24 +-- content/ja/admin/ClustersBrokers/index.html| 8 +++ content/ja/admin/PropertiesNamespaces/index.html | 8 +++ content/ja/advanced/PartitionedTopics/index.html | 14 +-- content/ja/advanced/RetentionExpiry/index.html | 14 +-- content/ja/clients/Cpp/index.html | 8 +++ content/ja/clients/Java/index.html | 8 +++ content/ja/clients/Python/index.html | 8 +++ content/ja/clients/WebSocket/index.html| 8 +++ content/ja/deployment/InstanceSetup/index.html | 8 +++ content/ja/deployment/Kubernetes/index.html| 4 ++-- .../ConceptsAndArchitecture/index.html | 2 +- content/ja/getting-started/LocalCluster/index.html | 4 ++-- content/ja/project/BinaryProtocol/index.html | 4 ++-- content/ja/project/SimulationTools/index.html | 2 +- content/ja/reference/CliTools/index.html | 20 52 files changed, 220 insertions(+), 237 deletions(-) diff --git a/content/api/admin/index-all.html b/content/api/admin/index-all.html index 88ebeb1..9916ee7 100644 --- a/content/api/admin/index-all.html +++ b/content/api/admin/index-all.html @@ -2005,7 +2005,7 @@ Trigger compaction to run for a topic. -triggerFunction(String, String, String, String, String) - Method in interface org.apache.pulsar.client.admin.Functions +triggerFunction(String, String, String, String, String, String) - Method in interface org.apache.pulsar.client.admin.Functions Triggers the function by writing to the input topic. diff --git a/content/api/admin/org/apache/pulsar/client/admin/Functions.html b/content/api/admin/org/apache/pulsar/client/admin/Functions.html index 4a51f96..a51de06 100644 --- a/content/api/admin/org/apache/pulsar/client/admin/Functions.html +++ b/content/api/admin/org/apache/pulsar/client/admin/Functions.html @@ -166,9 +166,10 @@ var activeTableTab = "activeTableTab"; String -triggerFunction(Stringtenant, +triggerFunct
[incubator-pulsar] branch master updated: Fix Trigger functionality for non Java Functions (#1701)
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 2dd158e Fix Trigger functionality for non Java Functions (#1701) 2dd158e is described below commit 2dd158e9514b89ec545169f4fd8fa863f9c099de Author: Sanjeev Kulkarni <sanjee...@gmail.com> AuthorDate: Tue May 1 09:34:53 2018 -0700 Fix Trigger functionality for non Java Functions (#1701) --- .../apache/pulsar/functions/worker/rest/api/FunctionsImpl.java| 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java index 513443e..49c652f 100644 --- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java +++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java @@ -480,10 +480,6 @@ public class FunctionsImpl { FunctionMetaData functionMetaData = functionMetaDataManager.getFunctionMetaData(tenant, namespace, functionName); String inputTopicToWrite; -// only if the source is PulsarSource and if the function consumes only one topic -if (!functionMetaData.getFunctionDetails().getSource().getClassName().equals(PulsarSource.class.getName())) { -return Response.status(Status.BAD_REQUEST).build(); -} if (topic != null) { inputTopicToWrite = topic; } else if (functionMetaData.getFunctionDetails().getSource().getTopicsToSerDeClassNameMap().size() == 1) { @@ -492,6 +488,10 @@ public class FunctionsImpl { } else { return Response.status(Status.BAD_REQUEST).build(); } +if (functionMetaData.getFunctionDetails().getSource().getTopicsToSerDeClassNameMap() == null +|| !functionMetaData.getFunctionDetails().getSource().getTopicsToSerDeClassNameMap().containsKey(inputTopicToWrite)) { +return Response.status(Status.BAD_REQUEST).build(); +} String outputTopic = functionMetaData.getFunctionDetails().getSink().getTopic(); Reader reader = null; Producer producer = null; -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Issue 1014: Rename "global zookeeper" to "configuration-store"(change in code, conf and cli) (#1059)
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 c62b5c0 Issue 1014: Rename "global zookeeper" to "configuration-store"(change in code, conf and cli) (#1059) c62b5c0 is described below commit c62b5c014b1f69c8c9aea78be22d3f9c95eefb99 Author: Jia Zhai <zhaiji...@gmail.com> AuthorDate: Wed May 2 00:35:57 2018 +0800 Issue 1014: Rename "global zookeeper" to "configuration-store"(change in code, conf and cli) (#1059) * global-zookeeper => configuration-store: change in code, conf and cli * change following @sijie's comments * remove un-used imports * change following @ivan's comments * change following comments * fix rebase error * change for PR #1572 and #1223, fix integration fail * Fix cube definitions after global zookeeper is renamed to configuration-store * Hide deprecated options and few more adjustments * Fixed required status of global-zk argument in cluster init tool * Limit the memory usage for processes * Fix the aliases and limit the memory usage * remove environment settings * Fix time.sleep at watch-znode.py * revert unstarted to use started yml * Fix invalid `""` --- bin/pulsar | 26 +++-- bin/pulsar-admin | 1 - bin/pulsar-daemon | 21 --- conf/broker.conf | 11 +++- conf/discovery.conf| 10 +++- conf/proxy.conf| 14 +++-- conf/standalone.conf | 10 +++- conf/websocket.conf| 12 +++- deployment/dcos/PulsarGroups.json | 4 +- deployment/kubernetes/aws/broker.yaml | 2 +- deployment/kubernetes/generic/broker.yaml | 2 +- deployment/kubernetes/generic/proxy.yaml | 2 +- .../google-kubernetes-engine/broker.yaml | 2 +- .../google-kubernetes-engine/cluster-metadata.yaml | 2 +- .../kubernetes/google-kubernetes-engine/proxy.yaml | 2 +- deployment/terraform-ansible/deploy-pulsar.yaml| 6 +- deployment/terraform-ansible/templates/broker.conf | 2 +- .../apache/pulsar/broker/ServiceConfiguration.java | 24 .../PulsarConfigurationLoaderTest.java | 6 +- .../apache/pulsar/PulsarClusterMetadataSetup.java | 51 ++-- .../org/apache/pulsar/PulsarStandaloneStarter.java | 2 +- .../org/apache/pulsar/broker/PulsarService.java| 6 +- .../pulsar/broker/admin/impl/BrokersBase.java | 8 +-- .../org/apache/pulsar/PulsarBrokerStarterTest.java | 8 +-- .../org/apache/pulsar/broker/admin/AdminTest.java | 2 +- .../broker/auth/MockedPulsarServiceBaseTest.java | 2 +- .../pulsar/broker/service/ReplicatorTestBase.java | 6 +- .../broker/service/v1/V1_ReplicatorTestBase.java | 6 +- .../pulsar/client/api/NonPersistentTopicTest.java | 8 +-- .../websocket/proxy/ProxyAuthenticationTest.java | 11 +--- .../websocket/proxy/ProxyAuthorizationTest.java| 2 +- .../websocket/proxy/ProxyPublishConsumeTest.java | 2 +- .../proxy/ProxyPublishConsumeTlsTest.java | 2 +- .../proxy/v1/V1_ProxyAuthenticationTest.java | 6 +- .../configurations/pulsar_broker_test.conf | 2 +- pulsar-client-cpp/test-conf/standalone-ssl.conf| 5 +- pulsar-client-cpp/tests/authentication.conf| 5 +- pulsar-client-cpp/tests/standalone.conf| 31 +- .../common/conf/InternalConfigurationData.java | 16 +++--- .../discovery/service/BrokerDiscoveryProvider.java | 2 +- .../service/server/DiscoveryServiceStarter.java| 14 +++-- .../discovery/service/server/ServiceConfig.java| 19 +- .../service/server/DiscoveryServiceWebTest.java| 67 -- .../proxy/server/BrokerDiscoveryProvider.java | 2 +- .../pulsar/proxy/server/ProxyConfiguration.java| 16 +- .../apache/pulsar/proxy/server/ProxyService.java | 4 +- .../pulsar/proxy/server/ProxyServiceStarter.java | 13 - .../ProxyAuthenticatedProducerConsumerTest.java| 2 +- .../server/ProxyConnectionThrottlingTest.java | 2 +- .../proxy/server/ProxyLookupThrottlingTest.java| 2 +- .../org/apache/pulsar/proxy/server/ProxyTest.java | 2 +- .../apache/pulsar/proxy/server/ProxyTlsTest.java | 2 +- .../apache/pulsar/websocket/WebSocketService.java | 9 +-- .../service/WebSocketProxyConfiguration.java | 18 +- ...Starter.java => ConfigurationStoreStarter.java} | 4 +- site/docs/latest/deployment/cluster.md | 4 +- .../latest-versi
[incubator-pulsar] branch master updated: adding function worker initialized check (#1697)
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 1c4b1c4 adding function worker initialized check (#1697) 1c4b1c4 is described below commit 1c4b1c4b9927ccb3d3f45feff97c5c058f46fe1c Author: Boyang Jerry Peng <jerry.boyang.p...@gmail.com> AuthorDate: Tue May 1 09:35:12 2018 -0700 adding function worker initialized check (#1697) * adding function worker intialized check * removing newline * refactoring duplicate code * fixing unit tests --- .../pulsar/client/admin/internal/BaseResource.java | 2 +- .../client/admin/internal/FunctionsImpl.java | 2 - .../pulsar/functions/worker/WorkerService.java | 4 ++ .../functions/worker/rest/api/FunctionsImpl.java | 63 ++ .../rest/api/v2/FunctionApiV2ResourceTest.java | 1 + 5 files changed, 69 insertions(+), 3 deletions(-) diff --git a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BaseResource.java b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BaseResource.java index a0f747c..96671ec 100644 --- a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BaseResource.java +++ b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BaseResource.java @@ -153,7 +153,7 @@ public abstract class BaseResource { if (e.getCause() instanceof java.net.ConnectException) { return new ConnectException(e.getCause()); } else { -return new HttpErrorException(e); +return new PulsarAdminException((ServerErrorException) e); } } else if (e instanceof WebApplicationException) { // Handle 5xx exceptions diff --git a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/FunctionsImpl.java b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/FunctionsImpl.java index 9d5b8ee..66da497 100644 --- a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/FunctionsImpl.java +++ b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/FunctionsImpl.java @@ -42,8 +42,6 @@ import javax.ws.rs.core.Response; import java.io.File; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; -import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.util.List; diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/WorkerService.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/WorkerService.java index e33dcba..dfe5834 100644 --- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/WorkerService.java +++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/WorkerService.java @@ -45,6 +45,7 @@ public class WorkerService { private Namespace dlogNamespace; private MembershipManager membershipManager; private SchedulerManager schedulerManager; +private boolean isInitialized = false; public WorkerService(WorkerConfig workerConfig) { this.workerConfig = workerConfig; @@ -117,6 +118,9 @@ public class WorkerService { // Start function runtime manager this.functionRuntimeManager.start(); +// indicate function worker service is done intializing +this.isInitialized = true; + } catch (Exception e) { log.error("Error Starting up in worker", e); throw new RuntimeException(e); diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java index 49c652f..5261750 100644 --- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java +++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java @@ -82,6 +82,17 @@ public class FunctionsImpl { } } +private boolean isWorkerServiceAvailable() { +WorkerService workerService = workerServiceSupplier.get(); +if (workerService == null) { +return false; +} +if (!workerService.isInitialized()) { +return false; +} +return true; +} + @POST @Path("/{tenant}/{namespace}/{functionName}") @Consumes(MediaType.MULTIPART_FORM_DATA) @@ -91,6 +102,11 @@ public class FunctionsImpl { final @FormDataParam("data") InputStream uploadedInputStream, final @FormDataParam("data
[incubator-pulsar] branch master updated: Delete inactive subscriptions automatically (#1352)
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 762036c Delete inactive subscriptions automatically (#1352) 762036c is described below commit 762036c36f071d0aca148bf1d333b3df0da66191 Author: yush1ga <y.shiga.91+yush...@gmail.com> AuthorDate: Wed May 2 01:36:30 2018 +0900 Delete inactive subscriptions automatically (#1352) * Delete inactive subscriptions automatically * Addressed PR comments * Add subscriptionExpiryCheckIntervalInMinutes * Add lastActive for ManagedCursorInfo --- conf/broker.conf | 7 + conf/standalone.conf | 7 + .../apache/bookkeeper/mledger/ManagedCursor.java | 13 ++ .../bookkeeper/mledger/impl/ManagedCursorImpl.java | 26 +++- .../bookkeeper/mledger/proto/MLDataFormats.java| 65 +++- managed-ledger/src/main/proto/MLDataFormats.proto | 2 + .../mledger/impl/ManagedCursorContainerTest.java | 10 ++ .../apache/pulsar/broker/ServiceConfiguration.java | 21 +++ .../broker/admin/v1/NonPersistentTopics.java | 10 +- .../broker/admin/v2/NonPersistentTopics.java | 10 +- .../pulsar/broker/service/BrokerService.java | 166 + .../org/apache/pulsar/broker/service/Topic.java| 2 + .../service/nonpersistent/NonPersistentTopic.java | 5 + .../service/persistent/PersistentSubscription.java | 2 + .../broker/service/persistent/PersistentTopic.java | 13 ++ .../broker/stats/BookieClientStatsGenerator.java | 15 +- 16 files changed, 252 insertions(+), 122 deletions(-) diff --git a/conf/broker.conf b/conf/broker.conf index dc7ca04..893a3e2 100644 --- a/conf/broker.conf +++ b/conf/broker.conf @@ -76,6 +76,13 @@ messageExpiryCheckIntervalInMinutes=5 # How long to delay rewinding cursor and dispatching messages when active consumer is changed activeConsumerFailoverDelayTimeMillis=1000 +# How long to delete inactive subscriptions from last consuming +# When it is 0, inactive subscriptions are not deleted automatically +subscriptionExpirationTimeMinutes=0 + +# How frequently to proactively check and purge expired subscription +subscriptionExpiryCheckIntervalInMinutes=5 + # Set the default behavior for message deduplication in the broker # This can be overridden per-namespace. If enabled, broker will reject # messages that were already stored in the topic diff --git a/conf/standalone.conf b/conf/standalone.conf index f5c9546..bc6dc10 100644 --- a/conf/standalone.conf +++ b/conf/standalone.conf @@ -69,6 +69,13 @@ messageExpiryCheckIntervalInMinutes=5 # How long to delay rewinding cursor and dispatching messages when active consumer is changed activeConsumerFailoverDelayTimeMillis=1000 +# How long to delete inactive subscriptions from last consuming +# When it is 0, inactive subscriptions are not deleted automatically +subscriptionExpirationTimeMinutes=0 + +# How frequently to proactively check and purge expired subscription +subscriptionExpiryCheckIntervalInMinutes=5 + # Set the default behavior for message deduplication in the broker # This can be overridden per-namespace. If enabled, broker will reject # messages that were already stored in the topic diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursor.java b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursor.java index f6793b4..186a450 100644 --- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursor.java +++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursor.java @@ -58,6 +58,19 @@ public interface ManagedCursor { String getName(); /** + * Get the last active time of the cursor. + * + * @return the last active time of the cursor + */ +long getLastActive(); + +/** + * Update the last active time of the cursor + * + */ +void updateLastActive(); + +/** * Return any properties that were associated with the last stored position. */ Map<String, Long> getProperties(); diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java index 695f22d..194e8c0 100644 --- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java +++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java @@ -158,6 +158,9 @@ public class ManagedCursorImpl implements ManagedCursor { private long lastLedgerSwitchTimestamp; private final Clock clock; +// The last active time (Unix time, milliseconds) of the cursor +private long lastActive; + enum State { Uninitialize
[incubator-pulsar] branch master updated: Fixed clusters REST API to omit "global" cluster in response (#1725)
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 ea07ee1 Fixed clusters REST API to omit "global" cluster in response (#1725) ea07ee1 is described below commit ea07ee112d0e5803698dc16d752fa67846a8eab0 Author: Matteo Merli <mme...@apache.org> AuthorDate: Thu May 3 14:04:23 2018 -0700 Fixed clusters REST API to omit "global" cluster in response (#1725) --- .../pulsar/broker/admin/impl/ClustersBase.java | 33 +- .../apache/pulsar/broker/admin/AdminApiTest2.java | 3 ++ 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java index 69b8a9b..3fcb7d6 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java @@ -19,6 +19,16 @@ package org.apache.pulsar.broker.admin.impl; import static org.apache.pulsar.broker.cache.ConfigurationCacheService.POLICIES; +import static org.apache.pulsar.broker.namespace.NamespaceService.NAMESPACE_ISOLATION_POLICIES; + +import com.fasterxml.jackson.core.JsonGenerationException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; + +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; import java.io.IOException; import java.util.Collections; @@ -40,8 +50,8 @@ import javax.ws.rs.core.Response.Status; import org.apache.bookkeeper.util.ZkUtils; import org.apache.pulsar.broker.admin.AdminResource; import org.apache.pulsar.broker.cache.ConfigurationCacheService; -import static org.apache.pulsar.broker.namespace.NamespaceService.NAMESPACE_ISOLATION_POLICIES; import org.apache.pulsar.broker.web.RestException; +import org.apache.pulsar.common.naming.Constants; import org.apache.pulsar.common.naming.NamedEntity; import org.apache.pulsar.common.policies.data.BrokerNamespaceIsolationData; import org.apache.pulsar.common.policies.data.ClusterData; @@ -57,15 +67,6 @@ import org.apache.zookeeper.data.Stat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.core.JsonGenerationException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; - -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponse; -import io.swagger.annotations.ApiResponses; - public class ClustersBase extends AdminResource { @GET @@ -73,7 +74,11 @@ public class ClustersBase extends AdminResource { @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission") }) public Set getClusters() throws Exception { try { -return clustersListCache().get(); +Set clusters = clustersListCache().get(); + +// Remove "global" cluster from returned list +clusters.remove(Constants.GLOBAL_CLUSTER); +return clusters; } catch (Exception e) { log.error("[{}] Failed to get clusters list", clientAppId(), e); throw new RestException(e); @@ -238,7 +243,7 @@ public class ClustersBase extends AdminResource { throw new RestException(e); } } - + @DELETE @Path("/{cluster}") @ApiOperation(value = "Delete an existing cluster") @@ -476,7 +481,7 @@ public class ClustersBase extends AdminResource { } return brokerIsolationData; } - + @POST @Path("/{cluster}/namespaceIsolationPolicies/{policyName}") @ApiOperation(value = "Set namespace isolation policy") @@ -537,7 +542,7 @@ public class ClustersBase extends AdminResource { return true; } catch (KeeperException.NodeExistsException nee) { if(log.isDebugEnabled()) { -log.debug("Other broker preempted the full path [{}] already. Continue...", path); +log.debug("Other broker preempted the full path [{}] already. Continue...", path); } } catch (JsonGenerationException e) { // ignore json error as it is empty hash diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java index 73dc79c..8df9348 100644 --- a/
[incubator-pulsar] branch master updated: Exclude grpc dependencies in binary distribution (#1724)
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 8054d29 Exclude grpc dependencies in binary distribution (#1724) 8054d29 is described below commit 8054d291eba66d61075cada3a0f316ac1ada2e37 Author: Sijie Guo <guosi...@gmail.com> AuthorDate: Thu May 3 14:04:39 2018 -0700 Exclude grpc dependencies in binary distribution (#1724) *Motivation* Gprc is used by functions as control plane. The dependencies were shaded in `pulsar-functions-runtime`. However the assembly plugin still includes those dependencies in the binary distribution. It causes the conflicts between protobuf versions. *Solution* Exclude grpc dependencies in binary distribution. --- all/src/assemble/bin.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/all/src/assemble/bin.xml b/all/src/assemble/bin.xml index e74b684..3c58be7 100644 --- a/all/src/assemble/bin.xml +++ b/all/src/assemble/bin.xml @@ -111,6 +111,9 @@ org.apache.zookeeper:zookeeper + +io.grpc:* + junit:junit -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] 01/02: Fixed clusters REST API to omit "global" cluster in response (#1725)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git commit 19a05651080a0213265aba74a823d0d898a89110 Author: Matteo Merli <mme...@apache.org> AuthorDate: Thu May 3 14:04:23 2018 -0700 Fixed clusters REST API to omit "global" cluster in response (#1725) --- .../pulsar/broker/admin/impl/ClustersBase.java | 33 +- .../apache/pulsar/broker/admin/AdminApiTest2.java | 3 ++ 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java index 69b8a9b..3fcb7d6 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java @@ -19,6 +19,16 @@ package org.apache.pulsar.broker.admin.impl; import static org.apache.pulsar.broker.cache.ConfigurationCacheService.POLICIES; +import static org.apache.pulsar.broker.namespace.NamespaceService.NAMESPACE_ISOLATION_POLICIES; + +import com.fasterxml.jackson.core.JsonGenerationException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; + +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; import java.io.IOException; import java.util.Collections; @@ -40,8 +50,8 @@ import javax.ws.rs.core.Response.Status; import org.apache.bookkeeper.util.ZkUtils; import org.apache.pulsar.broker.admin.AdminResource; import org.apache.pulsar.broker.cache.ConfigurationCacheService; -import static org.apache.pulsar.broker.namespace.NamespaceService.NAMESPACE_ISOLATION_POLICIES; import org.apache.pulsar.broker.web.RestException; +import org.apache.pulsar.common.naming.Constants; import org.apache.pulsar.common.naming.NamedEntity; import org.apache.pulsar.common.policies.data.BrokerNamespaceIsolationData; import org.apache.pulsar.common.policies.data.ClusterData; @@ -57,15 +67,6 @@ import org.apache.zookeeper.data.Stat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.core.JsonGenerationException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; - -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponse; -import io.swagger.annotations.ApiResponses; - public class ClustersBase extends AdminResource { @GET @@ -73,7 +74,11 @@ public class ClustersBase extends AdminResource { @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission") }) public Set getClusters() throws Exception { try { -return clustersListCache().get(); +Set clusters = clustersListCache().get(); + +// Remove "global" cluster from returned list +clusters.remove(Constants.GLOBAL_CLUSTER); +return clusters; } catch (Exception e) { log.error("[{}] Failed to get clusters list", clientAppId(), e); throw new RestException(e); @@ -238,7 +243,7 @@ public class ClustersBase extends AdminResource { throw new RestException(e); } } - + @DELETE @Path("/{cluster}") @ApiOperation(value = "Delete an existing cluster") @@ -476,7 +481,7 @@ public class ClustersBase extends AdminResource { } return brokerIsolationData; } - + @POST @Path("/{cluster}/namespaceIsolationPolicies/{policyName}") @ApiOperation(value = "Set namespace isolation policy") @@ -537,7 +542,7 @@ public class ClustersBase extends AdminResource { return true; } catch (KeeperException.NodeExistsException nee) { if(log.isDebugEnabled()) { -log.debug("Other broker preempted the full path [{}] already. Continue...", path); +log.debug("Other broker preempted the full path [{}] already. Continue...", path); } } catch (JsonGenerationException e) { // ignore json error as it is empty hash diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java index 73dc79c..8df9348 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest2.java @@ -873,6 +873,9 @@ public cl
[incubator-pulsar] branch branch-2.0 updated (60869dd -> ea1230a)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a change to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git. from 60869dd Release 2.0.0-rc1-incubating new 19a0565 Fixed clusters REST API to omit "global" cluster in response (#1725) new ea1230a Exclude grpc dependencies in binary distribution (#1724) The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: all/src/assemble/bin.xml | 3 ++ .../pulsar/broker/admin/impl/ClustersBase.java | 33 +- .../apache/pulsar/broker/admin/AdminApiTest2.java | 3 ++ 3 files changed, 25 insertions(+), 14 deletions(-) -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] 02/02: Exclude grpc dependencies in binary distribution (#1724)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git commit ea1230aef81d68ac98edeee188439b350d4cadc0 Author: Sijie Guo <guosi...@gmail.com> AuthorDate: Thu May 3 14:04:39 2018 -0700 Exclude grpc dependencies in binary distribution (#1724) *Motivation* Gprc is used by functions as control plane. The dependencies were shaded in `pulsar-functions-runtime`. However the assembly plugin still includes those dependencies in the binary distribution. It causes the conflicts between protobuf versions. *Solution* Exclude grpc dependencies in binary distribution. --- all/src/assemble/bin.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/all/src/assemble/bin.xml b/all/src/assemble/bin.xml index e74b684..3c58be7 100644 --- a/all/src/assemble/bin.xml +++ b/all/src/assemble/bin.xml @@ -111,6 +111,9 @@ org.apache.zookeeper:zookeeper + +io.grpc:* + junit:junit -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] annotated tag v2.0.0-rc1-incubating-candidate-2 updated (ea1230a -> 84a6ce0)
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a change to annotated tag v2.0.0-rc1-incubating-candidate-2 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git. *** WARNING: tag v2.0.0-rc1-incubating-candidate-2 was modified! *** from ea1230a (commit) to 84a6ce0 (tag) tagging ea1230aef81d68ac98edeee188439b350d4cadc0 (commit) replaces v2.0.0-rc1-incubating-candidate-1 by Matteo Merli on Thu May 3 14:35:35 2018 -0700 - Log - Release v2.0.0-rc1-incubating-candidate-2 -BEGIN PGP SIGNATURE- iQFGBAABCgAwFiEEjHXHOMMzcq4Zj9EMwjioyqwFX9IFAlrrgKcSHG1tZXJsaUBh cGFjaGUub3JnAAoJEMI4qMqsBV/SZo8IAIUU9s0q4hDZxeJBUua1rf55+fVT1Z+G pCAxxO7amp8mBO+VV5DG3KwUdVWsdhyDP30b961gthp9n/c0ju+qgBQmqLfdv43U b8w/fuzowPWhVPT5Dmppmq3+sbK448HsVD7lpRO+BdBoJy9YRQ2znu/+RSzu6Z60 uajZhDURbpKILnLHv3KHBAzhXO7rSOdz70mDl4YhnfYmzE7MYDQeB7l+xP50/3+1 SxCqpegq/2FElVuHEwi4b8b3kHelUDPlpDRPNOKHH+ArUShXF4R+hbJORcO+R+PB VW6IWgsr6Axu43yJV2JViSNNdX65vzqObUHvdKfzMAKreNFhL0wckzc= =kHJ5 -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes: -- To stop receiving notification emails like this one, please contact mme...@apache.org.
svn commit: r26697 - in /dev/incubator/pulsar: pulsar-2.0.0-rc1-incubating-candidate-1/ pulsar-2.0.0-rc1-incubating-candidate-2/
Author: mmerli Date: Thu May 3 22:37:01 2018 New Revision: 26697 Log: Staging artifacts and signature for Pulsar release 2.0.0-rc1-incubating-candidate-2 Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/ dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz (with props) dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.asc dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha1 dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha512 dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz (with props) dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz.asc dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz.sha1 dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz.sha512 Removed: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-1/ Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz == Binary file - no diff available. Propchange: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz -- svn:mime-type = application/octet-stream Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.asc == --- dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.asc (added) +++ dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.asc Thu May 3 22:37:01 2018 @@ -0,0 +1,11 @@ +-BEGIN PGP SIGNATURE- + +iQEzBAABCgAdFiEEjHXHOMMzcq4Zj9EMwjioyqwFX9IFAlrrjnIACgkQwjioyqwF +X9Lmigf/ciExCq/IpczWn5wDTGsCMdlamSMqh8kHbyWlt/zx4AHHHijD1wMZXu8w +ZthuvyX3QKe+lDY8H5J5Y7+U2tdiVjfN034A/HXd1RaELTTQpakYiqx734Vdpue7 +3wMGlELy0ntrRoUI2bxdypVONQbYmMb2FGnj6F94/NXa4s2jL++RQVMiPJK+Rar7 +kHA33Ga26SsIXa9u+LXbK+SNFe/eXZCvgvNitak3KSTjKjKymFmvcfK9uBtLq6eq +c40ud+P37SB3FGF1s7LBOTsDIQPJ2T/HQbg3N8ylLo6/tQNgZm42NK6tsLr9ECcy +VPe1RlZmPNpm6NtwEVmVaG44kLdFrg== +=VmpS +-END PGP SIGNATURE- Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha1 == --- dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha1 (added) +++ dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha1 Thu May 3 22:37:01 2018 @@ -0,0 +1 @@ +ea3e2fbbc4abbb2b785a8ff49542d26fb5225323 apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha512 == --- dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha512 (added) +++ dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz.sha512 Thu May 3 22:37:01 2018 @@ -0,0 +1 @@ +ae4e9446d742cba781778c5b1173d008821a3dceca191a3f79286c5728d1c0956f87a9bf674fc3c401c01e0513f0b98959cce9e8751cb31305b85ff5121af6a6 apache-pulsar-2.0.0-rc1-incubating-bin.tar.gz Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz == Binary file - no diff available. Propchange: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz -- svn:mime-type = application/octet-stream Added: dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz.asc == --- dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz.asc (added) +++ dev/incubator/pulsar/pulsar-2.0.0-rc1-incubating-candidate-2/apache-pulsar-2.0.0-rc1-incubating-src.tar.gz.asc Thu May 3 22:37:01 2018 @@ -0,0 +1,11 @@ +-BEGIN PGP SIGNATURE
[incubator-pulsar] branch master updated: Document default values for Pulsar Functions (#1657)
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 e5f2e32 Document default values for Pulsar Functions (#1657) e5f2e32 is described below commit e5f2e32c526bf88592ce7ce9e6261ccabe9aa858 Author: Luc Perkins <lucperk...@gmail.com> AuthorDate: Thu May 3 14:23:48 2018 -0700 Document default values for Pulsar Functions (#1657) * add section on default values * clarify default tenants and namespaces --- site/docs/latest/functions/api.md| 12 ++ site/docs/latest/functions/deployment.md | 39 site/docs/latest/functions/overview.md | 4 ++-- 3 files changed, 49 insertions(+), 6 deletions(-) diff --git a/site/docs/latest/functions/api.md b/site/docs/latest/functions/api.md index ca45b94..4f92012 100644 --- a/site/docs/latest/functions/api.md +++ b/site/docs/latest/functions/api.md @@ -45,10 +45,14 @@ Deploying Pulsar Functions is handled by the [`pulsar-admin`](../../reference/Cl ```bash $ bin/pulsar-admin functions localrun \ - --py sanitizer.py \ - --className sanitizer \ - --tenant sample \ - --namespace ns1 + --py sanitizer.py \ # The Python file with the function's code + --className sanitizer \ # The class or function holding the processing logic + --tenant sample \# The function's tenant (derived from the topic name by default) + --namespace ns1 \# The function's namespace (derived from the topic name by default) + --name sanitizer-function \ # The name of the function (the class name by default) + --inputs dirty-strings-in \ # The input topic(s) for the function + --output clean-strings-out \ # The output topic for the function + --logTopic sanitizer-logs# The topic to which all functions logs are published ``` For instructions on running functions in your Pulsar cluster, see the [Deploying Pulsar Functions](../deployment) guide. diff --git a/site/docs/latest/functions/deployment.md b/site/docs/latest/functions/deployment.md index 25c0c2f..3dbe6dd 100644 --- a/site/docs/latest/functions/deployment.md +++ b/site/docs/latest/functions/deployment.md @@ -22,6 +22,45 @@ In order to deploy and manage Pulsar Functions, you need to have a Pulsar {% pop If you're running a non-{% popover standalone %} cluster, you'll need to obtain the service URL for the cluster. How you obtain the service URL will depend on how you deployed your Pulsar cluster. +## Command-line interface {#cli} + +Pulsar Functions are deployed and managed using the [`pulsar-admin functions`](../../reference/CliTools#pulsar-admin-functions) interface, which contains commands such as [`create`](../../reference/CliTools#pulsar-admin-functions-create) for deploying functions in [cluster mode](#cluster-mode), [`trigger`](../../reference/CliTools#pulsar-admin-functions-trigger) for [triggering](#triggering) functions, [`list`](../../reference/CliTools#pulsar-admin-functions-list) for listing deployed fu [...] + +### Fully Qualified Function Name (FQFN) {#fqfn} + +Each Pulsar Function has a **Fully Qualified Function Name** (FQFN) that consists of three elements: the function's {% popover tenant %}, {% popover namespace %}, and function name. FQFN's look like this: + +{% include fqfn.html tenant="tenant" namespace="namespace" name="name" %} + +FQFNs enable you to, for example, create multiple functions with the same name provided that they're in different namespaces. + +### Default arguments + +When managing Pulsar Functions, you'll need to specify a variety of information about those functions, including {% popover tenant %}, {% popover namespace %}, input and output topics, etc. There are some parameters, however, that have default values that will be supplied if omitted. The table below lists the defaults: + +Parameter | Default +:-|:--- +Function name | Whichever value is specified for the class name. For example, `--className org.example.MyFunction` would give the function a name of `MyFunction` +Tenant | Derived from the input topics' names. If the input topics are under the `marketing` tenant---i.e. the topic names have the form `persistent://marketing/{namespace}/{topicName}`---then the tenant will be `marketing`. +Namespace | Derived from the input topics' names. If the input topics are under the `asia` namespace under the `marketing` tenant---i.e. the topic names have the form `persistent://marketing/asia/{topicName}`, then the namespace will be `asia`. +Output topic | `{input topic}-{function name}-output`. A function with an input topic name of `incoming` and a function name of `exclamation`, for example, would have an output topic of `incoming-exclamation-output`. +Subscription type | For at-lea
[incubator-pulsar] branch master updated: Changed property to tenant in various helper messages and tests (#1726)
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 7cd7034 Changed property to tenant in various helper messages and tests (#1726) 7cd7034 is described below commit 7cd7034731a8964d2853c9af81aa645f5309f5d1 Author: Sanjeev Kulkarni <sanjee...@gmail.com> AuthorDate: Thu May 3 18:31:02 2018 -0700 Changed property to tenant in various helper messages and tests (#1726) --- .../org/apache/pulsar/admin/cli/CmdTopics.java | 58 +++--- .../apache/pulsar/common/naming/TopicNameTest.java | 92 +++--- 2 files changed, 75 insertions(+), 75 deletions(-) diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java index 1981c71..b8f93f7 100644 --- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java +++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java @@ -93,7 +93,7 @@ public class CmdTopics extends CmdBase { @Parameters(commandDescription = "Get the list of topics under a namespace.") private class ListCmd extends CliCommand { -@Parameter(description = "property/namespace\n", required = true) +@Parameter(description = "tenant/namespace\n", required = true) private java.util.List params; @Override @@ -105,7 +105,7 @@ public class CmdTopics extends CmdBase { @Parameters(commandDescription = "Get the list of partitioned topics under a namespace.") private class PartitionedTopicListCmd extends CliCommand { -@Parameter(description = "property/namespace\n", required = true) +@Parameter(description = "tenant/namespace\n", required = true) private java.util.List params; @Override @@ -117,7 +117,7 @@ public class CmdTopics extends CmdBase { @Parameters(commandDescription = "Grant a new permission to a client role on a single topic.") private class GrantPermissions extends CliCommand { -@Parameter(description = "persistent://property/namespace/topic", required = true) +@Parameter(description = "persistent://tenant/namespace/topic", required = true) private java.util.List params; @Parameter(names = "--role", description = "Client role to which grant permissions", required = true) @@ -138,7 +138,7 @@ public class CmdTopics extends CmdBase { + "\t\t\t was not set at the topic level, but rather at the namespace level, this \n" + "\t\t\t operation will return an error (HTTP status code 412).") private class RevokePermissions extends CliCommand { -@Parameter(description = "persistent://property/namespace/topic", required = true) +@Parameter(description = "persistent://tenant/namespace/topic", required = true) private java.util.List params; @Parameter(names = "--role", description = "Client role to which revoke permissions", required = true) @@ -156,7 +156,7 @@ public class CmdTopics extends CmdBase { + "\t\t by the permissions set at the namespace level combined (union) with any eventual \n" + "\t\t specific permission set on the topic.") private class Permissions extends CliCommand { -@Parameter(description = "persistent://property/namespace/topic\n", required = true) +@Parameter(description = "persistent://tenant/namespace/topic\n", required = true) private java.util.List params; @Override @@ -168,7 +168,7 @@ public class CmdTopics extends CmdBase { @Parameters(commandDescription = "Lookup a topic from the current serving broker") private class Lookup extends CliCommand { -@Parameter(description = "persistent://property/namespace/topic\n", required = true) +@Parameter(description = "persistent://tenant/namespace/topic\n", required = true) private java.util.List params; @Override @@ -180,7 +180,7 @@ public class CmdTopics extends CmdBase { @Parameters(commandDescription = "Get Namespace bundle range of a topic") private class GetBundleRange extends CliCommand { -@Parameter(description = "persistent://property/namespace/topic\n", required = true) +@Parameter(description = "persistent://tenant/namespace/topic\n", required = true) private java.util.List params; @Override @@ -194,7 +194,7 @@ public class CmdTopics extends CmdBase { + "\t\
[incubator-pulsar] branch master updated: Support ztsUrl parameter in athenz client plugin (#1099)
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 da4bd4a Support ztsUrl parameter in athenz client plugin (#1099) da4bd4a is described below commit da4bd4ae3032159a3b8fe26f05e8067b3172b7c5 Author: hrsakai <hsa...@yahoo-corp.jp> AuthorDate: Thu Jan 25 05:05:22 2018 +0900 Support ztsUrl parameter in athenz client plugin (#1099) --- .../org/apache/pulsar/client/impl/auth/AuthenticationAthenz.java | 6 +- .../apache/pulsar/client/impl/auth/AuthenticationAthenzTest.java | 8 pulsar-client-auth-athenz/src/test/resources/authParams.json | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/pulsar-client-auth-athenz/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenz.java b/pulsar-client-auth-athenz/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenz.java index 85e9f8e..d833e95 100644 --- a/pulsar-client-auth-athenz/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenz.java +++ b/pulsar-client-auth-athenz/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenz.java @@ -56,6 +56,7 @@ public class AuthenticationAthenz implements Authentication, EncodedAuthenticati private static final String APPLICATION_X_PEM_FILE_BASE64 = "application/x-pem-file;base64"; private transient ZTSClient ztsClient = null; +private String ztsUrl; private String tenantDomain; private String tenantService; private String providerDomain; @@ -150,6 +151,9 @@ public class AuthenticationAthenz implements Authentication, EncodedAuthenticati if (authParams.containsKey("roleHeader")) { System.setProperty("athenz.auth.role.header", authParams.get("roleHeader")); } +if (authParams.containsKey("ztsUrl")) { +this.ztsUrl = authParams.get("ztsUrl"); +} } @Override @@ -164,7 +168,7 @@ public class AuthenticationAthenz implements Authentication, EncodedAuthenticati if (ztsClient == null) { ServiceIdentityProvider siaProvider = new SimpleServiceIdentityProvider(tenantDomain, tenantService, privateKey, keyId); -ztsClient = new ZTSClient(null, tenantDomain, tenantService, siaProvider); +ztsClient = new ZTSClient(ztsUrl, tenantDomain, tenantService, siaProvider); } return ztsClient; } diff --git a/pulsar-client-auth-athenz/src/test/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenzTest.java b/pulsar-client-auth-athenz/src/test/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenzTest.java index c927262..36df7f1 100644 --- a/pulsar-client-auth-athenz/src/test/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenzTest.java +++ b/pulsar-client-auth-athenz/src/test/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenzTest.java @@ -111,6 +111,14 @@ public class AuthenticationAthenzTest { } @Test +public void testZtsUrl() throws Exception { +Field field = auth.getClass().getDeclaredField("ztsUrl"); +field.setAccessible(true); +String ztsUrl = (String) field.get(auth); +assertEquals(ztsUrl, "https://localhost:4443/;); +} + +@Test public void testLoadPrivateKeyBase64() throws Exception { try { String paramsStr = new String(Files.readAllBytes(Paths.get("./src/test/resources/authParams.json"))); diff --git a/pulsar-client-auth-athenz/src/test/resources/authParams.json b/pulsar-client-auth-athenz/src/test/resources/authParams.json index d7eb690..5d695b2 100644 --- a/pulsar-client-auth-athenz/src/test/resources/authParams.json +++ b/pulsar-client-auth-athenz/src/test/resources/authParams.json @@ -2,5 +2,6 @@ "tenantService": "test_service", "privateKey": "./src/test/resources/tenant_private.pem", "providerDomain": "test_provider", - "tenantDomain": "test_tenant" + "tenantDomain": "test_tenant", + "ztsUrl": "https://localhost:4443/; } -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: update assembly src.xml to reflect new directory structure (#1109)
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 53bbf28 update assembly src.xml to reflect new directory structure (#1109) 53bbf28 is described below commit 53bbf288b6715c659103e5bc5fe290a17df53ffe Author: Luc Perkins <lucperk...@gmail.com> AuthorDate: Thu Jan 25 17:29:34 2018 -0800 update assembly src.xml to reflect new directory structure (#1109) --- all/src/assemble/src.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/all/src/assemble/src.xml b/all/src/assemble/src.xml index 8710721..0c05263 100644 --- a/all/src/assemble/src.xml +++ b/all/src/assemble/src.xml @@ -44,7 +44,7 @@ **/*.txt docker/** dashboard/** -kubernetes/** +deployment/** .git/** -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Reader interface documentation (#1096)
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 57e9d39 Reader interface documentation (#1096) 57e9d39 is described below commit 57e9d397c0d35b315bfcd2c71360e257a4739778 Author: Luc Perkins <lucperk...@gmail.com> AuthorDate: Fri Jan 26 11:25:09 2018 -0800 Reader interface documentation (#1096) * add basic description in concepts/architecture doc * begin adding section to java API doc * finish draft of java API section * finish draft of concepts/architecture section * add python example --- site/docs/latest/clients/Java.md | 40 + site/docs/latest/clients/Python.md | 16 +++ .../getting-started/ConceptsAndArchitecture.md | 51 ++ 3 files changed, 99 insertions(+), 8 deletions(-) diff --git a/site/docs/latest/clients/Java.md b/site/docs/latest/clients/Java.md index 45d55a9..f0fd9b0 100644 --- a/site/docs/latest/clients/Java.md +++ b/site/docs/latest/clients/Java.md @@ -215,6 +215,30 @@ CompletableFuture asyncMessage = consumer.receiveAsync(); Async receive operations return a {% javadoc Message client org.apache.pulsar.client.api.Message %} wrapped in a [`CompletableFuture`](http://www.baeldung.com/java-completablefuture). +## Reader interface + +The Pulsar [Reader API](../../getting-started/ConceptsAndArchitecture#reader-interface) enables applications to access messages on Pulsar {% popover topics %} + +With the Reader API, Pulsar clients can "manually position" themselves within a topic, reading all messages from a specified message onward. The Pulsar API for Java enables you to create {% javadoc Reader client org.apache.pulsar.client.api.Reader %} objects by specifying a {% popover topic %}, a {% javadoc MessageId client org.apache.pulsar.client.api.MessageId %}, and {% javadoc ReaderConfiguration client org.apache.pulsar.client.api.ReaderConfiguration %}. + +Here's an example: + +```java +ReaderConfiguration conf = new ReaderConfiguration(); +byte[] msgIdBytes = // Some message ID byte array +MessageId id = MessageId.fromByteArray(msgIdBytes); +Reader reader = pulsarClient.createReader(topic, id, conf); + +while (true) { +Message message = reader.readNext(); +// Process message +} +``` + +In the example above, a `Reader` object is instantiated for a specific topic and message (by ID); the reader then iterates over each message in the topic after the message identified by `msgIdBytes` (how that value is obtained depends on the application). + +The code sample above shows pointing the `Reader` object to a specific message (by ID), but you can also use `MessageId.earliest` to point to the earliest available message on the topic of `MessageId.latest` to point to the most recent available message. + ## Authentication Pulsar currently supports two authentication schemes: [TLS](../../admin/Authz#tls-client-auth) and [Athenz](../../admin/Authz#athenz). The Pulsar Java client can be used with both. @@ -235,8 +259,7 @@ authParams.put("tlsCertFile", "/path/to/client-cert.pem"); authParams.put("tlsKeyFile", "/path/to/client-key.pem"); conf.setAuthentication(AuthenticationTls.class.getName(), authParams); -PulsarClient client = PulsarClient.create( -"pulsar+ssl://my-broker.com:6651", conf); +PulsarClient client = PulsarClient.create("pulsar+ssl://my-broker.com:6651", conf); ``` ### Athenz @@ -270,10 +293,11 @@ PulsarClient client = PulsarClient.create( "pulsar+ssl://my-broker.com:6651", conf); ``` -**Note**: *`privateKey` parameter supports following three patterns format*. +{% include admonition.html type="info" title="Supported pattern formats" +content=' +The `privateKey` parameter supports the following three pattern formats: + +* `file:///path/to/file` +* `file:/path/to/file` +* `data:application/x-pem-file;base64,`' %} -``` -file:///path/to/file -file:/path/to/file -data:application/x-pem-file;base64, -``` diff --git a/site/docs/latest/clients/Python.md b/site/docs/latest/clients/Python.md index 9b36358..8cad7c4 100644 --- a/site/docs/latest/clients/Python.md +++ b/site/docs/latest/clients/Python.md @@ -103,3 +103,19 @@ while True: client.close() ``` + +### Reader interface example + +You can use the Pulsar Python API to use the Pulsar [reader interface](../../getting-started/ConceptsAndArchitecture#reader-interface). Here's an example: + +```python +# MessageId taken from a previously fetched message +msg_id = msg.message_id() + +reader = client.create_reader(TOPIC, msg_id) + +while True: +msg = reader.receive() +print("Received message '%s' id='%s'", m
[incubator-pulsar] branch master updated: Fixed race condition between write operation and send timeout (#1108)
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 e1ad269 Fixed race condition between write operation and send timeout (#1108) e1ad269 is described below commit e1ad269f32334a274565c95f0745468d58a2720b Author: Matteo Merli <mme...@apache.org> AuthorDate: Wed Jan 24 18:19:24 2018 -0800 Fixed race condition between write operation and send timeout (#1108) --- .../java/org/apache/pulsar/client/impl/ProducerImpl.java | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java index 1124658..32d61a5 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java @@ -20,6 +20,7 @@ package org.apache.pulsar.client.impl; import static com.google.common.base.Preconditions.checkArgument; import static java.lang.String.format; +import static com.google.common.base.Preconditions.checkNotNull; import static org.apache.pulsar.checksum.utils.Crc32cChecksum.computeChecksum; import static org.apache.pulsar.checksum.utils.Crc32cChecksum.resumeChecksum; import static org.apache.pulsar.common.api.Commands.hasChecksum; @@ -440,14 +441,16 @@ public class ProducerImpl extends ProducerBase implements TimerTask { private static final class WriteInEventLoopCallback implements Runnable { private ProducerImpl producer; +private ByteBufPair cmd; +private long sequenceId; private ClientCnx cnx; -private OpSendMsg op; static WriteInEventLoopCallback create(ProducerImpl producer, ClientCnx cnx, OpSendMsg op) { WriteInEventLoopCallback c = RECYCLER.get(); c.producer = producer; c.cnx = cnx; -c.op = op; +c.sequenceId = op.sequenceId; +c.cmd = op.cmd; return c; } @@ -455,11 +458,11 @@ public class ProducerImpl extends ProducerBase implements TimerTask { public void run() { if (log.isDebugEnabled()) { log.debug("[{}] [{}] Sending message cnx {}, sequenceId {}", producer.topic, producer.producerName, cnx, -op.sequenceId); +sequenceId); } try { -cnx.ctx().writeAndFlush(op.cmd, cnx.ctx().voidPromise()); +cnx.ctx().writeAndFlush(cmd, cnx.ctx().voidPromise()); } finally { recycle(); } @@ -468,7 +471,8 @@ public class ProducerImpl extends ProducerBase implements TimerTask { private void recycle() { producer = null; cnx = null; -op = null; +cmd = null; +sequenceId = -1; recyclerHandle.recycle(this); } -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Log only first exception in the connection exception handler (#1107)
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 f57cd88 Log only first exception in the connection exception handler (#1107) f57cd88 is described below commit f57cd88d82e4412d6031301bc1b1818b3a0cbcfe Author: Matteo Merli <mme...@apache.org> AuthorDate: Wed Jan 24 18:19:57 2018 -0800 Log only first exception in the connection exception handler (#1107) --- .../apache/pulsar/broker/service/ServerCnx.java| 16 ++-- .../org/apache/pulsar/client/impl/ClientCnx.java | 22 -- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java index df8e577..bd49fc7 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java @@ -44,6 +44,7 @@ import org.apache.pulsar.broker.service.BrokerServiceException.ServiceUnitNotRea import org.apache.pulsar.broker.web.RestException; import org.apache.pulsar.client.api.PulsarClientException; import org.apache.pulsar.client.impl.BatchMessageIdImpl; +import org.apache.pulsar.client.impl.ClientCnx; import org.apache.pulsar.client.impl.MessageIdImpl; import org.apache.pulsar.common.api.CommandUtils; import org.apache.pulsar.common.api.Commands; @@ -102,7 +103,7 @@ public class ServerCnx extends PulsarHandler { private String originalPrincipal; enum State { -Start, Connected +Start, Connected, Failed } public ServerCnx(BrokerService service) { @@ -164,7 +165,18 @@ public class ServerCnx extends PulsarHandler { @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { -log.warn("[{}] Got exception: {}", remoteAddress, cause.getMessage(), cause); +if (state != State.Failed) { +// No need to report stack trace for known exceptions that happen in disconnections +log.warn("[{}] Got exception {} : {}", remoteAddress, cause.getClass().getSimpleName(), cause.getMessage(), +ClientCnx.isKnownException(cause) ? null : cause); +state = State.Failed; +} else { +// At default info level, suppress all subsequent exceptions that are thrown when the connection has already +// failed +if (log.isDebugEnabled()) { +log.debug("[{}] Got exception: {}", remoteAddress, cause.getMessage(), cause); +} +} ctx.close(); } 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 2eaa1d4..85e2867 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 @@ -23,6 +23,7 @@ import static org.apache.pulsar.client.impl.HttpClient.getPulsarClientVersion; import java.net.InetSocketAddress; import java.net.SocketAddress; +import java.nio.channels.ClosedChannelException; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; @@ -57,6 +58,7 @@ import io.netty.buffer.ByteBuf; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.EventLoopGroup; +import io.netty.channel.unix.Errors.NativeIoException; import io.netty.util.concurrent.Promise; public class ClientCnx extends PulsarHandler { @@ -85,7 +87,7 @@ public class ClientCnx extends PulsarHandler { private String proxyToTargetBrokerAddress = null; enum State { -None, SentConnectFrame, Ready +None, SentConnectFrame, Ready, Failed } public ClientCnx(ClientConfiguration conf, EventLoopGroup eventLoopGroup) { @@ -152,10 +154,26 @@ public class ClientCnx extends PulsarHandler { @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { -log.warn("{} Exception caught: {}", ctx.channel(), cause.getMessage(), cause); +if (state != State.Failed) { +// No need to report stack trace for known exceptions that happen in disconnections +log.warn("[{}] Got exception {} : {}", remoteAddress, cause.getClass().getSimpleName(), cause.getMessage(), +isKnownException(cause) ? null : cause); +state = State.Failed; +} else { +// At default info level, suppress all subsequent exceptions that are throw
[incubator-pulsar] branch master updated: Set loadBalancerEnabled=true in ServiceConfiguration (#1104)
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 ed488b2 Set loadBalancerEnabled=true in ServiceConfiguration (#1104) ed488b2 is described below commit ed488b266c9dc63ca4728ee171dd58421727d9d7 Author: Matteo Merli <mme...@apache.org> AuthorDate: Wed Jan 24 21:23:14 2018 -0800 Set loadBalancerEnabled=true in ServiceConfiguration (#1104) * Set loadBalancerEnabled=true in ServiceConfiguration * Fixed tests to run with same settings as before * One more test config fix --- .../src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java | 2 +- .../src/test/java/org/apache/pulsar/broker/SLAMonitoringTest.java | 1 + .../java/org/apache/pulsar/broker/loadbalance/LoadBalancerTest.java| 3 ++- 3 files changed, 4 insertions(+), 2 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 7f01a87..88117e0 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 @@ -295,7 +295,7 @@ public class ServiceConfiguration implements PulsarConfiguration { /*** --- Load balancer --- / // Enable load balancer -private boolean loadBalancerEnabled = false; +private boolean loadBalancerEnabled = true; // load placement strategy[weightedRandomSelection/leastLoadedServer] (only used by SimpleLoadManagerImpl) @Deprecated private String loadBalancerPlacementStrategy = "leastLoadedServer"; // weighted random selection diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/SLAMonitoringTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/SLAMonitoringTest.java index 8e7db9d..1deb88b 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/SLAMonitoringTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/SLAMonitoringTest.java @@ -93,6 +93,7 @@ public class SLAMonitoringTest { config.setZookeeperServers("127.0.0.1" + ":" + ZOOKEEPER_PORT); config.setBrokerServicePort(brokerNativeBrokerPorts[i]); config.setDefaultNumberOfNamespaceBundles(1); +config.setLoadBalancerEnabled(false); configurations[i] = config; pulsarServices[i] = new PulsarService(config); diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LoadBalancerTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LoadBalancerTest.java index 80ca562..a877013 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LoadBalancerTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LoadBalancerTest.java @@ -142,7 +142,8 @@ public class LoadBalancerTest { config.setZookeeperServers("127.0.0.1" + ":" + ZOOKEEPER_PORT); config.setBrokerServicePort(brokerNativeBrokerPorts[i]); config.setLoadManagerClassName(SimpleLoadManagerImpl.class.getName()); -config.setAdvertisedAddress(localhost+i);; +config.setAdvertisedAddress(localhost+i); +config.setLoadBalancerEnabled(false); pulsarServices[i] = new PulsarService(config); pulsarServices[i].start(); -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Fix ByteBufPair encoder to release buffers (#1110)
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 40d37b1 Fix ByteBufPair encoder to release buffers (#1110) 40d37b1 is described below commit 40d37b10731707724b28f11254c4a72697f57bee Author: Matteo Merli <mme...@apache.org> AuthorDate: Thu Jan 25 13:55:24 2018 -0800 Fix ByteBufPair encoder to release buffers (#1110) --- .../pulsar/broker/service/ReplicatorTest.java | 24 +++ .../org/apache/pulsar/common/api/ByteBufPair.java | 9 -- .../apache/pulsar/common/api/ByteBufPairTest.java | 35 +- 3 files changed, 53 insertions(+), 15 deletions(-) diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java index f25c85e..e6d6498 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java @@ -92,7 +92,7 @@ public class ReplicatorTest extends ReplicatorTestBase { super.shutdown(); } -@Test(enabled = true) +@Test(enabled = true, timeOut = 3) public void testConfigChange() throws Exception { log.info("--- Starting ReplicatorTest::testConfigChange ---"); // This test is to verify that the config change on global namespace is successfully applied in broker during @@ -177,7 +177,7 @@ public class ReplicatorTest extends ReplicatorTestBase { // Case 3: TODO: Once automatic cleanup is implemented, add tests case to verify auto removal of clusters } -@Test +@Test(timeOut = 3) public void testConcurrentReplicator() throws Exception { log.info("--- Starting ReplicatorTest::testConcurrentReplicator ---"); @@ -220,7 +220,7 @@ public class ReplicatorTest extends ReplicatorTestBase { } -@Test(enabled = false) +@Test(enabled = false, timeOut = 3) public void testConfigChangeNegativeCases() throws Exception { log.info("--- Starting ReplicatorTest::testConfigChangeNegativeCases ---"); // Negative test cases for global namespace config change. Verify that the namespace config change can not be @@ -254,7 +254,7 @@ public class ReplicatorTest extends ReplicatorTestBase { ownerCache.tryAcquiringOwnership(globalNsBundle); } -@Test(enabled = true) +@Test(enabled = true, timeOut = 3) public void testReplication() throws Exception { log.info("--- Starting ReplicatorTest::testReplication ---"); @@ -355,7 +355,7 @@ public class ReplicatorTest extends ReplicatorTestBase { } } -@Test(enabled = false) +@Test(enabled = false, timeOut = 3) public void testReplicationOverrides() throws Exception { log.info("--- Starting ReplicatorTest::testReplicationOverrides ---"); @@ -438,7 +438,7 @@ public class ReplicatorTest extends ReplicatorTestBase { } } -@Test(enabled = true) +@Test(enabled = true, timeOut = 3) public void testFailures() throws Exception { log.info("--- Starting ReplicatorTest::testFailures ---"); @@ -459,7 +459,7 @@ public class ReplicatorTest extends ReplicatorTestBase { } -@Test +@Test(timeOut = 3) public void testReplicatePeekAndSkip() throws Exception { SortedSet testDests = new TreeSet(); @@ -482,7 +482,7 @@ public class ReplicatorTest extends ReplicatorTestBase { consumer1.close(); } -@Test +@Test(timeOut = 3) public void testReplicatorClearBacklog() throws Exception { // This test is to verify that reset cursor fails on global topic @@ -509,7 +509,7 @@ public class ReplicatorTest extends ReplicatorTestBase { consumer1.close(); } -@Test(enabled = true) +@Test(enabled = true, timeOut = 3) public void testResetCursorNotFail() throws Exception { log.info("--- Starting ReplicatorTest::testResetCursorNotFail ---"); @@ -555,7 +555,7 @@ public class ReplicatorTest extends ReplicatorTestBase { admin1.persistentTopics().resetCursor(testDests.first(), "sub-id", System.currentTimeMillis()); } -@Test(enabled = true) +@Test(enabled = true, timeOut = 3) public void testReplicationForBatchMessages() throws Exception { log.info("--- Starting ReplicatorTest::testReplicationForBatchMessages ---"); @@ -629,7 +629,7 @@ public class ReplicatorTest extends ReplicatorTestBase { * * @throws Exception */ -@Test +@Test(timeOut = 3) public void testDeleteReplicatorFailure(
[incubator-pulsar] branch master updated: Fix: deadlock while closing non-persistent topic (#1113)
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 1d10e69 Fix: deadlock while closing non-persistent topic (#1113) 1d10e69 is described below commit 1d10e696218c4f0ce2bc810a687fe14baf5295db Author: Rajan Dhabalia <rdhaba...@apache.org> AuthorDate: Thu Jan 25 15:30:19 2018 -0800 Fix: deadlock while closing non-persistent topic (#1113) --- .../apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java index 308d8c8..3b162ab 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java @@ -456,7 +456,7 @@ public class NonPersistentTopic implements Topic { FutureUtil.waitForAll(futures).thenRun(() -> { log.info("[{}] Topic closed", topic); -brokerService.removeTopicFromCache(topic); +brokerService.pulsar().getExecutor().submit(() -> brokerService.removeTopicFromCache(topic)); closeFuture.complete(null); }).exceptionally(exception -> { log.error("[{}] Error closing topic", topic, exception); -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Include BoringSSL native implementation for faster TLS (#1094)
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 a6e02bf Include BoringSSL native implementation for faster TLS (#1094) a6e02bf is described below commit a6e02bf7444992981a827d2eab550674ba014ed9 Author: Matteo Merli <mme...@apache.org> AuthorDate: Wed Jan 24 08:53:59 2018 -0800 Include BoringSSL native implementation for faster TLS (#1094) --- pom.xml | 2 +- .../main/java/org/apache/pulsar/broker/service/BrokerService.java | 4 +++- .../java/org/apache/pulsar/broker/service/BrokerServiceTest.java| 2 +- pulsar-client-shaded/pom.xml| 2 ++ pulsar-common/pom.xml | 6 ++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 301c70b..11797a4 100644 --- a/pom.xml +++ b/pom.xml @@ -108,7 +108,7 @@ flexible messaging model and an intuitive client API. 4.3.1.85-yahoo 3.4.10 -4.1.12.Final +4.1.20.Final 1.0.5 9.3.11.v20160721 1.7.17 diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java index e885333..bf7bdbd 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java @@ -123,6 +123,7 @@ import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.AdaptiveRecvByteBufAllocator; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; +import io.netty.handler.ssl.SslContext; import io.netty.util.concurrent.DefaultThreadFactory; public class BrokerService implements Closeable, ZooKeeperCacheListener { @@ -289,7 +290,8 @@ public class BrokerService implements Closeable, ZooKeeperCacheListenercom.fasterxml.jackson.core io.netty:netty io.netty:netty-all + io.netty:netty-tcnative-boringssl-static + org.apache.pulsar:pulsar-common org.apache.pulsar:pulsar-checksum net.jpountz.lz4:lz4 diff --git a/pulsar-common/pom.xml b/pulsar-common/pom.xml index 3e7bd0a..ccfabc1 100644 --- a/pulsar-common/pom.xml +++ b/pulsar-common/pom.xml @@ -70,5 +70,11 @@ pulsar-checksum ${project.version} + + + io.netty + netty-tcnative-boringssl-static + 2.0.7.Final + -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Validate expected types in Python code wrapper (#1097)
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 53619ff Validate expected types in Python code wrapper (#1097) 53619ff is described below commit 53619ff1923ff41aedb273dacb9312d973b5fb09 Author: Matteo Merli <mme...@apache.org> AuthorDate: Tue Jan 30 11:06:11 2018 -0800 Validate expected types in Python code wrapper (#1097) * Validate expected types in Python code wrapper * Address comments * Left a couple of checks in old format * More compact unit tests * Fixed checks for producer_name which can be None --- pulsar-client-cpp/python/pulsar.py | 58 ++ pulsar-client-cpp/python/pulsar_test.py | 85 - 2 files changed, 142 insertions(+), 1 deletion(-) diff --git a/pulsar-client-cpp/python/pulsar.py b/pulsar-client-cpp/python/pulsar.py index 8c1ff45..060e611 100644 --- a/pulsar-client-cpp/python/pulsar.py +++ b/pulsar-client-cpp/python/pulsar.py @@ -185,6 +185,8 @@ class Authentication: * `authParamsString`: Comma-separated list of provider-specific configuration params """ +_check_type(str, dynamicLibPath, 'dynamicLibPath') +_check_type(str, authParamsString, 'authParamsString') self.auth = _pulsar.Authentication(dynamicLibPath, authParamsString) @@ -243,6 +245,17 @@ class Client: Configure whether the Pulsar client accepts untrusted TLS certificates from the broker. """ +_check_type(str, service_url, 'service_url') +_check_type_or_none(Authentication, authentication, 'authentication') +_check_type(int, operation_timeout_seconds, 'operation_timeout_seconds') +_check_type(int, io_threads, 'io_threads') +_check_type(int, message_listener_threads, 'message_listener_threads') +_check_type(int, concurrent_lookup_requests, 'concurrent_lookup_requests') +_check_type_or_none(str, log_conf_file_path, 'log_conf_file_path') +_check_type(bool, use_tls, 'use_tls') +_check_type_or_none(str, tls_trust_certs_file_path, 'tls_trust_certs_file_path') +_check_type(bool, tls_allow_insecure_connection, 'tls_allow_insecure_connection') + conf = _pulsar.ClientConfiguration() if authentication: conf.authentication(authentication.auth) @@ -306,6 +319,18 @@ class Client: * `message_routing_mode`: Set the message routing mode for the partitioned producer. """ +_check_type(str, topic, 'topic') +_check_type_or_none(str, producer_name, 'producer_name') +_check_type_or_none(int, initial_sequence_id, 'initial_sequence_id') +_check_type(int, send_timeout_millis, 'send_timeout_millis') +_check_type(CompressionType, compression_type, 'compression_type') +_check_type(int, max_pending_messages, 'max_pending_messages') +_check_type(bool, block_if_queue_full, 'block_if_queue_full') +_check_type(bool, batching_enabled, 'batching_enabled') +_check_type(int, batching_max_messages, 'batching_max_messages') +_check_type(int, batching_max_allowed_size_in_bytes, 'batching_max_allowed_size_in_bytes') +_check_type(int, batching_max_publish_delay_ms, 'batching_max_publish_delay_ms') + conf = _pulsar.ProducerConfiguration() conf.send_timeout_millis(send_timeout_millis) conf.compression_type(compression_type) @@ -380,6 +405,14 @@ class Client: Sets the time duration for which the broker-side consumer stats will be cached in the client. """ +_check_type(str, topic, 'topic') +_check_type(str, subscription_name, 'subscription_name') +_check_type(ConsumerType, consumer_type, 'consumer_type') +_check_type(int, receiver_queue_size, 'receiver_queue_size') +_check_type_or_none(str, consumer_name, 'consumer_name') +_check_type_or_none(int, unacked_messages_timeout_ms, 'unacked_messages_timeout_ms') +_check_type(int, broker_consumer_stats_cache_time_ms, 'broker_consumer_stats_cache_time_ms') + conf = _pulsar.ConsumerConfiguration() conf.consumer_type(consumer_type) if message_listener: @@ -444,6 +477,11 @@ class Client: * `reader_name`: Sets the reader name. """ +_check_type(str, topic, 'topic') +_check_type(_pulsar.MessageId, start_message_id, 'start_message_id') +_check_type(int, receiver_queue_size, 'receiver_queue_size') +_check_type_or_none(str, reader_name, 'reader_name') + conf = _pulsar.ReaderConfiguration() if reader_listen
[incubator-pulsar] branch master updated: Publish pulsar-client-admin as a shaded artifact (#1095)
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 650a6b8 Publish pulsar-client-admin as a shaded artifact (#1095) 650a6b8 is described below commit 650a6b836cb2d3003dd8dccee2f9fd90a88f3fc5 Author: Matteo Merli <mme...@apache.org> AuthorDate: Tue Jan 30 09:08:18 2018 -0800 Publish pulsar-client-admin as a shaded artifact (#1095) --- pom.xml| 1 + pulsar-broker-shaded/pom.xml | 2 +- pulsar-broker/pom.xml | 2 +- .../pom.xml| 116 + pulsar-client-admin/pom.xml| 62 +-- pulsar-client-tools/pom.xml| 2 +- pulsar-testclient/pom.xml | 2 +- 7 files changed, 77 insertions(+), 110 deletions(-) diff --git a/pom.xml b/pom.xml index 11797a4..a98b6ed 100644 --- a/pom.xml +++ b/pom.xml @@ -79,6 +79,7 @@ flexible messaging model and an intuitive client API. pulsar-broker pulsar-broker-shaded pulsar-client-admin +pulsar-client-admin-shaded pulsar-client-tools pulsar-client pulsar-client-shaded diff --git a/pulsar-broker-shaded/pom.xml b/pulsar-broker-shaded/pom.xml index 17230dc..371105a 100644 --- a/pulsar-broker-shaded/pom.xml +++ b/pulsar-broker-shaded/pom.xml @@ -66,7 +66,7 @@ org.apache.pulsar:pulsar-common org.apache.pulsar:pulsar-client org.apache.pulsar:pulsar-client-original - org.apache.pulsar:pulsar-client-admin + org.apache.pulsar:pulsar-client-admin-original com.google.guava:guava org.apache.pulsar:pulsar-broker-common org.apache.bookkeeper:bookkeeper-server diff --git a/pulsar-broker/pom.xml b/pulsar-broker/pom.xml index d6fd3e2..6964295 100644 --- a/pulsar-broker/pom.xml +++ b/pulsar-broker/pom.xml @@ -75,7 +75,7 @@ ${project.groupId} - pulsar-client-admin + pulsar-client-admin-original ${project.version} diff --git a/pulsar-broker-shaded/pom.xml b/pulsar-client-admin-shaded/pom.xml similarity index 55% copy from pulsar-broker-shaded/pom.xml copy to pulsar-client-admin-shaded/pom.xml index 17230dc..6a2f406 100644 --- a/pulsar-broker-shaded/pom.xml +++ b/pulsar-client-admin-shaded/pom.xml @@ -19,10 +19,10 @@ under the License. --> -http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> +http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; + xmlns="http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> 4.0.0 - org.apache.pulsar pulsar @@ -30,18 +30,16 @@ .. - pulsar-broker-shaded - jar - Pulsar Shaded Broker + pulsar-client-admin + Pulsar Client Admin ${project.groupId} - pulsar-broker - ${project.parent.version} + pulsar-client-admin-original + ${project.version} - @@ -56,34 +54,15 @@ true true - false - org.apache.pulsar:pulsar-broker - org.apache.pulsar:pulsar-zookeeper-utils - org.apache.pulsar:managed-ledger - org.apache.pulsar:pulsar-common - org.apache.pulsar:pulsar-client org.apache.pulsar:pulsar-client-original - org.apache.pulsar:pulsar-client-admin - com.google.guava:guava - org.apache.pulsar:pulsar-broker-common - org.apache.bookkeeper:bookkeeper-server - org.apache.bookkeeper.stats:bookkeeper-stats-api - commons-configuration:commons-configuration - commons-lang:commons-lang - commons-logging:commons-logging - commons-digester:commons-digester - commons-cli:commons-cli - commons-io:commons-io - commons-beanutils:commons-beanutils-core - commons-beanutils:commons-beanutils + org.apache.pulsar:pulsar-client-admin-original org.apache.commons:commons-lang3 commons-codec:commons-codec commons-collections:commons-collections org.asynchttpclient:* - io.netty:netty-codec-http io
[incubator-pulsar] branch master updated: Fix url option on client tool (#1146)
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 8c93ff8 Fix url option on client tool (#1146) 8c93ff8 is described below commit 8c93ff8529eefcfbc452f3147bae8351d5bc9b2c Author: hrsakai <hsa...@yahoo-corp.jp> AuthorDate: Wed Jan 31 02:07:59 2018 +0900 Fix url option on client tool (#1146) --- .../src/main/java/org/apache/pulsar/client/cli/PulsarClientTool.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/PulsarClientTool.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/PulsarClientTool.java index 359919f..5cdbcd8 100644 --- a/pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/PulsarClientTool.java +++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/PulsarClientTool.java @@ -100,12 +100,13 @@ public class PulsarClientTool { public int run(String[] args) { try { +commandParser.parse(args); + if (isBlank(this.serviceURL)) { commandParser.usage(); return -1; } -commandParser.parse(args); if (help) { commandParser.usage(); return 0; -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Add StatefulSet option for BookKeeper on Google Kubernetes Engine (#1047)
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 53fa9d0 Add StatefulSet option for BookKeeper on Google Kubernetes Engine (#1047) 53fa9d0 is described below commit 53fa9d0d460ae2c490ea7e58f102869342b43ff6 Author: Luc Perkins <lucperk...@gmail.com> AuthorDate: Tue Jan 30 12:44:44 2018 -0800 Add StatefulSet option for BookKeeper on Google Kubernetes Engine (#1047) * add statefulset bookie config * re-add daemonset config * fix indentation issue * return to original pulsar env vars * fix minor indentation issues * fix metadata label issue * revert to original Deployment definition * add load balancer service * use only one bookie.yaml config * add proxy and cluster metadata configs * specify cluster metadata initialization as a Job rather than Pod * create separate storage classes for ledger and journal * fix YAML indentation issue * update docs for pulsar-admin pod * more documentation updates * update cluster metadata initialization instructions * add reference to pulsar proxy in docs * one more small doc update * avoid name clash in StorageClass definitions * add selector to statefulset definition in bookie.yaml * add pod antiaffinity to bookie config * remove headless Service definition for bookies * update statefulset to eliminate advertisedAddress * Added ASF header * Added ASF header * move stray YAML files into /deployment * change containers/initContainers order in config for readability * add section on client connections --- .../google-kubernetes-engine/bookie.yaml | 281 +++-- .../google-kubernetes-engine/broker.yaml | 4 +- .../google-kubernetes-engine/cluster-metadata.yaml | 42 +++ .../kubernetes/google-kubernetes-engine/proxy.yaml | 84 ++ .../google-kubernetes-engine/zookeeper.yaml| 4 +- site/docs/latest/deployment/Kubernetes.md | 96 +-- 6 files changed, 350 insertions(+), 161 deletions(-) diff --git a/deployment/kubernetes/google-kubernetes-engine/bookie.yaml b/deployment/kubernetes/google-kubernetes-engine/bookie.yaml index 6fe2a96..97800ed 100644 --- a/deployment/kubernetes/google-kubernetes-engine/bookie.yaml +++ b/deployment/kubernetes/google-kubernetes-engine/bookie.yaml @@ -17,120 +17,143 @@ # under the License. # +## Credits to Franck Cuny : https://github.com/fcuny/distributedlog-on-k8s/blob/master/bookkeeper.statefulset.yaml -apiVersion: v1 -kind: ConfigMap +# SSDs for bookie journal storage +apiVersion: storage.k8s.io/v1 +kind: StorageClass metadata: -name: bookie-config -data: -PULSAR_MEM: "\" -Xms4g -Xmx4g -XX:MaxDirectMemorySize=4g\"" -PULSAR_GC: "\" -XX:+UseG1GC \"" -dbStorage_writeCacheMaxSizeMb: "1024" -dbStorage_readAheadCacheMaxSizeMb: "1024" -zkServers: zk-0.zookeeper,zk-1.zookeeper,zk-2.zookeeper -statsProviderClass: org.apache.bookkeeper.stats.PrometheusMetricsProvider + name: bookie-ssd +provisioner: kubernetes.io/gce-pd +parameters: + type: pd-ssd + zones: us-central1-a --- - -## BookKeeper servers need to access the local disks and the pods -## cannot be moved across different nodes. -## For this reason, we run BK as a daemon set, one for each node in the -## cluster, unless restricted by label selectors -apiVersion: extensions/v1beta1 -kind: DaemonSet +# HDDs for bookie ledger storage +apiVersion: storage.k8s.io/v1 +kind: StorageClass metadata: -name: bookie -labels: -app: pulsar -component: bookkeeper -spec: -template: -metadata: -labels: -app: pulsar -component: bookkeeper -# Specify cluster to allow aggregation by cluster in -# the metrics -cluster: pulsar-gke -annotations: -prometheus.io/scrape: "true" -prometheus.io/port: "8000" - -spec: -containers: - - name: bookie -image: apachepulsar/pulsar:latest -command: ["sh", "-c"] -args: - - > -bin/apply-config-from-env.py conf/bookkeeper.conf && -bin/apply-config-from-env.py conf/pulsar_env.sh && -bin/pulsar bookie -ports: - - containerPort: 3181 -hostPort: 3181 -name: client -envFrom: - -
[incubator-pulsar] branch master updated: Comment in config breaks docker scripts (#1131)
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 b3fe055 Comment in config breaks docker scripts (#1131) b3fe055 is described below commit b3fe055942b4bd4b8befc96b347140fdfe276f73 Author: Ivan Kelly <iv...@apache.org> AuthorDate: Mon Jan 29 18:39:30 2018 +0100 Comment in config breaks docker scripts (#1131) docker/scripts/apply-config-from-env.py only accepts # comments, not double slash. --- conf/broker.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/broker.conf b/conf/broker.conf index de8ab1a..7f9dd33 100644 --- a/conf/broker.conf +++ b/conf/broker.conf @@ -165,7 +165,7 @@ enableNonPersistentTopics=true # Enable to run bookie along with broker enableRunBookieTogether=false -// Enable to run bookie autorecovery along with broker +# Enable to run bookie autorecovery along with broker enableRunBookieAutoRecoveryTogether=false ### --- Authentication --- ### -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Use Apache dist server with HTTPS to link the release signatures (#1148)
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 c86aeed Use Apache dist server with HTTPS to link the release signatures (#1148) c86aeed is described below commit c86aeedda64f18577b90dd615cd9b7fd6cf00425 Author: Matteo Merli <mme...@apache.org> AuthorDate: Tue Jan 30 15:49:18 2018 -0800 Use Apache dist server with HTTPS to link the release signatures (#1148) --- site/download.md | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/site/download.md b/site/download.md index c9353e2..5e4ae0b 100644 --- a/site/download.md +++ b/site/download.md @@ -24,7 +24,9 @@ layout: content --> -{% capture root_url %}http://www.apache.org/dyn/closer.cgi/incubator/pulsar/pulsar-{{ site.current_version }}/apache-pulsar-{{ site.current_version }}{% endcapture %} +{% capture mirror_url %}https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download=incubator/pulsar/pulsar-{{ site.current_version }}/apache-pulsar-{{ site.current_version }}{% endcapture %} + +{% capture dist_url %}https://www.apache.org/dist/incubator/pulsar/pulsar-{{ site.current_version }}/apache-pulsar-{{ site.current_version }}{% endcapture %} You can download Pulsar from the [releases page](https://github.com/apache/incubator-pulsar/releases) on GitHub or here: @@ -32,10 +34,10 @@ You can download Pulsar from the [releases page](https://github.com/apache/incub Release | Link | Crypto files :---|:-|: -Binary | [pulsar-{{ site.current_version }}-bin.tar.gz]({{ root_url }}-bin.tar.gz) | [asc]({{ root_url }}-bin.tar.gz.asc), [md5]({{ root_url }}-bin.tar.gz.md5), [sha512]({{ root_url }}-bin.tar.gz.sha512) -Source | [pulsar-{{ site.current_version }}-src.tar.gz]({{ root_url }}-src.tar.gz) | [asc]({{ root_url }}-src.tar.gz.asc), [md5]({{ root_url }}-src.tar.gz.md5), [sha512]({{ root_url }}-src.tar.gz.sha512) +Binary | [pulsar-{{ site.current_version }}-bin.tar.gz]({{ mirror_url }}-bin.tar.gz) | [asc]({{ dist_url }}-bin.tar.gz.asc), [md5]({{ dist_url }}-bin.tar.gz.md5), [sha512]({{ dist_url }}-bin.tar.gz.sha512) +Source | [pulsar-{{ site.current_version }}-src.tar.gz]({{ mirror_url }}-src.tar.gz) | [asc]({{ dist_url }}-src.tar.gz.asc), [md5]({{ dist_url }}-src.tar.gz.md5), [sha512]({{ dist_url }}-src.tar.gz.sha512) -{% include admonition.html type="info" content='You can download the [KEYS](http://www.apache.org/dev/release-signing#keys-policy) file for Pulsar http://www.apache.org/dist/incubator/pulsar/KEYS; download>here.' %} +{% include admonition.html type="info" content='You can download the [KEYS](http://www.apache.org/dev/release-signing#keys-policy) file for Pulsar https://www.apache.org/dist/incubator/pulsar/KEYS; download>here.' %} ### Release notes for the {{ site.current_version }} release @@ -66,4 +68,4 @@ Release | Download | Crypto files | Release notes %} {{ version }} binary | [pulsar-{{version}}-bin.tar.gz]({{ archive_root_url }}/pulsar-{{ version }}/apache-pulsar-{{ version }}-bin.tar.gz) | [asc]({{ archive_root_url }}/pulsar-{{ version }}/apache-pulsar-{{ version }}-bin.tar.gz.asc), [md5]({{ archive_root_url }}/pulsar-{{ version }}/apache-pulsar-{{ version }}-bin.tar.gz.md5), [sha]({{ archive_root_url }}/pulsar-{{ version }}/apache-pulsar-{{ version }}-bin.tar.gz.sha) | [Release notes v{{ version }}]({{ release_notes_root_url }}/v{ [...] {{ version }} source | [pulsar-{{ version }}-src.tar.gz]({{ archive_root_url }}/pulsar-{{ version }}/apache-pulsar-{{ version }}-src.tar.gz) | [asc]({{ archive_root_url }}/pulsar-{{ version }}/apache-pulsar-{{ version }}-src.tar.gz.asc), [md5]({{ archive_root_url }}/pulsar-{{ version }}/apache-pulsar-{{ version }}-src.tar.gz.md5), [sha]({{ archive_root_url }}/pulsar-{{ version }}/apache-pulsar-{{ version }}-src.tar.gz.sha) {% endfor %} -{% endif %} \ No newline at end of file +{% endif %} -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Update maven compiler plugin to newest version (#1042)
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 0439a1f Update maven compiler plugin to newest version (#1042) 0439a1f is described below commit 0439a1fa425dae46c6cb6298b4d21ee662f72e11 Author: Ivan Kelly <iv...@apache.org> AuthorDate: Wed Jan 31 00:48:55 2018 +0100 Update maven compiler plugin to newest version (#1042) * Update maven compiler plugin to newest version The previously used version doesn't handle the errors from newer jdk versions, so if there's a error you can't see what's actually wrong. * Let aspectJ bind to correct phase It was binding to process-sources before, which makes no sense since it works on the class files. Removed the phase specification, which allows it to bind to compile (as it does by default). --- pom.xml | 2 +- pulsar-broker/pom.xml| 1 - pulsar-zookeeper/pom.xml | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index a98b6ed..29efa02 100644 --- a/pom.xml +++ b/pom.xml @@ -742,7 +742,7 @@ flexible messaging model and an intuitive client API. maven-compiler-plugin - 2.3.2 + 3.7.0 org.apache.maven.plugins diff --git a/pulsar-broker/pom.xml b/pulsar-broker/pom.xml index 6964295..2f8811d 100644 --- a/pulsar-broker/pom.xml +++ b/pulsar-broker/pom.xml @@ -246,7 +246,6 @@ -process-sources compile diff --git a/pulsar-zookeeper/pom.xml b/pulsar-zookeeper/pom.xml index 0ce07cb..b8944e9 100644 --- a/pulsar-zookeeper/pom.xml +++ b/pulsar-zookeeper/pom.xml @@ -97,7 +97,6 @@ -process-sources compile -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Explicitly set zookeeper version in broker (#1132)
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 55cb351 Explicitly set zookeeper version in broker (#1132) 55cb351 is described below commit 55cb351599735e00f5ae9b14b819a031e505c811 Author: Ivan Kelly <iv...@apache.org> AuthorDate: Wed Jan 31 07:34:20 2018 +0100 Explicitly set zookeeper version in broker (#1132) * Explicitly set zookeeper version in broker The broker "shades" zookeeper via the aspectj stuff, but the version it shades is the one pulled in with bookkeeper-server, not the version specified in the top level pom. This is fairly harmless, but it breaks the pulsar zookeeper-shell command if you want to specify a zookeeper command from the commandline. This change explicitly pulls in the correct zookeeper version, excluding all the stuff that we usually exclude when pulling zookeeper. * Move to dependencyManagement Doing so stops us pulling in junit, so a test needed a fixup * changed compiler version by mistake * It actually needs netty. It pulls 3, we pull 4, they use different packages --- pom.xml| 18 +-- .../AntiAffinityNamespaceGroupTest.java| 37 +++--- 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/pom.xml b/pom.xml index 29efa02..ec3effb 100644 --- a/pom.xml +++ b/pom.xml @@ -169,7 +169,6 @@ flexible messaging model and an intuitive client API. org.apache.zookeeper zookeeper -tests ${zookeeper.version} @@ -180,9 +179,22 @@ flexible messaging model and an intuitive client API. log4j log4j + + + + +org.apache.zookeeper +zookeeper +tests +${zookeeper.version} + -org.jboss.netty -netty +slf4j-log4j12 +org.slf4j + + +log4j +log4j diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/AntiAffinityNamespaceGroupTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/AntiAffinityNamespaceGroupTest.java index f8b584a..fb44cbf 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/AntiAffinityNamespaceGroupTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/AntiAffinityNamespaceGroupTest.java @@ -18,6 +18,7 @@ */ package org.apache.pulsar.broker.loadbalance; +import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotEquals; import static org.testng.Assert.assertTrue; @@ -69,8 +70,6 @@ import com.google.common.collect.Range; import com.google.common.collect.Sets; import com.google.common.hash.Hashing; -import junit.framework.Assert; - public class AntiAffinityNamespaceGroupTest { private LocalBookkeeperEnsemble bkEnsemble; @@ -240,7 +239,7 @@ public class AntiAffinityNamespaceGroupTest { Set candidate = Sets.newHashSet(); Map<String, Map<String, Set>> brokerToNamespaceToBundleRange = Maps.newHashMap(); -Assert.assertEquals(brokers.size(), totalBrokers); +assertEquals(brokers.size(), totalBrokers); String assignedNamespace = namespace + "0" + bundle; candidate.addAll(brokers); @@ -248,7 +247,7 @@ public class AntiAffinityNamespaceGroupTest { // for namespace-0 all brokers available LoadManagerShared.filterAntiAffinityGroupOwnedBrokers(pulsar1, assignedNamespace, brokers, brokerToNamespaceToBundleRange, brokerToDomainMap); -Assert.assertEquals(brokers.size(), totalBrokers); +assertEquals(brokers.size(), totalBrokers); // add namespace-0 to broker-0 of domain-0 => state: n0->b0 selectBrokerForNamespace(brokerToNamespaceToBundleRange, "brokerName-0", namespace + "0", assignedNamespace); @@ -257,8 +256,8 @@ public class AntiAffinityNamespaceGroupTest { assignedNamespace = namespace + "1" + bundle; LoadManagerShared.filterAntiAffinityGroupOwnedBrokers(pulsar1, assignedNamespace, candidate, brokerToNamespaceToBundleRange, brokerToDomainMap); -Assert.assertEquals(candidate.size(), 2); -candidate.forEach(broker -> Assert.assertEquals(brokerToDomainMap.get(broker), "domain-1")); +assertEquals(candidate.size(), 2); +candidate.forEach(broker -> assertEquals(brokerToDomainMap.get(broker), "domain-1")); /
[incubator-pulsar] branch master updated: Add basic authentication plugin (#1087)
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 71f281a Add basic authentication plugin (#1087) 71f281a is described below commit 71f281ab34e4e5f9c22ea739f327d7620d0c49c7 Author: yush1ga <y.shiga.91+yush...@gmail.com> AuthorDate: Sat Feb 3 05:03:49 2018 +0900 Add basic authentication plugin (#1087) * Add password authentication plugin * Use .htpasswd * Simplify command data * Add PulsarHttpAuthenticationException to get realm information * Addressed PR comments * Fix tests * Deleted PulsarHttpAuthenticationException * Added .htpasswd to license exclude list --- pom.xml| 1 + .../AuthenticationProviderBasic.java | 142 + .../api/AuthenticatedProducerConsumerTest.java | 86 + .../test/resources/authentication/basic/.htpasswd | 2 + pulsar-client/pom.xml | 6 + .../client/impl/auth/AuthenticationBasic.java | 72 +++ .../client/impl/auth/AuthenticationDataBasic.java | 61 + 7 files changed, 343 insertions(+), 27 deletions(-) diff --git a/pom.xml b/pom.xml index 9eb1524..cbc7406 100644 --- a/pom.xml +++ b/pom.xml @@ -648,6 +648,7 @@ flexible messaging model and an intuitive client API. logs/** **/*.versionsBackup **/circe/** + pulsar-broker/src/test/resources/authentication/basic/.htpasswd pulsar-client-cpp/lib/checksum/int_types.h pulsar-client-cpp/lib/checksum/gf2.hpp pulsar-client-cpp/lib/checksum/crc32c_sse42.cc diff --git a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderBasic.java b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderBasic.java new file mode 100644 index 000..f2f2f65 --- /dev/null +++ b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderBasic.java @@ -0,0 +1,142 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.pulsar.broker.authentication; + +import org.apache.commons.codec.digest.Crypt; +import org.apache.commons.codec.digest.Md5Crypt; +import org.apache.commons.lang3.StringUtils; +import org.apache.pulsar.broker.ServiceConfiguration; + +import javax.naming.AuthenticationException; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.util.*; + +public class AuthenticationProviderBasic implements AuthenticationProvider { +private final static String HTTP_HEADER_NAME = "Authorization"; +private final static String CONF_SYSTEM_PROPERTY_KEY = "pulsar.auth.basic.conf"; +private Map<String, String> users; + +@Override +public void close() throws IOException { +// noop +} + +@Override +public void initialize(ServiceConfiguration config) throws IOException { +File confFile = new File(System.getProperty(CONF_SYSTEM_PROPERTY_KEY)); +if (!confFile.exists()) { +throw new IOException("The password auth conf file does not exist"); +} else if (!confFile.isFile()) { +throw new IOException("The path is not a file"); +} +BufferedReader reader = new BufferedReader(new FileReader(confFile)); +users = new HashMap<>(); +for (String line : reader.lines().toArray(s -> new String[s])) { +List splitLine = Arrays.asList(line.split(":")); +if (splitLine.size() != 2) { +throw new IOException("The format of the password auth conf file is invalid"); +} +users.put(splitLine.get(0), splitLine.get(1)); +} +reader.close(); +} + +@Override +public String getAuthMethodName() { +
[incubator-pulsar] branch master updated: Reader interface docs update (#1120)
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 ddd4de3 Reader interface docs update (#1120) ddd4de3 is described below commit ddd4de39446cd9d214e1112cc88e23b3ee706231 Author: Luc Perkins <lucperk...@gmail.com> AuthorDate: Fri Feb 2 12:03:12 2018 -0800 Reader interface docs update (#1120) * add basic description in concepts/architecture doc * begin adding section to java API doc * finish draft of java API section * finish draft of concepts/architecture section * add python example * add reader interface diagram and fix incomplete sentence * use local PNG rather than lucidchart URL --- site/docs/latest/clients/Java.md | 4 +--- .../latest/getting-started/ConceptsAndArchitecture.md | 8 +--- site/img/pulsar-reader-consumer-interfaces.png | Bin 0 -> 131839 bytes 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/site/docs/latest/clients/Java.md b/site/docs/latest/clients/Java.md index f0fd9b0..5eaaa9d 100644 --- a/site/docs/latest/clients/Java.md +++ b/site/docs/latest/clients/Java.md @@ -217,9 +217,7 @@ Async receive operations return a {% javadoc Message client org.apache.pulsar.cl ## Reader interface -The Pulsar [Reader API](../../getting-started/ConceptsAndArchitecture#reader-interface) enables applications to access messages on Pulsar {% popover topics %} - -With the Reader API, Pulsar clients can "manually position" themselves within a topic, reading all messages from a specified message onward. The Pulsar API for Java enables you to create {% javadoc Reader client org.apache.pulsar.client.api.Reader %} objects by specifying a {% popover topic %}, a {% javadoc MessageId client org.apache.pulsar.client.api.MessageId %}, and {% javadoc ReaderConfiguration client org.apache.pulsar.client.api.ReaderConfiguration %}. +With the [reader interface](../../getting-started/ConceptsAndArchitecture#reader-interface), Pulsar clients can "manually position" themselves within a topic, reading all messages from a specified message onward. The Pulsar API for Java enables you to create {% javadoc Reader client org.apache.pulsar.client.api.Reader %} objects by specifying a {% popover topic %}, a {% javadoc MessageId client org.apache.pulsar.client.api.MessageId %}, and {% javadoc ReaderConfiguration client org.apac [...] Here's an example: diff --git a/site/docs/latest/getting-started/ConceptsAndArchitecture.md b/site/docs/latest/getting-started/ConceptsAndArchitecture.md index f69fd78..54b0dfb 100644 --- a/site/docs/latest/getting-started/ConceptsAndArchitecture.md +++ b/site/docs/latest/getting-started/ConceptsAndArchitecture.md @@ -340,9 +340,9 @@ You can use your own service discovery system if you'd like. If you use your own ## Reader interface -In Pulsar, the "standard" [consumer interface](#consumers) involves using {% popover consumers %} to listen on {% popover topics %}, process incoming messages, and finally {% popover acknowledge %} those messages when they've been processed. Whenever a consumer disconnects from and then reconnects to a topic, it automatically begins reading from the earliest un-acked message onward because the topic's cursor is automatically managed by Pulsar. +In Pulsar, the "standard" [consumer interface](#consumers) involves using {% popover consumers %} to listen on {% popover topics %}, process incoming messages, and finally {% popover acknowledge %} those messages when they've been processed. Whenever a consumer connects to a topic, it automatically begins reading from the earliest un-acked message onward because the topic's cursor is automatically managed by Pulsar. -The **reader interface** for Pulsar enables applications to manually manage cursors. When you use a reader to connect to a topic---rather than a consumer---you need to specify *which* message the reader begins reading from. When specifying that initial message, the reader interface gives you three options: +The **reader interface** for Pulsar enables applications to manually manage cursors. When you use a reader to connect to a topic---rather than a consumer---you need to specify *which* message the reader begins reading from when it connects to a topic. When connecting to a topic, the reader interface enables you to begin with: * The **earliest** available message in the topic * The **latest** available message in the topic @@ -350,6 +350,8 @@ The **reader interface** for Pulsar enables applications to manually manage curs The reader interface is helpful for use cases like using Pulsar to provide [effectively-once](https://streaml.io/blog/exactly-once/) processing semantics for a
[incubator-pulsar] branch asf-site updated: Updated site at revision 71f281a
This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git The following commit(s) were added to refs/heads/asf-site by this push: new d348c7b Updated site at revision 71f281a d348c7b is described below commit d348c7bf2891aad88ede206671a7d88ac6d32883 Author: jenkins <bui...@apache.org> AuthorDate: Sat Feb 3 08:14:17 2018 + Updated site at revision 71f281a --- .../docs/latest/adaptors/PulsarSpark/index.html| 8 +++ .../docs/latest/adaptors/PulsarStorm/index.html| 6 +++--- content/docs/latest/admin-api/overview/index.html | 10 - content/docs/latest/admin/Authz/index.html | 20 - content/docs/latest/advanced/Encryption/index.html | 2 +- .../latest/advanced/PartitionedTopics/index.html | 10 - .../latest/advanced/RetentionExpiry/index.html | 10 - content/docs/latest/clients/Cpp/index.html | 8 +++ content/docs/latest/clients/Java/index.html| 12 +-- content/docs/latest/clients/Python/index.html | 8 +++ content/docs/latest/clients/WebSocket/index.html | 8 +++ .../docs/latest/deployment/Kubernetes/index.html | 4 ++-- .../docs/latest/deployment/aws-cluster/index.html | 4 ++-- content/docs/latest/deployment/cluster/index.html | 4 ++-- content/docs/latest/deployment/instance/index.html | 4 ++-- .../ConceptsAndArchitecture/index.html | 8 --- .../latest/getting-started/LocalCluster/index.html | 4 ++-- .../docs/latest/getting-started/docker/index.html | 4 ++-- .../docs/latest/project/BinaryProtocol/index.html | 4 ++-- .../docs/latest/project/SimulationTools/index.html | 2 +- content/docs/latest/reference/CliTools/index.html | 16 +++--- content/img/pulsar-reader-consumer-interfaces.png | Bin 0 -> 131839 bytes content/ja/adaptors/PulsarSpark/index.html | 8 +++ content/ja/adaptors/PulsarStorm/index.html | 6 +++--- content/ja/admin/AdminInterface/index.html | 14 ++-- content/ja/admin/Authz/index.html | 24 ++--- content/ja/admin/ClustersBrokers/index.html| 8 +++ content/ja/admin/PropertiesNamespaces/index.html | 8 +++ content/ja/advanced/PartitionedTopics/index.html | 14 ++-- content/ja/advanced/RetentionExpiry/index.html | 14 ++-- content/ja/clients/Cpp/index.html | 8 +++ content/ja/clients/Java/index.html | 8 +++ content/ja/clients/Python/index.html | 8 +++ content/ja/clients/WebSocket/index.html| 8 +++ content/ja/deployment/InstanceSetup/index.html | 8 +++ content/ja/deployment/Kubernetes/index.html| 4 ++-- .../ConceptsAndArchitecture/index.html | 2 +- content/ja/getting-started/LocalCluster/index.html | 4 ++-- content/ja/project/BinaryProtocol/index.html | 4 ++-- content/ja/project/SimulationTools/index.html | 2 +- content/ja/reference/CliTools/index.html | 20 - 41 files changed, 164 insertions(+), 164 deletions(-) diff --git a/content/docs/latest/adaptors/PulsarSpark/index.html b/content/docs/latest/adaptors/PulsarSpark/index.html index 748bdb9..2ce3fd6 100644 --- a/content/docs/latest/adaptors/PulsarSpark/index.html +++ b/content/docs/latest/adaptors/PulsarSpark/index.html @@ -854,9 +854,9 @@ - Spark Streaming Pulsar receiver + Spark Streaming Pulsar receiver @@ -1048,9 +1048,9 @@ - Spark Streaming Pulsar receiver + Spark Streaming Pulsar receiver @@ -1166,6 +1166,8 @@ + + Authentication and authorization in Pulsar @@ -1308,8 +1310,6 @@ - - The Pulsar admin interface diff --git a/content/docs/latest/adaptors/PulsarStorm/index.html b/content/docs/latest/adaptors/PulsarStorm/index.html index 3f740c1..a60c8c1 100644 --- a/content/docs/latest/adaptors/PulsarStorm/index.html +++ b/content/docs/latest/adaptors/PulsarStorm/index.html @@ -858,9 +858,9 @@ - Pulsar adaptor for Apache Storm + Pulsar adaptor for Apache Storm @@ -972,6 +972,8 @@ + + Authentication and authorization in Pulsar @@ -1114,
[incubator-pulsar] branch master updated: Fixed increment partitions operation (#1153)
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 d482c05 Fixed increment partitions operation (#1153) d482c05 is described below commit d482c0518f06204079024d2890a7fda3ac1b7050 Author: Matteo Merli <mme...@apache.org> AuthorDate: Sat Feb 3 08:29:33 2018 -0800 Fixed increment partitions operation (#1153) --- .../pulsar/broker/admin/PersistentTopics.java | 107 +++-- .../apache/pulsar/broker/admin/AdminApiTest2.java | 29 +++--- .../broker/admin/IncrementPartitionsTest.java | 95 ++ 3 files changed, 147 insertions(+), 84 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/PersistentTopics.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/PersistentTopics.java index da8bb0a..a3b246e 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/PersistentTopics.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/PersistentTopics.java @@ -24,6 +24,7 @@ import static org.apache.pulsar.common.util.Codec.decode; import java.io.IOException; import java.io.OutputStream; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; @@ -77,6 +78,7 @@ import org.apache.pulsar.broker.service.persistent.PersistentSubscription; import org.apache.pulsar.broker.service.persistent.PersistentTopic; import org.apache.pulsar.broker.web.RestException; import org.apache.pulsar.client.admin.PulsarAdmin; +import org.apache.pulsar.client.admin.PulsarAdminException; import org.apache.pulsar.client.admin.PulsarAdminException.NotFoundException; import org.apache.pulsar.client.admin.PulsarAdminException.PreconditionFailedException; import org.apache.pulsar.client.api.MessageId; @@ -1504,78 +1506,43 @@ public class PersistentTopics extends AdminResource { return; } -// get list of cursors name of partition-1 -final String ledgerName = dn.getPartition(1).getPersistenceNamingEncoding(); -final Set topics = Sets.newConcurrentHashSet(); -((ManagedLedgerFactoryImpl) pulsar().getManagedLedgerFactory()).getMetaStore().getCursors(ledgerName, -new MetaStoreCallback<List>() { - -@Override -public void operationComplete(List cursors, - org.apache.bookkeeper.mledger.impl.MetaStore.Stat stat) { -List<CompletableFuture> subscriptionCreationFuture = Lists.newArrayList(); -// create subscriptions for all new partition-topics -cursors.forEach(cursor -> { -String subName = Codec.decode(cursor); -for (int i = partitionMetadata.partitions; i < numPartitions; i++) { -final String topicName = dn.getPartition(i).toString(); -CompletableFuture future = new CompletableFuture<>(); - pulsar().getBrokerService().getTopic(topicName).handle((topic, ex) -> { -// cache topic to close all of them after creating all subscriptions -topics.add(topic); -if (ex != null) { -log.warn("[{}] Failed to create topic {}", clientAppId(), topicName); -future.completeExceptionally(ex); -return null; -} else { - topic.createSubscription(subName).handle((sub, e) -> { -if (e != null) { -log.warn("[{}] Failed to create subsciption {} {}", clientAppId(), -topicName, subName); - future.completeExceptionally(e); -return null; -} else { -log.info("[{}] Successfully created subsciption {} {}", -clientAppId(), topicName, subName); -future.complete(null); -return null; -} -
[incubator-pulsar] branch master updated: Remove stack traces from topic lookup errors during unloads (#1121)
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 4e60a98 Remove stack traces from topic lookup errors during unloads (#1121) 4e60a98 is described below commit 4e60a98375dc461c891693c5ff0dbc198e80a645 Author: Matteo Merli <mme...@apache.org> AuthorDate: Sat Jan 27 09:33:24 2018 -0800 Remove stack traces from topic lookup errors during unloads (#1121) --- .../pulsar/broker/lookup/DestinationLookup.java| 24 -- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/DestinationLookup.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/DestinationLookup.java index 52a17b9..a666166 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/DestinationLookup.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/DestinationLookup.java @@ -26,6 +26,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.util.Optional; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; import javax.ws.rs.DefaultValue; import javax.ws.rs.Encoded; @@ -281,18 +282,29 @@ public class DestinationLookup extends PulsarWebResource { newLookupResponse(lookupData.getBrokerUrl(), lookupData.getBrokerUrlTls(), true /* authoritative */, LookupType.Connect, requestId, false)); } -}).exceptionally(e -> { -log.warn("Failed to lookup {} for topic {} with error {}", clientAppId, fqdn.toString(), -e.getMessage(), e); +}).exceptionally(ex -> { +if (ex instanceof CompletionException && ex.getCause() instanceof IllegalStateException) { +log.info("Failed to lookup {} for topic {} with error {}", clientAppId, fqdn.toString(), +ex.getCause().getMessage()); +} else { +log.warn("Failed to lookup {} for topic {} with error {}", clientAppId, fqdn.toString(), +ex.getMessage(), ex); +} lookupfuture.complete( - newLookupErrorResponse(ServerError.ServiceNotReady, e.getMessage(), requestId)); + newLookupErrorResponse(ServerError.ServiceNotReady, ex.getMessage(), requestId)); return null; }); } }).exceptionally(ex -> { -log.warn("Failed to lookup {} for topic {} with error {}", clientAppId, fqdn.toString(), ex.getMessage(), -ex); +if (ex instanceof CompletionException && ex.getCause() instanceof IllegalStateException) { +log.info("Failed to lookup {} for topic {} with error {}", clientAppId, fqdn.toString(), +ex.getCause().getMessage()); +} else { +log.warn("Failed to lookup {} for topic {} with error {}", clientAppId, fqdn.toString(), +ex.getMessage(), ex); +} + lookupfuture.complete(newLookupErrorResponse(ServerError.ServiceNotReady, ex.getMessage(), requestId)); return null; }); -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Remove deprecation warnings related to access of PoolArenaMetric (#1161)
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 fb72f72 Remove deprecation warnings related to access of PoolArenaMetric (#1161) fb72f72 is described below commit fb72f72e5a3eb53728b35f464fc9f0ae18cf8f65 Author: Dave Rusek <dave.ru...@gmail.com> AuthorDate: Thu Feb 1 10:17:02 2018 -0700 Remove deprecation warnings related to access of PoolArenaMetric (#1161) --- .../broker/stats/AllocatorStatsGenerator.java | 33 ++ .../stats/metrics/ManagedLedgerCacheMetrics.java | 2 +- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/AllocatorStatsGenerator.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/AllocatorStatsGenerator.java index 4640927..998145b 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/AllocatorStatsGenerator.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/AllocatorStatsGenerator.java @@ -47,16 +47,19 @@ public class AllocatorStatsGenerator { } AllocatorStats stats = new AllocatorStats(); -stats.directArenas = allocator.directArenas().stream().map(x -> newPoolArenaStats(x)) -.collect(Collectors.toList()); -stats.heapArenas = allocator.heapArenas().stream().map(x -> newPoolArenaStats(x)).collect(Collectors.toList()); +stats.directArenas = allocator.metric().directArenas().stream() +.map(AllocatorStatsGenerator::newPoolArenaStats) +.collect(Collectors.toList()); +stats.heapArenas = allocator.metric().heapArenas().stream() +.map(AllocatorStatsGenerator::newPoolArenaStats) +.collect(Collectors.toList()); -stats.numDirectArenas = allocator.numDirectArenas(); -stats.numHeapArenas = allocator.numHeapArenas(); -stats.numThreadLocalCaches = allocator.numThreadLocalCaches(); -stats.normalCacheSize = allocator.normalCacheSize(); -stats.smallCacheSize = allocator.smallCacheSize(); -stats.tinyCacheSize = allocator.tinyCacheSize(); +stats.numDirectArenas = allocator.metric().numDirectArenas(); +stats.numHeapArenas = allocator.metric().numHeapArenas(); +stats.numThreadLocalCaches = allocator.metric().numThreadLocalCaches(); +stats.normalCacheSize = allocator.metric().normalCacheSize(); +stats.smallCacheSize = allocator.metric().smallCacheSize(); +stats.tinyCacheSize = allocator.metric().tinyCacheSize(); return stats; } @@ -66,9 +69,15 @@ public class AllocatorStatsGenerator { stats.numSmallSubpages = m.numSmallSubpages(); stats.numChunkLists = m.numChunkLists(); -stats.tinySubpages = m.tinySubpages().stream().map(x -> newPoolSubpageStats(x)).collect(Collectors.toList()); -stats.smallSubpages = m.smallSubpages().stream().map(x -> newPoolSubpageStats(x)).collect(Collectors.toList()); -stats.chunkLists = m.chunkLists().stream().map(x -> newPoolChunkListStats(x)).collect(Collectors.toList()); +stats.tinySubpages = m.tinySubpages().stream() +.map(AllocatorStatsGenerator::newPoolSubpageStats) +.collect(Collectors.toList()); +stats.smallSubpages = m.smallSubpages().stream() +.map(AllocatorStatsGenerator::newPoolSubpageStats) +.collect(Collectors.toList()); +stats.chunkLists = m.chunkLists().stream() +.map(AllocatorStatsGenerator::newPoolChunkListStats) +.collect(Collectors.toList()); stats.numAllocations = m.numAllocations(); stats.numTinyAllocations = m.numTinyAllocations(); diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/metrics/ManagedLedgerCacheMetrics.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/metrics/ManagedLedgerCacheMetrics.java index 95b828c..e16dfd1 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/metrics/ManagedLedgerCacheMetrics.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/metrics/ManagedLedgerCacheMetrics.java @@ -66,7 +66,7 @@ public class ManagedLedgerCacheMetrics extends AbstractMetrics { long totalAllocated = 0; long totalUsed = 0; -for (PoolArenaMetric arena : allocator.directArenas()) { +for (PoolArenaMetric arena : allocator.metric().directArenas()) { activeAllocations += arena.numActiveAllocations(); activeAllocationsTiny += arena.numActiveTinyAllocations(); activeAllocationsSmall += arena.numActiveSmallAllocations(); -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: Support Pulsar proxy from C++/Python client library (#1124)
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 58d5727 Support Pulsar proxy from C++/Python client library (#1124) 58d5727 is described below commit 58d572797ebd780fecb1c4f4478fad1d590f14c3 Author: Matteo Merli <mme...@apache.org> AuthorDate: Thu Feb 1 11:03:56 2018 -0800 Support Pulsar proxy from C++/Python client library (#1124) --- pulsar-client-cpp/lib/BinaryProtoLookupService.cc | 10 ++--- pulsar-client-cpp/lib/ClientConnection.cc | 25 +++ pulsar-client-cpp/lib/ClientConnection.h | 15 +- pulsar-client-cpp/lib/ClientImpl.cc | 6 +- pulsar-client-cpp/lib/Commands.cc | 10 - pulsar-client-cpp/lib/Commands.h | 3 ++- pulsar-client-cpp/lib/ConnectionPool.cc | 19 + pulsar-client-cpp/lib/ConnectionPool.h| 19 - pulsar-client-cpp/lib/HTTPLookupService.cc| 1 + pulsar-client-cpp/lib/LookupDataResult.h | 15 +++--- pulsar-client-cpp/lib/LookupService.h | 4 pulsar-client-cpp/lib/Url.cc | 6 ++ pulsar-client-cpp/lib/Url.h | 2 ++ pulsar-client-cpp/lib/lz4/lz4.h | 5 + pulsar-client-cpp/python/test_producer.py | 4 ++-- 15 files changed, 110 insertions(+), 34 deletions(-) diff --git a/pulsar-client-cpp/lib/BinaryProtoLookupService.cc b/pulsar-client-cpp/lib/BinaryProtoLookupService.cc index 6303449..e5b8d42 100644 --- a/pulsar-client-cpp/lib/BinaryProtoLookupService.cc +++ b/pulsar-client-cpp/lib/BinaryProtoLookupService.cc @@ -53,7 +53,7 @@ Future<Result, LookupDataResultPtr> BinaryProtoLookupService::lookupAsync( } std::string lookupName = dn->toString(); LookupDataResultPromisePtr promise = boost::make_shared(); -Future<Result, ClientConnectionWeakPtr> future = cnxPool_.getConnectionAsync(serviceUrl_); +Future<Result, ClientConnectionWeakPtr> future = cnxPool_.getConnectionAsync(serviceUrl_, serviceUrl_); future.addListener(boost::bind(::sendTopicLookupRequest, this, lookupName, false, _1, _2, promise)); return promise->getFuture(); @@ -71,7 +71,7 @@ Future<Result, LookupDataResultPtr> BinaryProtoLookupService::getPartitionMetada return promise->getFuture(); } std::string lookupName = dn->toString(); -Future<Result, ClientConnectionWeakPtr> future = cnxPool_.getConnectionAsync(serviceUrl_); +Future<Result, ClientConnectionWeakPtr> future = cnxPool_.getConnectionAsync(serviceUrl_, serviceUrl_); future.addListener(boost::bind(::sendPartitionMetadataLookupRequest, this, lookupName, _1, _2, promise)); return promise->getFuture(); @@ -100,8 +100,12 @@ void BinaryProtoLookupService::handleLookup(const std::string& destinationName, if (data->isRedirect()) { LOG_DEBUG("Lookup request is for " << destinationName << " redirected to " << data->getBrokerUrl()); + +const std::string& logicalAddress = data->getBrokerUrl(); +const std::string& physicalAddress = +data->shouldProxyThroughServiceUrl() ? serviceUrl_ : logicalAddress; Future<Result, ClientConnectionWeakPtr> future = -cnxPool_.getConnectionAsync(data->getBrokerUrl()); +cnxPool_.getConnectionAsync(logicalAddress, physicalAddress); future.addListener(boost::bind(::sendTopicLookupRequest, this, destinationName, data->isAuthoritative(), _1, _2, promise)); } else { diff --git a/pulsar-client-cpp/lib/ClientConnection.cc b/pulsar-client-cpp/lib/ClientConnection.cc index 7e954cd..8bdd7a2 100644 --- a/pulsar-client-cpp/lib/ClientConnection.cc +++ b/pulsar-client-cpp/lib/ClientConnection.cc @@ -104,7 +104,8 @@ static Result getResult(ServerError serverError) { return ResultUnknownError; } -ClientConnection::ClientConnection(const std::string& endpoint, ExecutorServicePtr executor, +ClientConnection::ClientConnection(const std::string& logicalAddress, const std::string& physicalAddress, + ExecutorServicePtr executor, const ClientConfiguration& clientConfiguration, const AuthenticationPtr& authentication) : state_(Pending), @@ -114,8 +115,9 @@ ClientConnection::ClientConnection(const std::string& endpoint, Execu
[incubator-pulsar] branch master updated: Fixed use of static synchronized in LoadManagerShared (#1154)
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 69d2b66 Fixed use of static synchronized in LoadManagerShared (#1154) 69d2b66 is described below commit 69d2b66c3c125216ba7bae64300b4224fec0c633 Author: Matteo Merli <mme...@apache.org> AuthorDate: Thu Feb 1 09:00:29 2018 -0800 Fixed use of static synchronized in LoadManagerShared (#1154) --- .../broker/loadbalance/impl/LoadManagerShared.java | 62 +- .../broker/loadbalance/impl/OverloadShedder.java | 8 ++- .../pulsar/broker/service/ReplicatorTest.java | 12 ++--- 3 files changed, 50 insertions(+), 32 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LoadManagerShared.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LoadManagerShared.java index e0af8ec..2658a95 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LoadManagerShared.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LoadManagerShared.java @@ -28,19 +28,17 @@ import java.net.URL; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.Map.Entry; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import org.apache.pulsar.broker.BrokerData; -import java.util.concurrent.TimeoutException; + import org.apache.commons.lang3.StringUtils; +import org.apache.pulsar.broker.BrokerData; import org.apache.pulsar.broker.PulsarService; -import org.apache.pulsar.broker.admin.AdminResource; +import org.apache.pulsar.broker.ServiceConfiguration; import org.apache.pulsar.broker.loadbalance.BrokerHostUsage; import org.apache.pulsar.broker.loadbalance.LoadData; import org.apache.pulsar.broker.stats.metrics.JvmMetrics; @@ -57,6 +55,9 @@ import org.slf4j.LoggerFactory; import com.beust.jcommander.internal.Lists; import com.google.common.collect.Maps; +import io.netty.util.concurrent.FastThreadLocal; +import io.netty.util.internal.PlatformDependent; + /** * This class contains code which in shared between the two load manager implementations. */ @@ -67,11 +68,21 @@ public class LoadManagerShared { public static final int MIBI = 1024 * 1024; // Cache for primary brokers according to policies. -private static final Set primariesCache = new HashSet<>(); +private static final FastThreadLocal<Set> localPrimariesCache = new FastThreadLocal<Set>() { +@Override +protected Set initialValue() throws Exception { +return new HashSet<>(); +} +}; // Cache for shard brokers according to policies. -private static final Set secondaryCache = new HashSet<>(); - +private static final FastThreadLocal<Set> localSecondaryCache = new FastThreadLocal<Set>() { +@Override +protected Set initialValue() throws Exception { +return new HashSet<>(); +} +}; + // update LoadReport at most every 5 seconds public static final long LOAD_REPORT_UPDATE_MIMIMUM_INTERVAL = TimeUnit.SECONDS.toMillis(5); @@ -83,12 +94,15 @@ public class LoadManagerShared { // Determines the brokers available for the given service unit according to the given policies. // The brokers are put into brokerCandidateCache. -public static synchronized void applyNamespacePolicies(final ServiceUnitId serviceUnit, +public static void applyNamespacePolicies(final ServiceUnitId serviceUnit, final SimpleResourceAllocationPolicies policies, final Set brokerCandidateCache, -final Set availableBrokers, -final BrokerTopicLoadingPredicate brokerTopicLoadingPredicate) { +final Set availableBrokers, final BrokerTopicLoadingPredicate brokerTopicLoadingPredicate) { +Set primariesCache = localPrimariesCache.get(); primariesCache.clear(); + +Set secondaryCache = localSecondaryCache.get(); secondaryCache.clear(); + NamespaceName namespace = serviceUnit.getNamespaceObject(); boolean isIsolationPoliciesPresent = policies.areIsolationPoliciesPresent(namespace); boolean isNonPersistentTopic = (serviceUnit instanceof NamespaceBundle) @@ -141,7 +155,7 @@ public class LoadManagerShared { } } else if (!isNonPersistentTopic && !brokerTopicLoadingPredicate.isEnablePersistentTopics(brokerUrlString)) { -// persistent topic can
[incubator-pulsar] branch master updated: Debump netty version by 1 due to ObjectCleaner bug (#1163)
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 f2073d1 Debump netty version by 1 due to ObjectCleaner bug (#1163) f2073d1 is described below commit f2073d1f4922553aa0d526c12f53cfa3712ed487 Author: Ivan Kelly <iv...@apache.org> AuthorDate: Thu Feb 1 18:00:13 2018 +0100 Debump netty version by 1 due to ObjectCleaner bug (#1163) The ObjectCleaner can possibly keep a process alive forever with netty 4.1.20 since it is not a daemon thread. See: https://github.com/netty/netty/issues/7617 This causes initialize-cluster-metadata to hang forever. 4.1.19 doesn't have this issue, so we should drop down to that until the fix is in a release. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ec3effb..d581034 100644 --- a/pom.xml +++ b/pom.xml @@ -109,7 +109,7 @@ flexible messaging model and an intuitive client API. 4.3.1.85-yahoo 3.4.10 -4.1.20.Final +4.1.19.Final 1.0.5 9.3.11.v20160721 1.7.17 -- To stop receiving notification emails like this one, please contact mme...@apache.org.
[incubator-pulsar] branch master updated: In Kafka consumer wrapper, group multiple messages when the app polls (#1115)
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 99fb872 In Kafka consumer wrapper, group multiple messages when the app polls (#1115) 99fb872 is described below commit 99fb872f2f27991de5a974a9b8434d3d6aa9366b Author: Matteo Merli <mme...@apache.org> AuthorDate: Wed Jan 31 09:13:45 2018 -0800 In Kafka consumer wrapper, group multiple messages when the app polls (#1115) * In Kafka consumer wrapper, group multiple messages when the app polls * Fixed unit tests --- .../client/kafka/compat/tests/KafkaApiTest.java| 20 +++--- .../clients/consumer/PulsarKafkaConsumer.java | 68 +++- .../kafka/compat/tests/KafkaConsumerTest.java | 72 -- 3 files changed, 91 insertions(+), 69 deletions(-) diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-tests/src/test/java/org/apache/pulsar/client/kafka/compat/tests/KafkaApiTest.java b/pulsar-client-kafka-compat/pulsar-client-kafka-tests/src/test/java/org/apache/pulsar/client/kafka/compat/tests/KafkaApiTest.java index 44357ea..957f3aa 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka-tests/src/test/java/org/apache/pulsar/client/kafka/compat/tests/KafkaApiTest.java +++ b/pulsar-client-kafka-compat/pulsar-client-kafka-tests/src/test/java/org/apache/pulsar/client/kafka/compat/tests/KafkaApiTest.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Properties; +import java.util.concurrent.atomic.AtomicInteger; import org.apache.kafka.clients.consumer.Consumer; import org.apache.kafka.clients.consumer.ConsumerRecords; @@ -91,17 +92,18 @@ public class KafkaApiTest extends BrokerTestBase { producer.flush(); producer.close(); -for (int i = 0; i < 10; i++) { -ConsumerRecords<Integer, String> records = consumer.poll(1000); -assertEquals(records.count(), 1); - -int idx = i; +AtomicInteger received = new AtomicInteger(); +while (received.get() < 10) { +ConsumerRecords<Integer, String> records = consumer.poll(100); records.forEach(record -> { -log.info("Received record: {}", record); -assertEquals(record.key().intValue(), idx); -assertEquals(record.value(), "hello-" + idx); -assertEquals(record.offset(), offsets.get(idx).longValue()); +assertEquals(record.key().intValue(), received.get()); +assertEquals(record.value(), "hello-" + received.get()); +assertEquals(record.offset(), offsets.get(received.get()).longValue()); + +received.incrementAndGet(); }); + +consumer.commitSync(); } consumer.close(); diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java b/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java index 379bde4..d3dc6e4 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java +++ b/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java @@ -61,8 +61,6 @@ import org.apache.pulsar.client.util.ConsumerName; import org.apache.pulsar.client.util.FutureUtil; import org.apache.pulsar.common.naming.DestinationName; -import com.google.common.collect.Lists; - public class PulsarKafkaConsumer<K, V> implements Consumer<K, V>, MessageListener { private static final long serialVersionUID = 1L; @@ -146,6 +144,9 @@ public class PulsarKafkaConsumer<K, V> implements Consumer<K, V>, MessageListene Properties properties = new Properties(); config.originals().forEach((k, v) -> properties.put(k, v)); ClientConfiguration clientConf = PulsarKafkaConfig.getClientConfiguration(properties); +// Since this client instance is going to be used just for the consumers, we can enable Nagle to group +// all the acknowledgments sent to broker within a short time frame +clientConf.setUseTcpNoDelay(false); try { client = PulsarClient.create(serviceUrl, clientConf); } catch (PulsarClientException e) { @@ -270,6 +271,8 @@ public class PulsarKafkaConsumer<K, V> implements Consumer<K, V>, MessageListene }); } +private static final int MAX_RECORDS_IN_SINGLE_POLL = 1000; + @SuppressWarnings("unchecked") @Override public ConsumerRecords<K, V> p
[incubator-pulsar] branch master updated: Added REST handler to create a subscription on a topic (#1151)
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 98355ca Added REST handler to create a subscription on a topic (#1151) 98355ca is described below commit 98355ca745b53f7864a9aac0ae709879d5bde48e Author: Matteo Merli <mme...@apache.org> AuthorDate: Wed Jan 31 09:11:48 2018 -0800 Added REST handler to create a subscription on a topic (#1151) --- .../pulsar/broker/admin/PersistentTopics.java | 87 +++-- .../broker/admin/CreateSubscriptionTest.java | 106 + .../pulsar/client/admin/PersistentTopics.java | 46 - .../admin/internal/PersistentTopicsImpl.java | 34 +-- .../pulsar/admin/cli/CmdPersistentTopics.java | 34 ++- .../pulsar/admin/cli/PulsarAdminToolTest.java | 19 ++-- 6 files changed, 297 insertions(+), 29 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/PersistentTopics.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/PersistentTopics.java index f241cf5..da8bb0a 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/PersistentTopics.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/PersistentTopics.java @@ -24,14 +24,12 @@ import static org.apache.pulsar.common.util.Codec.decode; import java.io.IOException; import java.io.OutputStream; -import java.time.Instant; -import java.time.ZoneId; -import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -66,6 +64,7 @@ import org.apache.bookkeeper.mledger.impl.ManagedLedgerOfflineBacklog; import org.apache.bookkeeper.mledger.impl.MetaStore.MetaStoreCallback; import org.apache.bookkeeper.mledger.impl.PositionImpl; import org.apache.commons.lang3.StringUtils; +import org.apache.pulsar.broker.PulsarServerException; import org.apache.pulsar.broker.PulsarService; import org.apache.pulsar.broker.service.BrokerServiceException.NotAllowedException; import org.apache.pulsar.broker.service.BrokerServiceException.SubscriptionBusyException; @@ -77,6 +76,7 @@ import org.apache.pulsar.broker.service.persistent.PersistentReplicator; import org.apache.pulsar.broker.service.persistent.PersistentSubscription; import org.apache.pulsar.broker.service.persistent.PersistentTopic; import org.apache.pulsar.broker.web.RestException; +import org.apache.pulsar.client.admin.PulsarAdmin; import org.apache.pulsar.client.admin.PulsarAdminException.NotFoundException; import org.apache.pulsar.client.admin.PulsarAdminException.PreconditionFailedException; import org.apache.pulsar.client.api.MessageId; @@ -106,6 +106,7 @@ import org.apache.zookeeper.data.Stat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.github.zafarkhaja.semver.Version; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; @@ -116,7 +117,6 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import com.github.zafarkhaja.semver.Version; /** */ @@ -615,7 +615,7 @@ public class PersistentTopics extends AdminResource { DestinationName dn = DestinationName.get(domain(), property, cluster, namespace, destination); if (cluster.equals(Namespaces.GLOBAL_CLUSTER)) { validateGlobalNamespaceOwnership(NamespaceName.get(property, cluster, namespace)); -} +} List subscriptions = Lists.newArrayList(); PartitionedTopicMetadata partitionMetadata = getPartitionedTopicMetadata(property, cluster, namespace, destination, authoritative); @@ -656,7 +656,7 @@ public class PersistentTopics extends AdminResource { validateAdminAndClientPermission(dn); if (cluster.equals(Namespaces.GLOBAL_CLUSTER)) { validateGlobalNamespaceOwnership(NamespaceName.get(property, cluster, namespace)); -} +} validateDestinationOwnership(dn, authoritative); Topic topic = getTopicReference(dn); return topic.getStats(); @@ -676,7 +676,7 @@ public class PersistentTopics extends AdminResource { validateAdminAndClientPermission(dn); if (cluster.equals(Namespaces.GLOBAL_CLUSTER)) { validateGlobalNamespaceOwnership(NamespaceName.get(property, cluster, namespace)); -} +} validateDestinationOwnership(dn, authoritative);