[GitHub] incubator-rocketmq issue #99: Correct comment information
Github user lindzh commented on the issue: https://github.com/apache/incubator-rocketmq/pull/99 Very pleased to see your contribution.But could you please create an issue at https://issues.apache.org/jira/browse/ROCKETMQ/?selectedTab=com.atlassian.jira.jira-projects-plugin:issues-panel? And also rename this pull request title, like, [ROCKETMQ-XXX] as the issue id? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-rocketmq-externals pull request #4: [ROCKETMQ-81] Add the RocketMq...
Github user vesense commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq-externals/pull/4#discussion_r113353774 --- Diff: rocketmq-spark/src/main/scala/org/apache/rocketmq/spark/streaming/MQPullInputDStream.scala --- @@ -0,0 +1,535 @@ +/* + * 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.spark.streaming + +import java.util.concurrent.atomic.AtomicReference +import java.util.concurrent.{ConcurrentLinkedQueue, TimeUnit} +import java.{lang => jl, util => ju} + +import org.apache.rocketmq.client.consumer.DefaultMQPullConsumer +import org.apache.rocketmq.client.consumer.store.ReadOffsetType +import org.apache.rocketmq.common.MixAll +import org.apache.rocketmq.common.message.{MessageExt, MessageQueue} +import org.apache.rocketmq.spark.{ConsumerStrategy, _} +import org.apache.spark.storage.StorageLevel +import org.apache.spark.streaming.dstream.{DStream, DStreamCheckpointData, InputDStream} +import org.apache.spark.streaming.scheduler.rate.RateEstimator +import org.apache.spark.streaming.scheduler.{RateController, StreamInputInfo} +import org.apache.spark.util.ThreadUtils + +import scala.collection.JavaConverters._ +import scala.collection.mutable + +/** + * A DStream where + * each given RocketMq topic/queueId corresponds to an RDD partition. + * The configuration pull.max.speed.per.partition gives the maximum number + * of messages per second that each '''partition''' will accept. + * @param groupId it is for rocketMq for identifying the consumer + * @param topics the topics for the rocketmq + * @param locationStrategy locationStrategy In most cases, pass in [[LocationStrategy.PreferConsistent]], + * see [[LocationStrategy]] for more details. + * @param consumerStrategy consumerStrategy In most cases, pass in [[ConsumerStrategy.lastest]], + * see [[ConsumerStrategy]] for more details + * @param autoCommit whether commit the offset to the rocketmq server automatically or not + * @param forceSpecial Generally if the rocketmq server has checkpoint for the [[MessageQueue]], then the consumer + * will consume from the checkpoint no matter we specify the offset or not. But if forceSpecial is true, + * the rocketmq will start consuming from the specific available offset in any case. + * @param failOnDataLoss Zero data lost is not guaranteed when topics are deleted. If zero data lost is critical, + * the user must make sure all messages in a topic have been processed when deleting a topic. + */ +class MQPullInputDStream( +_ssc: StreamingContext, +groupId: String, +topics: ju.Collection[jl.String], +optionParams: ju.Map[String, String], +locationStrategy: LocationStrategy, +consumerStrategy: ConsumerStrategy, +autoCommit: Boolean, +forceSpecial: Boolean, +failOnDataLoss: Boolean + ) extends InputDStream[MessageExt](_ssc) with CanCommitOffsets{ + + private var currentOffsets = mutable.Map[TopicQueueId, Map[String, Long]]() + + private val commitQueue = new ConcurrentLinkedQueue[OffsetRange] + + private val commitCallback = new AtomicReference[OffsetCommitCallback] + + private val maxRateLimitPerPartition = optionParams.getOrDefault(RocketMQConfig.MAX_PULL_SPEED_PER_PARTITION, +"-1").toInt + + @transient private var kc: DefaultMQPullConsumer = null + + /** +* start up timer thread to persis the OffsetStore +*/ + private val scheduledExecutorService = ThreadUtils.newDaemonSingleThreadScheduledExecutor( --- End diff -- @hustfxj Fixed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-rocketmq issue #97: fix consumeTimestamp and wrong consumeTimestam...
Github user lindzh commented on the issue: https://github.com/apache/incubator-rocketmq/pull/97 Thanks for vsair's advice to get more familiar with the apache way. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
Passed: apache/incubator-rocketmq#502 (openmessaging-impl - b7ec412)
Build Update for apache/incubator-rocketmq - Build: #502 Status: Passed Duration: 15 minutes and 23 seconds Commit: b7ec412 (openmessaging-impl) Author: yukon Message: OpenMessaging code reformat. View the changeset: https://github.com/apache/incubator-rocketmq/compare/6edeb8317331...b7ec41213b5b View the full build log and details: https://travis-ci.org/apache/incubator-rocketmq/builds/225640508 -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications
[GitHub] incubator-rocketmq issue #99: Correct comment information
Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/99 [![Coverage Status](https://coveralls.io/builds/11226285/badge)](https://coveralls.io/builds/11226285) Coverage increased (+0.02%) to 37.869% when pulling **ebcc79a7211d2a9527d3936fbad72da57d8fb382 on liumian97:develop** into **6a9628b3c3e6835e37baf7b58ad9300364d4d384 on apache:develop**. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-rocketmq issue #99: Correct comment information
Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/99 [![Coverage Status](https://coveralls.io/builds/11226285/badge)](https://coveralls.io/builds/11226285) Coverage increased (+0.02%) to 37.869% when pulling **ebcc79a7211d2a9527d3936fbad72da57d8fb382 on liumian97:develop** into **6a9628b3c3e6835e37baf7b58ad9300364d4d384 on apache:develop**. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-rocketmq issue #99: Correct comment information
Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/99 [![Coverage Status](https://coveralls.io/builds/11226285/badge)](https://coveralls.io/builds/11226285) Coverage increased (+0.02%) to 37.869% when pulling **ebcc79a7211d2a9527d3936fbad72da57d8fb382 on liumian97:develop** into **6a9628b3c3e6835e37baf7b58ad9300364d4d384 on apache:develop**. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-rocketmq pull request #99: Correct comment information
GitHub user liumian97 opened a pull request: https://github.com/apache/incubator-rocketmq/pull/99 Correct comment information Correct some comment information You can merge this pull request into a Git repository by running: $ git pull https://github.com/liumian97/incubator-rocketmq develop Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rocketmq/pull/99.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #99 commit ebcc79a7211d2a9527d3936fbad72da57d8fb382 Author: liumianDate: 2017-04-25T07:11:41Z Correct comment information --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---