Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test use bkshade jar #2

Closed
wants to merge 77 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
21a618a
Support setting private key content in athenz client plugin (#672)
hrsakai Aug 25, 2017
a64d795
Fix: msg rate acquire permit for msg/bytes (#716)
rdhabalia Aug 26, 2017
1a6ffbf
add namespace site section and fix headers (#719)
rdhabalia Aug 29, 2017
3751baf
Remove Managed Ledger metadata text format (#394)
merlimat Aug 29, 2017
df93a42
add msgAck and redelivery debug-logs And add topic-name in debug-logs…
rdhabalia Aug 30, 2017
aeeeb56
CPP Client: Small fixes to make the code work with older libraries - …
jai1 Aug 30, 2017
aa40ebb
Validate dynamic-configuration value while updating or init (#725)
rdhabalia Aug 31, 2017
f8b051a
Handle NPE at load-manager when leader couldn't find available broker…
rdhabalia Aug 31, 2017
070ebc0
Issue 733: Event Time support in java client (#734)
sijie Aug 31, 2017
7b9477b
Update `protobuf/README.md` (#737)
sijie Sep 1, 2017
6ca3373
fix code sample (#740)
lucperkins Sep 1, 2017
dec05d8
Managed-ledger admin update zk with the stat-version (#741)
rdhabalia Sep 1, 2017
5f5015b
Added reader endpoint description to WebSocket.md (#729)
hrsakai Sep 5, 2017
a9cca05
Include a pre-built protoc in `pulsar-build` docker image (#743)
sijie Sep 5, 2017
f740f34
Position Reader on a specific message within a batch (#720)
merlimat Sep 6, 2017
9c75f8f
Make navbar more mobile friendly (#728)
lucperkins Sep 6, 2017
8c0d399
Add user-defined properties to cursor position (#744)
merlimat Sep 8, 2017
6d2f798
Added links to blog posts (#723)
merlimat Sep 8, 2017
ee1ba68
Reader API for C++ client (#717)
merlimat Sep 12, 2017
3a775cf
Add msg ack-hole metrics to internal-stats and broker-stats (#750)
rdhabalia Sep 12, 2017
817898e
Add configuration to enable throttling for non-backlog consumers (#754)
rdhabalia Sep 12, 2017
bdbb121
Broker side deduplication (#751)
merlimat Sep 13, 2017
6e3ba01
Avoid storing ack-msg range while switching-ledger (#756)
rdhabalia Sep 13, 2017
c19a1ce
Consider cluster-throttling config when namespace-policy throttling i…
rdhabalia Sep 13, 2017
5cf010e
Added Python wrapper for C++ reader API (#718)
merlimat Sep 13, 2017
a8abd98
Updated bookkeper version to 4.3.1.72 (#757)
merlimat Sep 13, 2017
0acfe57
Pulsar Clients: Added a mandatory stop to the Backoff logic (#747)
jai1 Sep 13, 2017
540b9bc
Execute Python client lib unit tests during build (#722)
merlimat Sep 13, 2017
2a04683
Parse authParamsString on plugin side (#671) (#721)
tkb77 Sep 14, 2017
8f15858
Issue #735: Event Time support in c++ client (#736)
sijie Sep 14, 2017
dd635ac
Admin Tool: Adding support to peek batch Messages (#727)
jai1 Sep 15, 2017
d4a8c25
Expose control of sequence id in Java producer API (#760)
merlimat Sep 15, 2017
fed5ae3
Add option to persist unack-msg range to cursor-ledger if range is hi…
rdhabalia Sep 15, 2017
b5bdd79
End to End Encryption Support - Java client (#731)
saandrews Sep 16, 2017
e7f1160
Kafka client Java API wrapper (#761)
merlimat Sep 17, 2017
1f7712c
Use `advertisedAddress` from host IP in Kubernetes deployment (#764)
merlimat Sep 18, 2017
824922a
Cpp producer sequence id changes (#763)
merlimat Sep 18, 2017
272f290
CPP Client: Added client version to User Agent in HTTP Lookup (#765)
jai1 Sep 18, 2017
fbdec45
[#766] - Disabling IOUtilsTest.test5() for failures (#768)
merlimat Sep 19, 2017
549d1bf
Fix some documents (#767)
Sep 19, 2017
1e73b31
Don't reuse JVM forks when running tests (#769)
merlimat Sep 20, 2017
b53a5dc
Fixed race condition in ProxyPublishConsumeTest (#770)
merlimat Sep 20, 2017
94b1fb9
Fix Intermittent test failure for MessageDispatchThrottlingTest (#771)
rdhabalia Sep 20, 2017
b96c50d
Fix Intermittent test for dispatcher (#774)
rdhabalia Sep 21, 2017
8bf8eb1
Refactored replicator test with backlog quota interactions (#773)
merlimat Sep 21, 2017
c8487ef
Close topics after creating all subscriptions on increment-partitions…
rdhabalia Sep 21, 2017
79a7790
Fix ClientDeduplicationTest intermittent failure with parallel tests …
merlimat Sep 21, 2017
696c4a9
Fixed the jar name for the aspectjweaver (#775)
merlimat Sep 21, 2017
577b897
Ensure producer/consumer are creating before upgrading from HTTP to W…
merlimat Sep 21, 2017
7daee93
Added Bouncy Castle Licence files (#783)
saandrews Sep 22, 2017
c127f2c
add dlog impl
ArvinDevel Aug 24, 2017
c83a9d7
Initialize DlogBasedPulsar
ArvinDevel Aug 30, 2017
a8ab575
sub update
ArvinDevel Aug 30, 2017
44df4c3
update impl
ArvinDevel Sep 6, 2017
61cc884
9-6
ArvinDevel Sep 6, 2017
7874789
update before rebase
ArvinDevel Sep 7, 2017
0b41040
clear before commit
ArvinDevel Sep 8, 2017
dee089f
internal update
ArvinDevel Sep 14, 2017
5898aad
update dlog impl
ArvinDevel Sep 15, 2017
19b64bc
fix test error
ArvinDevel Sep 15, 2017
35c6000
"enable unit test for DlogBasedManagedLedger"
ArvinDevel Sep 21, 2017
bd17a1a
"promote the impl, fix null pointer error"
ArvinDevel Sep 23, 2017
71bb6aa
"change mangedCursor's bk to dlog's bk(cut managedLedgerConfig's comp…
ArvinDevel Sep 26, 2017
aa18b5e
"update managedLedger test "
ArvinDevel Sep 27, 2017
7d554e0
"fix some error, such as change ManagedLedgerConfig to DlogBased..., …
ArvinDevel Oct 3, 2017
7e3f7d6
"fix some error, enable cache"
ArvinDevel Oct 4, 2017
d61e725
"bump netty to 4.1, move log reader to cache"
ArvinDevel Oct 6, 2017
f384d3e
"refactor initialize log writer"
ArvinDevel Oct 8, 2017
8cc2af3
"unit test use bkshade-jar"
ArvinDevel Oct 10, 2017
2f2768a
"disable numEntriesPerLedger test, because dlog doesn't has correspon…
ArvinDevel Oct 10, 2017
459132b
"set read timeout, disable some tests relative to MaxEntriesPerLedger"
ArvinDevel Oct 11, 2017
963f392
"enable write flush, add dlogbased ml standalone setup"
ArvinDevel Oct 12, 2017
f7a39a4
add standalone conf
ArvinDevel Oct 16, 2017
c67ab14
handle exceptions in main, and take care of exceptions of localDLMEmu…
ArvinDevel Oct 18, 2017
dc55594
"fix standalone mode error, enable dlog ByteBuf interface"
ArvinDevel Oct 20, 2017
904a2cf
"refactor Position representative, deprecate DlogBasedPosition"
ArvinDevel Oct 20, 2017
b3d37a5
"reduce dlogBased yahoo-bk dependency, bump AsycHttpClient version to…
ArvinDevel Oct 25, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions all/licenses/LICENSE-bouncycastle.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
The Bouncy Castle License

Copyright (c) 2000-2015 The Legion Of The Bouncy Castle Inc. (http://www.bouncycastle.org)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
3 changes: 3 additions & 0 deletions all/src/assemble/LICENSE.bin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -363,3 +363,6 @@ Eclipse Public License 1.0 -- licenses/LICENSE-EPL-1.0.txt

Public Domain (CC0) -- licenses/LICENSE-CC0.txt
* Reactive Streams -- org.reactivestreams-*.jar

Bouncy Castle License
* Bouncy Castle -- org.bouncycastle*.jar -- licenses/LICENSE-bouncycastle.txt
9 changes: 2 additions & 7 deletions bin/pulsar
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ OPTS="$OPTS -Dlog4j.configuration=`basename $PULSAR_LOG_CONF`"
OPTS="$OPTS -Djute.maxbuffer=10485760 -Djava.net.preferIPv4Stack=true"

OPTS="-cp $PULSAR_CLASSPATH $OPTS"
#OPTS="-verbose:class $OPTS"
OPTS=" -XX:+PrintCommandLineFlags $OPTS"

OPTS="$OPTS $PULSAR_EXTRA_OPTS"

Expand All @@ -202,18 +204,11 @@ elif [ $COMMAND == "bookie" ]; then
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.bookkeeper.proto.BookieServer --conf $PULSAR_BOOKKEEPER_CONF $@
elif [ $COMMAND == "zookeeper" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"zookeeper.log"}

# Add instrumentation
WEAVER_JAR=`find $PULSAR_HOME/lib -name 'aspectjweaver-*.jar'`
if [ -n "$WEAVER_JAR" ]; then OPTS="$OPTS -javaagent:$WEAVER_JAR"; fi
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.pulsar.zookeeper.ZooKeeperStarter $PULSAR_ZK_CONF $@
elif [ $COMMAND == "global-zookeeper" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"global-zookeeper.log"}
# Allow global ZK to turn into read-only mode when it cannot reach the quorum
OPTS="${OPTS} -Dreadonlymode.enabled=true"
# Add instrumentation
WEAVER_JAR=`find $PULSAR_HOME/lib -name 'aspectjweaver-*.jar'`
if [ -n "$WEAVER_JAR" ]; then OPTS="$OPTS -javaagent:$WEAVER_JAR"; fi
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.pulsar.zookeeper.ZooKeeperStarter $PULSAR_GLOBAL_ZK_CONF $@
elif [ $COMMAND == "discovery" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"discovery.log"}
Expand Down
8 changes: 4 additions & 4 deletions bin/pulsar-managed-ledger-admin
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ deleteLedgerIds : str
def deleteLedgerIdsFromManagedLedgerInfo(zk, mlPath, deletLedgerIds):
try:
# get managed-ledger info
mlData = zk.get(mlPath)[0]
(mlData, mlStat) = zk.get(mlPath)
mlInfo = MLDataFormats_pb2.ManagedLedgerInfo()
isTextFormat = False
try:
Expand All @@ -106,7 +106,7 @@ def deleteLedgerIdsFromManagedLedgerInfo(zk, mlPath, deletLedgerIds):
updatedMlInfo = MessageToString(mlInfo, True)
else:
updatedMlInfo = mlInfo.SerializeToString();
zk.set(mlPath, updatedMlInfo, -1)
zk.set(mlPath, updatedMlInfo, version=mlStat.version)
print 'Updated {} with value\n{}'.format(mlPath, str(mlInfo))

except Exception as e:
Expand Down Expand Up @@ -157,7 +157,7 @@ markDeletePosition: str
'''
def updateCursorMarkDelete(zk, cursorPath, markDeleteLedgerId, markDeleteEntryId):
try:
cursorData = zk.get(cursorPath)[0]
(cursorData, cursorStat) = zk.get(cursorPath)
cursorInfo = MLDataFormats_pb2.ManagedCursorInfo()
isTextFormat = False
try:
Expand All @@ -172,7 +172,7 @@ def updateCursorMarkDelete(zk, cursorPath, markDeleteLedgerId, markDeleteEntryId
sData = MessageToString(cursorInfo, True)
else:
sData = cursorInfo.SerializeToString()
zk.set(cursorPath, sData, -1)
zk.set(cursorPath, sData, version=cursorStat.version)
print 'Updated {} with value \n{}'.format(cursorPath, cursorInfo)
except Exception as e:
traceback.print_exc()
Expand Down
13 changes: 13 additions & 0 deletions build/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

FROM ubuntu:16.04

# prepare the directory for pulsar related files
RUN mkdir /pulsar
ADD protobuf.patch /pulsar

RUN apt-get update
RUN apt-get install -y maven tig g++ cmake libssl-dev libcurl4-openssl-dev \
liblog4cxx-dev libprotobuf-dev libboost-all-dev libgtest-dev \
Expand Down Expand Up @@ -51,3 +55,12 @@ RUN wget https://github.com/pseudomuto/protoc-gen-doc/releases/download/v1.0.0-a
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

# Build the patched protoc
RUN git clone https://github.com/google/protobuf.git /pulsar/protobuf && \
cd /pulsar/protobuf && \
git checkout v2.4.1 && \
patch -p1 < /pulsar/protobuf.patch && \
autoreconf --install && \
./configure && \
make
File renamed without changes.
183 changes: 183 additions & 0 deletions conf/bookie.conf.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
#/**
# * 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.
# */

## Bookie settings

# Port that bookie server listen on
bookiePort=3181

# TODO: change the journal directory
# Directory Bookkeeper outputs its write ahead log
journalDirectory=/tmp/data/bk/journal

# TODO: change the ledgers directory
# Directory Bookkeeper outputs ledger snapshots
ledgerDirectories=/tmp/data/bk/ledgers

# TODO: change the index directory
# Directory in which index files will be stored.
indexDirectories=/tmp/data/bk/ledgers

# Ledger Manager Class
# What kind of ledger manager is used to manage how ledgers are stored, managed
# and garbage collected. Try to read 'BookKeeper Internals' for detail info.
ledgerManagerType=hierarchical

# Root zookeeper path to store ledger metadata
# This parameter is used by zookeeper-based ledger manager as a root znode to
# store all ledgers.
zkLedgersRootPath=/messaging/bookkeeper/ledgers

# Max file size of entry logger, in bytes
# A new entry log file will be created when the old one reaches the file size limitation
logSizeLimit=1073741823

# Max file size of journal file, in mega bytes
# A new journal file will be created when the old one reaches the file size limitation
#
journalMaxSizeMB=2048

# Max number of old journal file to kept
# Keep a number of old journal files would help data recovery in specia case
#
journalMaxBackups=5

# How long the interval to trigger next garbage collection, in milliseconds
# Since garbage collection is running in background, too frequent gc
# will heart performance. It is better to give a higher number of gc
# interval if there is enough disk capacity.
# gc per 1 hour (aligning with most DL rolling interval)
gcInitialWaitTime=600000
gcWaitTime=3600000
# do minor compaction per 2 hours
minorCompactionInterval=7200
minorCompactionThreshold=0.2
# disable major compaction
majorCompactionInterval=0
# reduce major compaction threshold to a low value to prevent bad force compaction behavior
majorCompactionThreshold=0.3
# Compaction Rate & Max Outstanding
compactionRate=10737418
compactionMaxOutstandingRequests=10737418

# How long the interval to flush ledger index pages to disk, in milliseconds
# Flushing index files will introduce much random disk I/O.
# If separating journal dir and ledger dirs each on different devices,
# flushing would not affect performance. But if putting journal dir
# and ledger dirs on same device, performance degrade significantly
# on too frequent flushing. You can consider increment flush interval
# to get better performance, but you need to pay more time on bookie
# server restart after failure.
#
flushInterval=1000

# Interval to watch whether bookie is dead or not, in milliseconds
#
# bookieDeathWatchInterval=1000

## zookeeper client settings

# A list of one of more servers on which zookeeper is running.
# The server list can be comma separated values, for example:
# zkServers=zk1:2181,zk2:2181,zk3:2181
zkServers=localhost:2181

# ZooKeeper client session timeout in milliseconds
# Bookie server will exit if it received SESSION_EXPIRED because it
# was partitioned off from ZooKeeper for more than the session timeout
# JVM garbage collection, disk I/O will cause SESSION_EXPIRED.
# Increment this value could help avoiding this issue
zkTimeout=30000

## NIO Server settings

# This settings is used to enabled/disabled Nagle's algorithm, which is a means of
# improving the efficiency of TCP/IP networks by reducing the number of packets
# that need to be sent over the network.
# If you are sending many small messages, such that more than one can fit in
# a single IP packet, setting server.tcpnodelay to false to enable Nagle algorithm
# can provide better performance.
# Default value is true.
#
serverTcpNoDelay=true

## ledger cache settings

# Max number of ledger index files could be opened in bookie server
# If number of ledger index files reaches this limitation, bookie
# server started to swap some ledgers from memory to disk.
# Too frequent swap will affect performance. You can tune this number
# to gain performance according your requirements.
openFileLimit=20000

# Size of a index page in ledger cache, in bytes
# A larger index page can improve performance writing page to disk,
# which is efficent when you have small number of ledgers and these
# ledgers have similar number of entries.
# If you have large number of ledgers and each ledger has fewer entries,
# smaller index page would improve memory usage.
pageSize=8192

# How many index pages provided in ledger cache
# If number of index pages reaches this limitation, bookie server
# starts to swap some ledgers from memory to disk. You can increment
# this value when you found swap became more frequent. But make sure
# pageLimit*pageSize should not more than JVM max memory limitation,
# otherwise you would got OutOfMemoryException.
# In general, incrementing pageLimit, using smaller index page would
# gain bettern performance in lager number of ledgers with fewer entries case
# If pageLimit is -1, bookie server will use 1/3 of JVM memory to compute
# the limitation of number of index pages.
pageLimit=131072

#If all ledger directories configured are full, then support only read requests for clients.
#If "readOnlyModeEnabled=true" then on all ledger disks full, bookie will be converted
#to read-only mode and serve only read requests. Otherwise the bookie will be shutdown.
readOnlyModeEnabled=true

# Bookie Journal Settings
writeBufferSizeBytes=262144
journalFlushWhenQueueEmpty=false
journalRemoveFromPageCache=true
journalAdaptiveGroupWrites=true
journalMaxGroupWaitMSec=4
journalBufferedEntriesThreshold=180
journalBufferedWritesThreshold=131072
journalMaxGroupedEntriesToCommit=200
journalPreAllocSizeMB=4

# Sorted Ledger Storage Settings
sortedLedgerStorageEnabled=true
skipListSizeLimit=67108864
skipListArenaChunkSize=2097152
skipListArenaMaxAllocSize=131072
fileInfoCacheInitialCapacity=10000
fileInfoMaxIdleTime=3600

# Bookie Threads Settings (NOTE: change this to align the cpu cores)
numAddWorkerThreads=4
numJournalCallbackThreads=4
numReadWorkerThreads=4
numLongPollWorkerThreads=4

# stats
statsProviderClass=org.apache.bookkeeper.stats.CodahaleMetricsServletProvider
# Exporting codahale stats
codahaleStatsHttpPort=9001
useHostNameAsBookieID=true
allowLoopback=true
5 changes: 5 additions & 0 deletions conf/bookkeeper.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ bookiePort=3181
# set the listening interface.
allowLoopback=false

# Configure a specific hostname or IP address that the bookie should use to advertise itself to
# clients. If not set, bookie will advertised its own IP address or hostname, depending on the
# listeningInterface and `seHostNameAsBookieID settings.
advertisedAddress=

# Directory Bookkeeper outputs its write ahead log
journalDirectory=data/bookkeeper/journal

Expand Down
Loading