mEntityIDColumns.subList(0, rowKeyFormat.getRangeScanStartIndex()); mEntityIDColumns.subList(rowKeyFormat.getRangeScanStartIndex(), mEntityIDColumns.size());
/** * Get the ordered list of cluster columns originating from the entity ID. This is the set of * 'scannable' entity ID components. * * @param layout The layou of the table. * @return the cluster columns of the table from the entity ID. */ private static List<String> getEntityIdClusterColumns(FijiTableLayout layout) { RowKeyFormat2 keyFormat = (RowKeyFormat2) layout.getDesc().getKeysFormat(); switch (keyFormat.getEncoding()) { case RAW: { return Lists.newArrayList(); } case FORMATTED: { int size = keyFormat.getComponents().size(); int start = keyFormat.getRangeScanStartIndex(); if (start == size) { return Lists.newArrayList(); } else { return transformToColumns( keyFormat .getComponents() .subList(keyFormat.getRangeScanStartIndex(), keyFormat.getComponents().size())); } } default: throw new IllegalArgumentException( String.format("Unknown row key encoding %s.", keyFormat.getEncoding())); } }
/** * Return the ordered list of columns in the partition key for the table layout. * * @param layout to return partition key columns for. * @return the primary key columns for the layout. */ public static List<String> getPartitionKeyColumns(FijiTableLayout layout) { RowKeyFormat2 keyFormat = (RowKeyFormat2) layout.getDesc().getKeysFormat(); switch (keyFormat.getEncoding()) { case RAW: return Lists.newArrayList(RAW_KEY_COL); case FORMATTED: return transformToColumns( keyFormat.getComponents().subList(0, keyFormat.getRangeScanStartIndex())); default: throw new IllegalArgumentException( String.format("Unknown row key encoding %s.", keyFormat.getEncoding())); } }
int hashUpto = format.getRangeScanStartIndex() - 1; ByteArrayOutputStream tohash = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
keyFormat.getRangeScanStartIndex() != keyFormat.getComponents().size();
getNonNullPrefixComponents(mComponents, mRowKeyFormat.getRangeScanStartIndex()); if (prefixComponents.length == mRowKeyFormat.getRangeScanStartIndex()) { ByteArrayOutputStream tohash = new ByteArrayOutputStream(); for (Object component : prefixComponents) {
if (format.getRangeScanStartIndex() <= 0 || format.getRangeScanStartIndex() > format.getComponents().size()) { throw new InvalidLayoutException("Invalid range scan index. Range scans are supported " + "starting with the second component."); && format.getRangeScanStartIndex() != format.getComponents().size()) { throw new InvalidLayoutException("Range scans are not supported if " + "suppress_key_materialization is true. Please set range_scan_start_index "