AbstractKuduInputPartitioner implements Partitioner<AbstractKuduInputOperator> { public List<KuduScanToken> getKuduScanTokensForSelectAllColumns() throws Exception { ApexKuduConnection apexKuduConnection = prototypeKuduInputOperator.getApexKuduConnectionInfo().build(); KuduClient clientHandle = apexKuduConnection.getKuduClient(); KuduTable table = apexKuduConnection.getKuduTable(); KuduScanToken.KuduScanTokenBuilder builder = clientHandle.newScanTokenBuilder(table); List<String> allColumns = new ArrayList<>(); List<ColumnSchema> columnList = apexKuduConnection.getKuduTable().getSchema().getColumns(); for ( ColumnSchema column : columnList) { allColumns.add(column.getName()); } builder.setProjectedColumnNames(allColumns); LOG.debug("Building the partition pie assignments for the input operator"); List<KuduScanToken> allPossibleTokens = builder.build(); apexKuduConnection.close(); return allPossibleTokens; } AbstractKuduInputPartitioner(AbstractKuduInputOperator prototypeOperator); List<KuduScanToken> getKuduScanTokensForSelectAllColumns(); int getNumberOfPartitions(PartitioningContext context); List<KuduPartitionScanAssignmentMeta> getListOfPartitionAssignments(
      Collection<Partition<AbstractKuduInputOperator>> partitions, PartitioningContext context); Partitioner.Partition<AbstractKuduInputOperator> clonePartitionAndAssignScanMeta(
      List<KuduPartitionScanAssignmentMeta> scanAssignmentsForThisPartition); @Override Collection<Partition<AbstractKuduInputOperator>> definePartitions(
      Collection<Partition<AbstractKuduInputOperator>> partitions, PartitioningContext context); @Override void partitioned(Map<Integer, Partition<AbstractKuduInputOperator>> partitions); abstract Map<Integer, List<KuduPartitionScanAssignmentMeta>> assign(
      List<KuduPartitionScanAssignmentMeta> totalList, PartitioningContext context); AbstractKuduInputOperator getPrototypeKuduInputOperator(); void setPrototypeKuduInputOperator(AbstractKuduInputOperator prototypeKuduInputOperator);  }
@KuduClusterTestContext(kuduClusterBasedTest = true) @Test public void testKuduSelectAllScanTokens() throws Exception { initOperatorState(); AbstractKuduInputPartitioner partitioner = unitTestStepwiseScanInputOperator.getPartitioner(); List<KuduScanToken> allScanTokens = partitioner.getKuduScanTokensForSelectAllColumns(); assertEquals(KuduClientTestCommons.TOTAL_KUDU_TABLETS_FOR_UNITTEST_TABLE,allScanTokens.size()); }