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

Fix of encoding and failover #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ public FailoverChainSink(Context context, String specFormat,
public FailoverChainSink(Context context, String specFormat,
List<String> list, long initialBackoff, long maxBackoff)
throws FlumeSpecException {
snk = buildSpec(context, specFormat, list, new CappedExponentialBackoff(
initialBackoff, maxBackoff));
snk = buildSpec(context, specFormat, list, initialBackoff, maxBackoff);
}

/**
Expand All @@ -81,7 +80,7 @@ static EventSink buildSpec(Context context, String spec, List<String> list,
cur = tsnk;
continue;
}
cur = new BackOffFailOverSink(tsnk, cur, policy);
cur = new BackOffFailOverSink(tsnk, cur, initialBackoff, maxBackoff);
}
return cur;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public ByteBufferInputStream(ByteBuffer buf) {
@Override
public int read() throws IOException {
try {
return buf.get();
return buf.get() & 0xFF;
} catch (BufferUnderflowException e) {
throw new EOFException();
}
Expand Down