@Test public void testPopulateDisplayData() { CloudBigtableConfiguration config = createBaseBuilder() .withConfiguration("somekey", "somevalue") .withConfiguration("inaccessible", new InaccessibleValueProvider()) .build(); TestDisplayDataBuilder builder = new TestDisplayDataBuilder(); config.populateDisplayData(builder); List<String> expected = new ArrayList<>(); expected.add("null:projectId=my_project"); expected.add("null:instanceId=instance"); expected.add("null:somekey=somevalue"); expected.add("null:google.bigtable.project.id=my_project"); expected.add("null:google.bigtable.instance.id=instance"); expected.add("null:inaccessible=Unavailable during pipeline construction"); expected.add("null:bigtableClientVersion=" + BigtableVersionInfo.CLIENT_VERSION); MatcherAssert.assertThat(builder.itemStrings, containsInAnyOrder(expected.toArray())); }
public void populateDisplayData(DisplayData.Builder builder) { builder.add( DisplayData.item( "projectId", getDisplayValue(configuration.get(BigtableOptionsFactory.PROJECT_ID_KEY))) .withLabel("Project ID")); builder.add( DisplayData.item( "instanceId", getDisplayValue(configuration.get(BigtableOptionsFactory.INSTANCE_ID_KEY))) .withLabel("Instance ID")); builder.add( DisplayData.item("bigtableClientVersion", BigtableVersionInfo.CLIENT_VERSION) .withLabel("Bigtable Client Version")); Map<String, ValueProvider<String>> hashMap = new HashMap<String, ValueProvider<String>>(configuration); hashMap.remove(BigtableOptionsFactory.PROJECT_ID_KEY); hashMap.remove(BigtableOptionsFactory.INSTANCE_ID_KEY); for (Entry<String, ValueProvider<String>> entry : configuration.entrySet()) { builder.add( DisplayData.item(entry.getKey(), getDisplayValue(entry.getValue())) .withLabel(entry.getKey())); } }
CloudBigtableConfiguration implements Serializable { public void populateDisplayData(DisplayData.Builder builder) { builder.add( DisplayData.item( "projectId", getDisplayValue(configuration.get(BigtableOptionsFactory.PROJECT_ID_KEY))) .withLabel("Project ID")); builder.add( DisplayData.item( "instanceId", getDisplayValue(configuration.get(BigtableOptionsFactory.INSTANCE_ID_KEY))) .withLabel("Instance ID")); builder.add( DisplayData.item("bigtableClientVersion", BigtableVersionInfo.CLIENT_VERSION) .withLabel("Bigtable Client Version")); Map<String, ValueProvider<String>> hashMap = new HashMap<String, ValueProvider<String>>(configuration); hashMap.remove(BigtableOptionsFactory.PROJECT_ID_KEY); hashMap.remove(BigtableOptionsFactory.INSTANCE_ID_KEY); for (Entry<String, ValueProvider<String>> entry : configuration.entrySet()) { builder.add( DisplayData.item(entry.getKey(), getDisplayValue(entry.getValue())) .withLabel(entry.getKey())); } } }
CloudBigtableConfiguration implements Serializable { public void populateDisplayData(DisplayData.Builder builder) { builder.add( DisplayData.item( "projectId", getDisplayValue(configuration.get(BigtableOptionsFactory.PROJECT_ID_KEY))) .withLabel("Project ID")); builder.add( DisplayData.item( "instanceId", getDisplayValue(configuration.get(BigtableOptionsFactory.INSTANCE_ID_KEY))) .withLabel("Instance ID")); builder.add( DisplayData.item("bigtableClientVersion", BigtableVersionInfo.CLIENT_VERSION) .withLabel("Bigtable Client Version")); Map<String, ValueProvider<String>> hashMap = new HashMap<String, ValueProvider<String>>(configuration); hashMap.remove(BigtableOptionsFactory.PROJECT_ID_KEY); hashMap.remove(BigtableOptionsFactory.INSTANCE_ID_KEY); for (Entry<String, ValueProvider<String>> entry : configuration.entrySet()) { builder.add( DisplayData.item(entry.getKey(), getDisplayValue(entry.getValue())) .withLabel(entry.getKey())); } } CloudBigtableConfiguration(); protected  CloudBigtableConfiguration(
      ValueProvider<String> projectId,
      ValueProvider<String> instanceId,
      Map<String, ValueProvider<String>> additionalConfiguration); }
CloudBigtableConfiguration implements Serializable { public void populateDisplayData(DisplayData.Builder builder) { builder.add( DisplayData.item( "projectId", getDisplayValue(configuration.get(BigtableOptionsFactory.PROJECT_ID_KEY))) .withLabel("Project ID")); builder.add( DisplayData.item( "instanceId", getDisplayValue(configuration.get(BigtableOptionsFactory.INSTANCE_ID_KEY))) .withLabel("Instance ID")); builder.add( DisplayData.item("bigtableClientVersion", BigtableVersionInfo.CLIENT_VERSION) .withLabel("Bigtable Client Version")); Map<String, ValueProvider<String>> hashMap = new HashMap<String, ValueProvider<String>>(configuration); hashMap.remove(BigtableOptionsFactory.PROJECT_ID_KEY); hashMap.remove(BigtableOptionsFactory.INSTANCE_ID_KEY); for (Entry<String, ValueProvider<String>> entry : configuration.entrySet()) { builder.add( DisplayData.item(entry.getKey(), getDisplayValue(entry.getValue())) .withLabel(entry.getKey())); } } CloudBigtableConfiguration(); protected  CloudBigtableConfiguration(
      ValueProvider<String> projectId,
      ValueProvider<String> instanceId,
      Map<String, ValueProvider<String>> additionalConfiguration); String getProjectId(); String getInstanceId(); String getAppProfileId(); BigtableOptions toBigtableOptions(); Configuration toHBaseConfig(); Builder toBuilder(); @Override boolean equals(Object obj); void copyConfig(Builder builder); void populateDisplayData(DisplayData.Builder builder); void validate(); }
CloudBigtableConfiguration implements Serializable { public void populateDisplayData(DisplayData.Builder builder) { builder.add( DisplayData.item( "projectId", getDisplayValue(configuration.get(BigtableOptionsFactory.PROJECT_ID_KEY))) .withLabel("Project ID")); builder.add( DisplayData.item( "instanceId", getDisplayValue(configuration.get(BigtableOptionsFactory.INSTANCE_ID_KEY))) .withLabel("Instance ID")); builder.add( DisplayData.item("bigtableClientVersion", BigtableVersionInfo.CLIENT_VERSION) .withLabel("Bigtable Client Version")); Map<String, ValueProvider<String>> hashMap = new HashMap<String, ValueProvider<String>>(configuration); hashMap.remove(BigtableOptionsFactory.PROJECT_ID_KEY); hashMap.remove(BigtableOptionsFactory.INSTANCE_ID_KEY); for (Entry<String, ValueProvider<String>> entry : configuration.entrySet()) { builder.add( DisplayData.item(entry.getKey(), getDisplayValue(entry.getValue())) .withLabel(entry.getKey())); } } CloudBigtableConfiguration(); protected  CloudBigtableConfiguration(
      ValueProvider<String> projectId,
      ValueProvider<String> instanceId,
      Map<String, ValueProvider<String>> additionalConfiguration); String getProjectId(); String getInstanceId(); String getAppProfileId(); BigtableOptions toBigtableOptions(); Configuration toHBaseConfig(); Builder toBuilder(); @Override boolean equals(Object obj); void copyConfig(Builder builder); void populateDisplayData(DisplayData.Builder builder); void validate(); static final String VALUE_UNAVAILABLE; }