public static VoltTable getPartitionKeys ( TheHashinator hashinator , VoltType type ) { // get partitionKeys response table so we can copy it final VoltTable partitionKeys ; switch ( type ) { case INTEGER : partitionKeys = hashinator . m_integerPartitionKeys . get ( ) ; break ; case STRING : partitionKeys = hashinator . m_stringPartitionKeys . get ( ) ; break ; case VARBINARY : partitionKeys = hashinator . m_varbinaryPartitionKeys . get ( ) ; break ; default : return null ; } // return a clone because if the table is used at all in the voltdb process, // (like by an NT procedure), // you can corrupt the various offsets and positions in the underlying buffer return partitionKeys . semiDeepCopy ( ) ; }
Get a VoltTable containing the partition keys for each partition that can be found for the given hashinator . May be missing some partitions during elastic rebalance when the partitions don t own enough of the ring to be probed