@Override public HBaseTableSource projectFields(int[] fields) { String[] famNames = hBaseSchema.getFamilyNames(); HBaseTableSource newTableSource = new HBaseTableSource(this.conf, tableName, getTableSchema().copy()); // Extract the family from the given fields for (int field : fields) { String family = famNames[field]; Map<String, TypeInformation<?>> familyInfo = hBaseSchema.getFamilyInfo(family); for (Map.Entry<String, TypeInformation<?>> entry : familyInfo.entrySet()) { // create the newSchema String qualifier = entry.getKey(); newTableSource.addColumn(family, qualifier, entry.getValue().getTypeClass()); } } return newTableSource; }
@Override public HBaseTableSource projectFields(int[] fields) { String[] famNames = hBaseSchema.getFamilyNames(); HBaseTableSource newTableSource = new HBaseTableSource(this.conf, tableName, getTableSchema().copy()); // Extract the family from the given fields for (int field : fields) { String family = famNames[field]; Map<String, TypeInformation<?>> familyInfo = hBaseSchema.getFamilyInfo(family); for (Map.Entry<String, TypeInformation<?>> entry : familyInfo.entrySet()) { // create the newSchema String qualifier = entry.getKey(); newTableSource.addColumn(family, qualifier, entry.getValue().getTypeClass()); } } return newTableSource; }
@Override public HBaseTableSource projectFields(int[] fields) { String[] famNames = hBaseSchema.getFamilyNames(); HBaseTableSource newTableSource = new HBaseTableSource(this.conf, tableName, getTableSchema().copy()); // Extract the family from the given fields for (int field : fields) { String family = famNames[field]; Map<String, TypeInformation<?>> familyInfo = hBaseSchema.getFamilyInfo(family); for (Map.Entry<String, TypeInformation<?>> entry : familyInfo.entrySet()) { // create the newSchema String qualifier = entry.getKey(); newTableSource.addColumn(family, qualifier, entry.getValue().getTypeClass()); } } return newTableSource; }