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

Processor.Context.index() -> globalProcessorIndex() #405

Merged
merged 1 commit into from Apr 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -153,10 +153,10 @@ interface Context {
ILogger logger();

/**
* Returns the index of the current processor among all the processors
* created for this vertex on all nodes: an unique cluster-wide index.
* Returns the index of the processor among all the processors created for
* this vertex on all nodes: its unique cluster-wide index.
*/
int index();
int globalProcessorIndex();

/***
* Returns the name of the vertex associated with this processor.
Expand Down
Expand Up @@ -47,7 +47,7 @@ public final class WriteBufferedP<B, T> implements Processor {

@Override
public void init(@Nonnull Outbox outbox, @Nonnull Context context) {
this.buffer = newBuffer.apply(context.index());
this.buffer = newBuffer.apply(context.globalProcessorIndex());
}

@Nonnull
Expand Down
Expand Up @@ -58,7 +58,7 @@ public ILogger logger() {
}

@Override
public int index() {
public int globalProcessorIndex() {
return index;
}

Expand Down