long endOffset = (Long) src.getSegRange().end.v; final Map<Integer, Long> sourcePartitionOffsetStart = src.getSourcePartitionOffsetStart(); final Map<Integer, Long> sourcePartitionOffsetEnd = src.getSourcePartitionOffsetEnd(); if (endOffset <= 0 || startOffset >= endOffset) { throw new IllegalArgumentException("'startOffset' need be smaller than 'endOffset'");
public static SourcePartition getCopyOf(SourcePartition origin) { SourcePartition copy = new SourcePartition(); copy.setTSRange(origin.getTSRange()); copy.setSegRange(origin.getSegRange()); if (origin.getSourcePartitionOffsetStart() != null) { copy.setSourcePartitionOffsetStart(new HashMap<>(origin.getSourcePartitionOffsetStart())); } if (origin.getSourcePartitionOffsetEnd() != null) { copy.setSourcePartitionOffsetEnd(new HashMap<>(origin.getSourcePartitionOffsetEnd())); } return copy; } }
public CubeSegment appendSegment(CubeInstance cube, SourcePartition src) throws IOException { return appendSegment(cube, src.getTSRange(), src.getSegRange(), src.getSourcePartitionOffsetStart(), src.getSourcePartitionOffsetEnd()); }
totalStartOffset += v; for (Long v : result.getSourcePartitionOffsetEnd().values()) { totalEndOffset += v;
long endOffset = (Long) src.getSegRange().end.v; final Map<Integer, Long> sourcePartitionOffsetStart = src.getSourcePartitionOffsetStart(); final Map<Integer, Long> sourcePartitionOffsetEnd = src.getSourcePartitionOffsetEnd(); if (endOffset <= 0 || startOffset >= endOffset) { throw new IllegalArgumentException("'startOffset' need be smaller than 'endOffset'");
public static SourcePartition getCopyOf(SourcePartition origin) { SourcePartition copy = new SourcePartition(); copy.setTSRange(origin.getTSRange()); copy.setSegRange(origin.getSegRange()); if (origin.getSourcePartitionOffsetStart() != null) { copy.setSourcePartitionOffsetStart(new HashMap<>(origin.getSourcePartitionOffsetStart())); } if (origin.getSourcePartitionOffsetEnd() != null) { copy.setSourcePartitionOffsetEnd(new HashMap<>(origin.getSourcePartitionOffsetEnd())); } return copy; } }
public CubeSegment appendSegment(CubeInstance cube, SourcePartition src) throws IOException { return appendSegment(cube, src.getTSRange(), src.getSegRange(), src.getSourcePartitionOffsetStart(), src.getSourcePartitionOffsetEnd()); }
totalStartOffset += v; for (Long v : result.getSourcePartitionOffsetEnd().values()) { totalEndOffset += v;