public static KeyGenerator getKeyGenerator(int[] dimesion) { int[] incrementedCardinality; boolean isFullyFilled = Boolean.parseBoolean(CarbonCommonConstants.IS_FULLY_FILLED_BITS_DEFAULT_VALUE); if (!isFullyFilled) { incrementedCardinality = CarbonUtil.getIncrementedCardinality(dimesion); } else { incrementedCardinality = CarbonUtil.getIncrementedCardinalityFullyFilled(dimesion); } return new MultiDimKeyVarLengthGenerator(incrementedCardinality); }
/** * @param dimCardinality : dimension cardinality * @param columnSplits : No of column in each block * @return keygenerator */ public static KeyGenerator getKeyGenerator(int[] dimCardinality, int[] columnSplits) { int[] dimsBitLens = CarbonUtil.getDimensionBitLength(dimCardinality, columnSplits); return new MultiDimKeyVarLengthGenerator(dimsBitLens); }