protected final byte[] getSplitPoint(byte[] splitPoint) { if (splitPoint==null) { return splitPoint; } int offset = SchemaUtil.getVarCharLength(splitPoint, 0, splitPoint.length, getColumnToSplitAt()); // Only split between leading columns indicated. if (offset == splitPoint.length) { return splitPoint; } // Otherwise, an attempt is being made to split in the middle of a table. // Just return a split point at the boundary of the first two columns instead byte[] newSplitPoint = new byte[offset + 1]; System.arraycopy(splitPoint, 0, newSplitPoint, 0, offset+1); return newSplitPoint; }
protected final byte[] getSplitPoint(byte[] splitPoint) { int offset = SchemaUtil.getVarCharLength(splitPoint, 0, splitPoint.length, getColumnToSplitAt()); // Only split between leading columns indicated. if (offset == splitPoint.length) { return splitPoint; } // Otherwise, an attempt is being made to split in the middle of a table. // Just return a split point at the boundary of the first two columns instead byte[] newSplitPoint = new byte[offset + 1]; System.arraycopy(splitPoint, 0, newSplitPoint, 0, offset+1); return newSplitPoint; }
protected final byte[] getSplitPoint(byte[] splitPoint) { if (splitPoint==null) { return splitPoint; } int offset = SchemaUtil.getVarCharLength(splitPoint, 0, splitPoint.length, getColumnToSplitAt()); // Only split between leading columns indicated. if (offset == splitPoint.length) { return splitPoint; } // Otherwise, an attempt is being made to split in the middle of a table. // Just return a split point at the boundary of the first two columns instead byte[] newSplitPoint = new byte[offset + 1]; System.arraycopy(splitPoint, 0, newSplitPoint, 0, offset+1); return newSplitPoint; }