Skip to content

Commit

Permalink
addressed commits
Browse files Browse the repository at this point in the history
  • Loading branch information
asifmansoora committed Mar 7, 2017
1 parent 6559f27 commit 711a4ba
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import java.util.LinkedHashSet;
import javax.validation.constraints.NotNull;


/**
* A Default Key Value Store Dimension holds all of the information needed to construct a Dimension.
*/
Expand Down Expand Up @@ -71,28 +70,28 @@ public DefaultKeyValueStoreDimensionConfig(
* @param description A description of the dimension and its meaning.
* @param longName The Long Name is the external, end-user-facing long name for the dimension.
* @param category The Category is the external, end-user-facing category for the dimension.
* @param defaultDimensionFields The default set of fields for this dimension to be shown in the response.
* @param fields The set of fields for this dimension, this set of field will also be used for the default fields.
* @param keyValueStore The key value store holding dimension row data.
* @param searchProvider The search provider for field value lookups on this dimension.
*/
public DefaultKeyValueStoreDimensionConfig(
DimensionName apiName,
@NotNull DimensionName apiName,
String physicalName,
String description,
String longName,
String category,
LinkedHashSet<DimensionField> defaultDimensionFields,
KeyValueStore keyValueStore,
SearchProvider searchProvider
@NotNull LinkedHashSet<DimensionField> fields,
@NotNull KeyValueStore keyValueStore,
@NotNull SearchProvider searchProvider
) {
this (
apiName,
physicalName,
description,
longName,
category,
defaultDimensionFields,
defaultDimensionFields,
fields,
fields,
keyValueStore,
searchProvider
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,30 +66,30 @@ public DefaultLookupDimensionConfig(
* @param description A description of the dimension and its meaning.
* @param longName The Long Name is the external, end-user-facing long name for the dimension.
* @param category The Category is the external, end-user-facing category for the dimension.
* @param defaultDimensionFields The default set of fields for this dimension to be shown in the response.
* @param fields The set of fields for this dimension, this set of field will also be used for the default fields.
* @param keyValueStore The key value store holding dimension row data.
* @param searchProvider The search provider for field value lookups on this dimension.
* @param namespaces A list of namespaces used to configure the Lookup dimension.
*/
public DefaultLookupDimensionConfig(
DimensionName apiName,
@NotNull DimensionName apiName,
String physicalName,
String description,
String longName,
String category,
LinkedHashSet<DimensionField> defaultDimensionFields,
KeyValueStore keyValueStore,
SearchProvider searchProvider,
List<String> namespaces
@NotNull LinkedHashSet<DimensionField> fields,
@NotNull KeyValueStore keyValueStore,
@NotNull SearchProvider searchProvider,
@NotNull List<String> namespaces
) {
this (
apiName,
physicalName,
description,
longName,
category,
defaultDimensionFields,
defaultDimensionFields,
fields,
fields,
keyValueStore,
searchProvider,
namespaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.util.LinkedHashSet;
import java.util.List;


/**
* A Default Registered Lookup Dimension holds all of the information needed to construct a Registered Lookup Dimension.
*/
Expand Down Expand Up @@ -69,30 +68,30 @@ public DefaultRegisteredLookupDimensionConfig(
* @param description A description of the dimension and its meaning.
* @param longName The Long Name is the external, end-user-facing long name for the dimension.
* @param category The Category is the external, end-user-facing category for the dimension.
* @param defaultDimensionFields The default set of fields for this dimension to be shown in the response.
* @param fields The set of fields for this dimension, this set of field will also be used for the default fields.
* @param keyValueStore The key value store holding dimension row data.
* @param searchProvider The search provider for field value lookups on this dimension.
* @param lookups A list of lookups used to configure the Lookup dimension.
*/
public DefaultRegisteredLookupDimensionConfig(
DimensionName apiName,
@NotNull DimensionName apiName,
String physicalName,
String description,
String longName,
String category,
LinkedHashSet<DimensionField> defaultDimensionFields,
KeyValueStore keyValueStore,
SearchProvider searchProvider,
List<String> lookups
@NotNull LinkedHashSet<DimensionField> fields,
@NotNull KeyValueStore keyValueStore,
@NotNull SearchProvider searchProvider,
@NotNull List<String> lookups
) {
this (
apiName,
physicalName,
description,
longName,
category,
defaultDimensionFields,
defaultDimensionFields,
fields,
fields,
keyValueStore,
searchProvider,
lookups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public enum TestDimensionName implements DimensionName {
NAME,
AGE,
ETHNICITY,
GENDER;
GENDER
;

@Override
public String asName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public Set<DimensionConfig> getAllDimensionConfigurations() {
*
* @return set of dimension configurations
*/
public LinkedHashSet<DimensionConfig> getDimensionConfigurationsByApiName(
public LinkedHashSet<DimensionConfig> getDimensionConfigurationsByConfigInfo(
WikiApiDimensionConfigInfo... dimensionNames
) {
return Arrays.stream(dimensionNames)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package com.yahoo.wiki.webservice.data.config.names;

import com.yahoo.bard.webservice.data.config.names.DimensionName;
import com.yahoo.bard.webservice.data.dimension.Dimension;
import com.yahoo.bard.webservice.util.EnumUtils;

/**
Expand All @@ -20,7 +21,8 @@ public enum WikiApiDimensionConfigInfo implements DimensionName {
CONTINENT("Name of the Continent to which the wiki page belongs ", "wiki continent", "General"),
COUNTRY("Name of the Country to which the wiki page belongs", "wiki country", "General"),
REGION("Name of the Region to which the wiki page belongs", "wiki region", "General"),
CITY("Name of the City to which the wiki page belongs", "wiki city", "General");
CITY("Name of the City to which the wiki page belongs", "wiki city", "General")
;

private final String camelName;
private final String description;
Expand Down Expand Up @@ -60,6 +62,6 @@ public String getLongName() {
}

public String getCategory() {
return this.category;
return Dimension.DEFAULT_CATEGORY;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public WikiTableLoader() {
private void configureSample(WikiDimensions wikiDimensions) {

// Dimensions
Set<DimensionConfig> dimsBasefactDruidTableName = wikiDimensions.getDimensionConfigurationsByApiName(
WikiApiDimensionConfigInfo.values()
Set<DimensionConfig> dimsBasefactDruidTableName = wikiDimensions.getDimensionConfigurationsByConfigInfo(
WikiApiDimensionConfigInfo.values()
);

// Physical Tables
Expand Down

0 comments on commit 711a4ba

Please sign in to comment.