Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

DL-2: DistributedLog should work with the official apache bookkeeper#135

Closed
hellostreaming wants to merge 10 commits intoapache:masterfrom
hellostreaming:bump_dl_version
Closed

DL-2: DistributedLog should work with the official apache bookkeeper#135
hellostreaming wants to merge 10 commits intoapache:masterfrom
hellostreaming:bump_dl_version

Conversation

@hellostreaming
Copy link
Copy Markdown
Contributor

@hellostreaming hellostreaming commented Jul 27, 2017

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.

sijie and others added 3 commits July 19, 2017 16:33
- registerSuccessEvent and registerFailureEvent needs TimeUnit
- change HashedWheelTimer to netty 4
- change channelFactory to eventLoopGroup
@hellostreaming hellostreaming changed the title (WIP) DL-2: DistributedLog should work with the official apache bookkeeper DL-2: DistributedLog should work with the official apache bookkeeper Jul 30, 2017
@hellostreaming hellostreaming changed the title DL-2: DistributedLog should work with the official apache bookkeeper (WIP)DL-2: DistributedLog should work with the official apache bookkeeper Jul 31, 2017
@hellostreaming hellostreaming changed the title (WIP)DL-2: DistributedLog should work with the official apache bookkeeper DL-2: DistributedLog should work with the official apache bookkeeper Aug 9, 2017
@hellostreaming
Copy link
Copy Markdown
Contributor Author

local test passed since the bk binrary updating.

@sijie
Copy link
Copy Markdown
Member

sijie commented Aug 9, 2017

Awesome @zhaijack !

@sijie
Copy link
Copy Markdown
Member

sijie commented Aug 16, 2017

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>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhaijack since 4.5.0 is already released, I think we can remove -SNAPSHOT to use the released version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to not print the stack?

LOG.warn("Could not use Netty Epoll event loop for bookie server: ", t);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. will change it.

System.out.println("Skip inprogress log segment " + segment);
return;
}
LedgerHandle lh = bkAdmin.openLedger(segment.getLogSegmentId(), true);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we remove the second arg?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind explaining why we need to remove this?
Also i think it would be preferable to link to a fix ticket here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to remove these?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@leighst
Copy link
Copy Markdown
Contributor

leighst commented Aug 16, 2017

Do we need to do similar work for ByteBuf in BKLogSegmentEntryWriter?

@sijie
Copy link
Copy Markdown
Member

sijie commented Aug 17, 2017

@leighst regarding to fully leverage the bytebuf feature in 4.5.0, we will have subsequent changes to achieve zero memory copy.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants