DL-2: DistributedLog should work with the official apache bookkeeper#135
DL-2: DistributedLog should work with the official apache bookkeeper#135hellostreaming wants to merge 10 commits intoapache:masterfrom
Conversation
- registerSuccessEvent and registerFailureEvent needs TimeUnit - change HashedWheelTimer to netty 4 - change channelFactory to eventLoopGroup
|
local test passed since the bk binrary updating. |
|
Awesome @zhaijack ! |
|
Awesome! all the tests passed! @leighst can you also take a look at this? |
pom.xml
Outdated
| <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
| <!-- dependencies --> | ||
| <bookkeeper.version>4.3.7-TWTTR-OSS</bookkeeper.version> | ||
| <bookkeeper.version>4.5.0-SNAPSHOT</bookkeeper.version> |
There was a problem hiding this comment.
@zhaijack since 4.5.0 is already released, I think we can remove -SNAPSHOT to use the released version.
There was a problem hiding this comment.
Thanks. will change it.
| try { | ||
| return new EpollEventLoopGroup(numThreads, threadFactory); | ||
| } catch (Throwable t) { | ||
| LOG.warn("Could not use Netty Epoll event loop for bookie server: {}", t.getMessage()); |
There was a problem hiding this comment.
Any reason to not print the stack?
LOG.warn("Could not use Netty Epoll event loop for bookie server: ", t);
There was a problem hiding this comment.
Thanks. will change it.
| System.out.println("Skip inprogress log segment " + segment); | ||
| return; | ||
| } | ||
| LedgerHandle lh = bkAdmin.openLedger(segment.getLogSegmentId(), true); |
There was a problem hiding this comment.
why did we remove the second arg?
There was a problem hiding this comment.
Thanks. This is the difference of bookkeeper apache version and twitter version. Apache version does not have the second arg, so need to change all the caller of it in DL.
There was a problem hiding this comment.
@leighst @zhaijack - I think this change is related to autorecovery chagnes in twitter branch. I haven't ported those changes. @zhaijack how about we create a github issue for this? and make a comment in the code to track this, once 4.6.0 is out we can fix this.
| addCommand(new ReadLastConfirmedCommand()); | ||
| addCommand(new ReadEntriesCommand()); | ||
| addCommand(new RecoverCommand()); | ||
| // addCommand(new RecoverCommand()); |
There was a problem hiding this comment.
Would you mind explaining why we need to remove this?
Also i think it would be preferable to link to a fix ticket here.
There was a problem hiding this comment.
I think this command depends on some auto reocvery changes that need to be ported back from twitter branch.
@zhaijack can you create a github issue and comment the issue in the code? we can fix it later.
There was a problem hiding this comment.
Thanks. #150 is opened to track this issue, will add a comment here in the code.
| /** | ||
| * InputFormat to read data from a distributedlog stream. | ||
| */ | ||
| public class DistributedLogInputFormat |
There was a problem hiding this comment.
Do we have to remove these?
There was a problem hiding this comment.
we are trying to provide a real working hdfs wrapper over distributedlog api. so we don't need this module. that would come out in subsequent changes.
|
Do we need to do similar work for ByteBuf in BKLogSegmentEntryWriter? |
|
@leighst regarding to fully leverage the bytebuf feature in 4.5.0, we will have subsequent changes to achieve zero memory copy. |
This change is to upgrade bookkeeper version to BK 4.5.0.
This change is a collaboration change with @sijie
We will provide a performance comparison between 0.4.0 (using Twitter BK) and 0.5.0 (using BK 4.5.) in a separate pull request or email.