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

OAK-11085: Use a single definition of MAX_SEGMENT_SIZE in Segment #1702

Open
wants to merge 1 commit into
base: trunk
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 @@ -96,7 +96,7 @@ public class Segment {
/**
* Maximum segment size
*/
static final int MAX_SEGMENT_SIZE = 1 << 18; // 256kB
public static final int MAX_SEGMENT_SIZE = 1 << 18; // 256kB

/**
* The size limit for small values. The variable length of small values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@

import org.apache.commons.io.HexDump;
import org.apache.jackrabbit.oak.commons.Buffer;
import static org.apache.jackrabbit.oak.segment.Segment.MAX_SEGMENT_SIZE;


class SegmentDataUtils {

private SegmentDataUtils() {
// Prevent instantiation
}

private static final int MAX_SEGMENT_SIZE = 1 << 18;

static void hexDump(Buffer buffer, OutputStream stream) throws IOException {
byte[] data = new byte[buffer.remaining()];
buffer.duplicate().get(data);
Expand Down