diff --git a/metadata-builders/src/main/java/com/linkedin/metadata/builders/graph/relationship/BaseRelationshipBuilder.java b/metadata-builders/src/main/java/com/linkedin/metadata/builders/graph/relationship/BaseRelationshipBuilder.java index 67f502f75d..d3735f65eb 100644 --- a/metadata-builders/src/main/java/com/linkedin/metadata/builders/graph/relationship/BaseRelationshipBuilder.java +++ b/metadata-builders/src/main/java/com/linkedin/metadata/builders/graph/relationship/BaseRelationshipBuilder.java @@ -16,7 +16,7 @@ public abstract class BaseRelationshipBuilder { } /** - * Returns the aspect class this {@link BaseRelationshipBuilder} supports + * Returns the aspect class this {@link BaseRelationshipBuilder} supports. */ @Nonnull public Class supportedAspectClass() { @@ -24,7 +24,7 @@ public abstract class BaseRelationshipBuilder { } /** - * Returns a list of corresponding relationship updates for the given metadata aspect + * Returns a list of corresponding relationship updates for the given metadata aspect. */ @Nonnull public abstract List buildRelationships(@Nonnull URN urn, diff --git a/metadata-builders/src/main/java/com/linkedin/metadata/builders/search/BaseIndexBuilder.java b/metadata-builders/src/main/java/com/linkedin/metadata/builders/search/BaseIndexBuilder.java index b0b6d5b14d..99aa957b7f 100644 --- a/metadata-builders/src/main/java/com/linkedin/metadata/builders/search/BaseIndexBuilder.java +++ b/metadata-builders/src/main/java/com/linkedin/metadata/builders/search/BaseIndexBuilder.java @@ -9,7 +9,7 @@ import javax.annotation.Nullable; /** - * Base class for populating documents from a metadata snapshot + * Base class for populating documents from a metadata snapshot. * * @param the type of document that will be populated and returned */ @@ -18,7 +18,7 @@ public abstract class BaseIndexBuilder { final List> _snapshotsInterested; /** - * Constructor + * Constructor. * * @param snapshotsInterested List of metadata snapshot classes the document index builder is interested in * @param documentClass class of DOCUMENT that should have a valid schema @@ -31,13 +31,13 @@ public abstract class BaseIndexBuilder { /** * Constructs documents to update from a metadata snapshot * - *

Given a metadata snapshot containing a list of metadata aspects, this function returns list of documents. + *

Given a metadata snapshot containing a list of metadata aspects, this function returns list of documents. * - *

Each document is obtained from parsing a metadata aspect from the metadata snapshot that is relevant to + *

Each document is obtained from parsing a metadata aspect from the metadata snapshot that is relevant to * the document index builder that inherits this class. * - * Each document index builder that inherits from this class, should subscribe to the metadata snapshots it is interested - * in by calling the constructor of this class with the list of metadata snapshot classes + *

Each document index builder that inherits from this class, should subscribe to the metadata snapshots it is + * interested in by calling the constructor of this class with the list of metadata snapshot classes * * @param snapshot Metadata snapshot from which document has to be parsed * @return list of documents obtained from various aspects inside a metadata snapshot diff --git a/metadata-builders/src/main/java/com/linkedin/metadata/builders/search/SnapshotProcessor.java b/metadata-builders/src/main/java/com/linkedin/metadata/builders/search/SnapshotProcessor.java index 0c74a68b0f..f5ab2347cf 100644 --- a/metadata-builders/src/main/java/com/linkedin/metadata/builders/search/SnapshotProcessor.java +++ b/metadata-builders/src/main/java/com/linkedin/metadata/builders/search/SnapshotProcessor.java @@ -15,9 +15,8 @@ import lombok.extern.slf4j.Slf4j; /** - * This class holds method for taking a snapshot to generate relevant documents + * This class holds method for taking a snapshot to generate relevant documents. */ - @Slf4j public final class SnapshotProcessor { @@ -25,7 +24,7 @@ public final class SnapshotProcessor { private final Set _registeredBuilders; /** - * Constructor + * Constructor. * * @param registerdBuilders Set of document index builders who are interested in parsing metadata snapshot */ @@ -53,16 +52,16 @@ public final class SnapshotProcessor { /** * Constructs documents to update from a snapshot. * - *

Given a snapshot which is a union of metadata snapshot types, this function returns list of documents to update + *

Given a snapshot which is a union of metadata snapshot types, this function returns list of documents to update * from parsing non-empty metadata aspects. * - *

A given metadata snapshot type will contain metadata aspects, each such aspect could be used by multiple + *

A given metadata snapshot type will contain metadata aspects, each such aspect could be used by multiple * document index builders to construct a document. * - *

Each document index builder will subscribe to certain snapshot types whose aspects they are interested in, by + *

Each document index builder will subscribe to certain snapshot types whose aspects they are interested in, by * providing the list of snapshot types in function snapshotsInterested() * - *

Each document index builder will parse relevant aspects from a metadata snapshot type it has subscribed to and + *

Each document index builder will parse relevant aspects from a metadata snapshot type it has subscribed to and * return documents to update. * * @param snapshot Snapshot from which the document needs to be parsed diff --git a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalDAO.java b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalDAO.java index 5b2a96dea6..222e3c8e8d 100644 --- a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalDAO.java +++ b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalDAO.java @@ -67,7 +67,7 @@ public class EbeanLocalDAO } /** - * Constructor for EbeanLocalDAO + * Constructor for EbeanLocalDAO. * * @param aspectUnionClass containing union of all supported aspects. Must be a valid aspect union defined in com.linkedin.metadata.aspect * @param producer {@link BaseMetadataEventProducer} for the metadata event producer @@ -80,7 +80,7 @@ public class EbeanLocalDAO } /** - * Constructor for EbeanLocalDAO + * Constructor for EbeanLocalDAO. * * @param producer {@link BaseMetadataEventProducer} for the metadata event producer * @param serverConfig {@link ServerConfig} that defines the configuration of EbeanServer instances @@ -395,7 +395,8 @@ public class EbeanLocalDAO } /** - * Checks if an {@link AspectKey} and a {@link PrimaryKey} for Ebean are equivalent + * Checks if an {@link AspectKey} and a {@link PrimaryKey} for Ebean are equivalent. + * * @param aspectKey Urn needs to do a ignore case match */ private boolean matchKeys(@Nonnull AspectKey aspectKey, @Nonnull PrimaryKey pk) { @@ -625,7 +626,7 @@ public class EbeanLocalDAO /** * Sets the values of parameters in metadata index query based on its position, values obtained from - * {@link IndexCriterionArray} and last urn + * {@link IndexCriterionArray} and last urn. * * @param indexCriterionArray {@link IndexCriterionArray} whose values will be used to set parameters in metadata * index query based on its position @@ -647,7 +648,7 @@ public class EbeanLocalDAO /** * Constructs SQL query that contains positioned parameters (with `?`), based on whether {@link IndexCriterion} of - * a given condition has field `pathParams` + * a given condition has field `pathParams`. * * @param indexCriterionArray {@link IndexCriterionArray} used to construct the SQL query * @return String representation of SQL query @@ -671,8 +672,10 @@ public class EbeanLocalDAO /** * Returns list of urns from strongly consistent secondary index that satisfy the given filter conditions. - * Results are sorted in increasing alphabetical order of urn. - * NOTE: Currently this works for upto 10 filter conditions. + * + *

Results are sorted in increasing alphabetical order of urn. + * + *

NOTE: Currently this works for upto 10 filter conditions. * * @param indexFilter {@link IndexFilter} containing filter conditions to be applied * @param lastUrn last urn of the previous fetched page. This eliminates the need to use offset which diff --git a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanMetadataAspect.java b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanMetadataAspect.java index 1f6358a1fc..8e13c5deb8 100644 --- a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanMetadataAspect.java +++ b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanMetadataAspect.java @@ -17,6 +17,9 @@ import lombok.NonNull; import lombok.Setter; +/** + * Schema definition for the metadata aspect table. + */ @Getter @Setter @Entity @@ -35,6 +38,9 @@ public class EbeanMetadataAspect extends Model { public static final String CREATED_BY_COLUMN = "createdBy"; public static final String CREATED_FOR_COLUMN = "createdFor"; + /** + * Key for an aspect in the table. + */ @Embeddable @Getter @AllArgsConstructor diff --git a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanMetadataId.java b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanMetadataId.java index 4c183ea6ea..cbf8f3957b 100644 --- a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanMetadataId.java +++ b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanMetadataId.java @@ -12,6 +12,9 @@ import lombok.NonNull; import lombok.Setter; +/** + * Unique ID for a piece of metadata stored in MySQL. + */ @Getter @Setter @AllArgsConstructor diff --git a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanMetadataIndex.java b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanMetadataIndex.java index bb71007604..70316e14ea 100644 --- a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanMetadataIndex.java +++ b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanMetadataIndex.java @@ -14,6 +14,9 @@ import lombok.Setter; import lombok.experimental.Accessors; +/** + * Index definition for MySQL metadata. + */ @Getter @Setter // define composite indexes diff --git a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/ImmutableLocalDAO.java b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/ImmutableLocalDAO.java index 0bf6c64ccd..7d8fc47b79 100644 --- a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/ImmutableLocalDAO.java +++ b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/ImmutableLocalDAO.java @@ -38,7 +38,7 @@ public class ImmutableLocalDAO aspectUnionClass, @Nonnull Map urnAspectMap) { @@ -60,7 +60,7 @@ public class ImmutableLocalDAOThe InputStream is expected to contain a JSON map where the keys are a specific type of URN and values are a * specific type of metadata aspect. */ @Nonnull diff --git a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/utils/DatasetUrnPathExtractor.java b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/utils/DatasetUrnPathExtractor.java index 452c4e0bcb..c60844497b 100644 --- a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/utils/DatasetUrnPathExtractor.java +++ b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/utils/DatasetUrnPathExtractor.java @@ -7,6 +7,9 @@ import java.util.Map; import javax.annotation.Nonnull; +/** + * Maps schema paths to values for DatasetUrns. + */ public class DatasetUrnPathExtractor implements UrnPathExtractor { @Override public Map extractPaths(@Nonnull DatasetUrn urn) { diff --git a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/utils/RegisteredUrnPathExtractors.java b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/utils/RegisteredUrnPathExtractors.java index 47293506e0..d4692200d8 100644 --- a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/utils/RegisteredUrnPathExtractors.java +++ b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/utils/RegisteredUrnPathExtractors.java @@ -10,7 +10,7 @@ import javax.annotation.Nonnull; /** * A class that holds all the registered {@link UrnPathExtractor}s. * - * Register new type of urn path extractors by adding them to {@link #REGISTERED_URN_PATH_EXTRACTORS}. + *

Register new type of urn path extractors by adding them to {@link #REGISTERED_URN_PATH_EXTRACTORS}. */ public class RegisteredUrnPathExtractors { diff --git a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/utils/UrnPathExtractor.java b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/utils/UrnPathExtractor.java index d743cdbed7..27f54efdb2 100644 --- a/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/utils/UrnPathExtractor.java +++ b/metadata-dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/utils/UrnPathExtractor.java @@ -5,6 +5,9 @@ import java.util.Map; import javax.annotation.Nonnull; +/** + * Given an urn, extracts a map of schema key to value. + */ public interface UrnPathExtractor { @Nonnull Map extractPaths(@Nonnull URN urn); diff --git a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/browse/ESBrowseDAO.java b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/browse/ESBrowseDAO.java index 057552a140..aea92ad63c 100644 --- a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/browse/ESBrowseDAO.java +++ b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/browse/ESBrowseDAO.java @@ -53,7 +53,7 @@ public class ESBrowseDAO extends BaseBrowseDAO { } /** - * Gets a list of groups/entities that match given browse request + * Gets a list of groups/entities that match given browse request. * * @param path the path to be browsed * @param requestParams the request map with fields and values as filters @@ -81,7 +81,7 @@ public class ESBrowseDAO extends BaseBrowseDAO { } /** - * Builds aggregations for search request + * Builds aggregations for search request. * * @param path the path which is being browsed * @return {@link AggregationBuilder} @@ -99,7 +99,7 @@ public class ESBrowseDAO extends BaseBrowseDAO { } /** - * Constructs group search request + * Constructs group search request. * * @param path the path which is being browsed * @return {@link SearchRequest} @@ -115,7 +115,7 @@ public class ESBrowseDAO extends BaseBrowseDAO { } /** - * Builds query string + * Builds query string. * * @param path the path which is being browsed * @param requestMap entity filters e.g. status=PUBLISHED for features @@ -154,7 +154,7 @@ public class ESBrowseDAO extends BaseBrowseDAO { } /** - * Constructs search request for entity search + * Constructs search request for entity search. * * @param path the path which is being browsed * @param from index of first entity @@ -177,7 +177,7 @@ public class ESBrowseDAO extends BaseBrowseDAO { } /** - * Extracts search responses into browse result + * Extracts search responses into browse result. * * @param groupsResponse groups search response * @param entitiesResponse entity search response @@ -200,7 +200,7 @@ public class ESBrowseDAO extends BaseBrowseDAO { } /** - * Extracts group search response into browse result metadata + * Extracts group search response into browse result metadata. * * @param groupsResponse groups search response * @param path the path which is being browsed @@ -221,7 +221,7 @@ public class ESBrowseDAO extends BaseBrowseDAO { } /** - * Extracts entity search response into list of browse result entities + * Extracts entity search response into list of browse result entities. * * @param entitiesResponse entity search response * @return list of {@link BrowseResultEntity} @@ -247,9 +247,9 @@ public class ESBrowseDAO extends BaseBrowseDAO { } /** - * Extracts the name of group/entity from path + * Extracts the name of group/entity from path. * - * Example: /foo/bar/baz => baz + *

Example: /foo/bar/baz => baz * * @param path path of the group/entity * @return String @@ -275,7 +275,7 @@ public class ESBrowseDAO extends BaseBrowseDAO { } /** - * Gets a list of paths for a given urn + * Gets a list of paths for a given urn. * * @param urn urn of the entity * @return all paths related to a given urn diff --git a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/BaseESAutoCompleteQuery.java b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/BaseESAutoCompleteQuery.java index 41f3fad191..efcdb6b6e4 100644 --- a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/BaseESAutoCompleteQuery.java +++ b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/BaseESAutoCompleteQuery.java @@ -18,20 +18,21 @@ public abstract class BaseESAutoCompleteQuery { } /** - * Constructs the search query for auto complete request + * Constructs the search query for auto complete request. + * + *

TODO: merge this with regular search query construction to take filters as context for suggestions * * @param field the field name for the auto complete * @param input the type ahead query text * @param requestParams the request map as filters * @return a valid search request - * TODO: merge this with regular search query construction to take filters as context for suggestions */ @Nonnull abstract SearchRequest constructAutoCompleteQuery(@Nonnull String input, @Nonnull String field, @Nullable Filter requestParams); /** - * Gets a list of suggestions out of raw search hits + * Gets a list of suggestions out of raw search hits. * * @param searchResponse the raw search response from search engine * @param field the field name for the auto complete diff --git a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/ESAutoCompleteQueryForHighCardinalityFields.java b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/ESAutoCompleteQueryForHighCardinalityFields.java index a081695d69..15c4003a63 100644 --- a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/ESAutoCompleteQueryForHighCardinalityFields.java +++ b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/ESAutoCompleteQueryForHighCardinalityFields.java @@ -44,7 +44,7 @@ public class ESAutoCompleteQueryForHighCardinalityFields extends BaseESAutoCompl } /** - * Constructs auto complete query given request + * Constructs auto complete query given request. * * @param input the type ahead query text * @param field the field name for the auto complete diff --git a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/ESAutoCompleteQueryForLowCardinalityFields.java b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/ESAutoCompleteQueryForLowCardinalityFields.java index 7a506588b4..917b6012fc 100644 --- a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/ESAutoCompleteQueryForLowCardinalityFields.java +++ b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/ESAutoCompleteQueryForLowCardinalityFields.java @@ -44,7 +44,7 @@ public class ESAutoCompleteQueryForLowCardinalityFields extends BaseESAutoComple } /** - * Constructs auto complete query given request + * Constructs auto complete query given request. * * @param input the type ahead query text * @param field the field name for the auto complete diff --git a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/ESSearchDAO.java b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/ESSearchDAO.java index dfe2343470..04347be8a1 100644 --- a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/ESSearchDAO.java +++ b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/search/ESSearchDAO.java @@ -83,7 +83,7 @@ public class ESSearchDAO extends BaseSearchDAO< } /** - * Constructs the base query string given input + * Constructs the base query string given input. * * @param input the search input text * @return built query @@ -131,7 +131,8 @@ public class ESSearchDAO extends BaseSearchDAO< } /** - * Returns a {@link SearchRequest} given filters to be applied to search query and sort criterion to be applied to search results + * Returns a {@link SearchRequest} given filters to be applied to search query and sort criterion to be applied to + * search results. * * @param filters {@link Filter} list of conditions with fields and values * @param sortCriterion {@link SortCriterion} to be applied to the search results @@ -162,14 +163,15 @@ public class ESSearchDAO extends BaseSearchDAO< } /** - * Constructs the search query based on the query request + * Constructs the search query based on the query request. + * + *

TODO: This part will be replaced by searchTemplateAPI when the elastic is upgraded to 6.4 or later * * @param input the search input text * @param filter the search filter * @param from index to start the search from * @param size the number of search hits to return * @return a valid search request - * TODO: This part will be replaced by searchTemplateAPI when the elastic is upgraded to 6.4 or later */ @Nonnull public SearchRequest constructSearchQuery(@Nonnull String input, @Nullable Filter filter, @@ -192,9 +194,9 @@ public class ESSearchDAO extends BaseSearchDAO< } /** - * Constructs the aggregations and sub-aggregations by adding other facets' filters if they are set in request + * Constructs the aggregations and sub-aggregations by adding other facets' filters if they are set in request. * - * Retrieves dynamic aggregation bucket values when the selections change on the fly + *

Retrieves dynamic aggregation bucket values when the selections change on the fly * * @param searchSourceBuilder the builder to build search source for search request * @param filter the search filters @@ -218,7 +220,7 @@ public class ESSearchDAO extends BaseSearchDAO< } /** - * Extracts a list of documents from the raw search response + * Extracts a list of documents from the raw search response. * * @param searchResponse the raw search response from search engine * @param from offset from the first result you want to fetch @@ -244,7 +246,7 @@ public class ESSearchDAO extends BaseSearchDAO< } /** - * Gets list of documents from search hits + * Gets list of documents from search hits. * * @param searchResponse the raw search response from search engine * @return List of documents @@ -256,7 +258,7 @@ public class ESSearchDAO extends BaseSearchDAO< } /** - * Builds data map for documents + * Builds data map for documents. * * @param objectMap an object map represents one raw search hit * @return a data map @@ -305,7 +307,7 @@ public class ESSearchDAO extends BaseSearchDAO< } /** - * Extracts SearchResultMetadata section + * Extracts SearchResultMetadata section. * * @param searchResponse the raw {@link SearchResponse} as obtained from the search engine * @return {@link SearchResultMetadata} with aggregation and list of urns obtained from {@link SearchResponse} @@ -344,7 +346,7 @@ public class ESSearchDAO extends BaseSearchDAO< } /** - * Extracts term aggregations give a parsed term + * Extracts term aggregations give a parsed term. * * @param terms an abstract parse term, input can be either ParsedStringTerms ParsedLongTerms * @return a map with aggregation key and corresponding doc counts @@ -369,7 +371,7 @@ public class ESSearchDAO extends BaseSearchDAO< } /** - * Extracts sub aggregations from one term bucket + * Extracts sub aggregations from one term bucket. * * @param bucket a term bucket * @return a parsed filter if exist @@ -395,5 +397,4 @@ public class ESSearchDAO extends BaseSearchDAO< throw new RuntimeException("Invalid urn in search document " + e); } } - } diff --git a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/utils/ESUtils.java b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/utils/ESUtils.java index ec5a85255e..954b23e366 100644 --- a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/utils/ESUtils.java +++ b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/utils/ESUtils.java @@ -31,9 +31,9 @@ public class ESUtils { } /** - * Constructs the filter query given filter map + * Constructs the filter query given filter map. * - * Multiple values can be selected for a filter, and it is currently modeled as string separated by comma + *

Multiple values can be selected for a filter, and it is currently modeled as string separated by comma * * @param filter the search filter * @return built filter query @@ -72,7 +72,7 @@ public class ESUtils { } /** - * Populates source field of search query with the sort order as per the criterion provided + * Populates source field of search query with the sort order as per the criterion provided. * *

* If no sort criterion is provided then the default sorting criterion is chosen which is descending order of score @@ -98,7 +98,7 @@ public class ESUtils { } /** - * Escapes the Elasticsearch reserved characters in the given input string + * Escapes the Elasticsearch reserved characters in the given input string. * * @param input input string * @return input string in which reserved characters are escaped diff --git a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/utils/SearchUtils.java b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/utils/SearchUtils.java index 40f734b8dc..4f5c013445 100644 --- a/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/utils/SearchUtils.java +++ b/metadata-dao-impl/elasticsearch-dao/src/main/java/com/linkedin/metadata/dao/utils/SearchUtils.java @@ -24,7 +24,7 @@ public class SearchUtils { } /** - * Validates the request params and create a request map out of it + * Validates the request params and create a request map out of it. * * @param requestParams the search request with fields and values * @return a request map @@ -45,7 +45,7 @@ public class SearchUtils { } /** - * Builds search query using criterion + * Builds search query using criterion. * * @param criterion {@link Criterion} single criterion which contains field, value and a comparison operator * @return QueryBuilder diff --git a/metadata-dao-impl/kafka-producer/src/main/java/com/linkedin/metadata/dao/producer/KafkaMetadataEventProducer.java b/metadata-dao-impl/kafka-producer/src/main/java/com/linkedin/metadata/dao/producer/KafkaMetadataEventProducer.java index e5488adb98..e06bf51fa4 100644 --- a/metadata-dao-impl/kafka-producer/src/main/java/com/linkedin/metadata/dao/producer/KafkaMetadataEventProducer.java +++ b/metadata-dao-impl/kafka-producer/src/main/java/com/linkedin/metadata/dao/producer/KafkaMetadataEventProducer.java @@ -40,7 +40,7 @@ public class KafkaMetadataEventProducer _callback; /** - * Constructor + * Constructor. * * @param snapshotClass The snapshot class for the produced events * @param aspectUnionClass The aspect union in the snapshot @@ -54,7 +54,7 @@ public class KafkaMetadataEventProducer list of elements in the query result + * @return list of elements in the query result */ @Nonnull private List runQuery(@Nonnull Statement statement, @Nonnull Function mapperFunction) { diff --git a/metadata-dao-impl/neo4j-dao/src/main/java/com/linkedin/metadata/dao/Neo4jUtil.java b/metadata-dao-impl/neo4j-dao/src/main/java/com/linkedin/metadata/dao/Neo4jUtil.java index 6f8564085c..cff1b46700 100644 --- a/metadata-dao-impl/neo4j-dao/src/main/java/com/linkedin/metadata/dao/Neo4jUtil.java +++ b/metadata-dao-impl/neo4j-dao/src/main/java/com/linkedin/metadata/dao/Neo4jUtil.java @@ -35,7 +35,7 @@ public class Neo4jUtil { } /** - * Converts ENTITY to node (field:value map) + * Converts ENTITY to node (field:value map). * * @param entity ENTITY defined in models * @return unmodifiable field value map @@ -51,7 +51,7 @@ public class Neo4jUtil { } /** - * Converts RELATIONSHIP to edge (field:value map), excluding source and destination + * Converts RELATIONSHIP to edge (field:value map), excluding source and destination. * * @param relationship RELATIONSHIP defined in models * @return unmodifiable field value map @@ -72,7 +72,7 @@ public class Neo4jUtil { } /** - * Converts RELATIONSHIP to cypher matching criteria, excluding source and destination, e.g. {key: "value"} + * Converts RELATIONSHIP to cypher matching criteria, excluding source and destination, e.g. {key: "value"}. * * @param relationship RELATIONSHIP defined in models * @return Criteria String, or "" if no additional fields in relationship @@ -113,7 +113,7 @@ public class Neo4jUtil { } /** - * Converts {@link Filter} to neo4j query criteria, filter criterion condition requires to be EQUAL + * Converts {@link Filter} to neo4j query criteria, filter criterion condition requires to be EQUAL. * * @param filter Query Filter * @return Neo4j criteria string @@ -124,7 +124,7 @@ public class Neo4jUtil { } /** - * Converts {@link CriterionArray} to neo4j query string + * Converts {@link CriterionArray} to neo4j query string. * * @param criterionArray CriterionArray in a Filter * @return Neo4j criteria string @@ -143,7 +143,7 @@ public class Neo4jUtil { } /** - * Converts node (field:value map) to ENTITY + * Converts node (field:value map) to ENTITY. * * @param entityClass Class of Entity * @param node Neo4j Node of entityClass type @@ -156,7 +156,7 @@ public class Neo4jUtil { } /** - * Converts node (field:value map) to ENTITY RecordTemplate + * Converts node (field:value map) to ENTITY RecordTemplate. * * @param node Neo4j Node of entityClass type * @return RecordTemplate @@ -169,10 +169,9 @@ public class Neo4jUtil { } /** - * Converts path segment (field:value map) list of {@link RecordTemplate}s of nodes & edges + * Converts path segment (field:value map) list of {@link RecordTemplate}s of nodes & edges. * * @param segment The segment of a path containing nodes & edges - * @return List */ @Nonnull public static List pathSegmentToRecordList(@Nonnull Path.Segment segment) { @@ -188,7 +187,7 @@ public class Neo4jUtil { } /** - * Converts edge (source-relationship->destination) to RELATIONSHIP + * Converts edge (source-relationship->destination) to RELATIONSHIP. * * @param relationshipClass Class of RELATIONSHIP * @param source Neo4j source Node @@ -206,7 +205,7 @@ public class Neo4jUtil { } /** - * Converts edge (source-relationship->destination) to RELATIONSHIP RecordTemplate + * Converts edge (source-relationship->destination) to RELATIONSHIP RecordTemplate. * * @param source Neo4j source Node * @param destination Neo4j destination Node @@ -251,7 +250,7 @@ public class Neo4jUtil { } /** - * Create {@link RelationshipFilter} using filter and relationship direction + * Create {@link RelationshipFilter} using filter and relationship direction. * * @param filter {@link Filter} filter * @param relationshipDirection {@link RelationshipDirection} relationship direction @@ -264,7 +263,7 @@ public class Neo4jUtil { } /** - * Create {@link RelationshipFilter} using filter conditions and relationship direction + * Create {@link RelationshipFilter} using filter conditions and relationship direction. * * @param field field to create a filter on * @param value field value to be filtered diff --git a/metadata-dao-impl/neo4j-dao/src/main/java/com/linkedin/metadata/dao/internal/Neo4jGraphWriterDAO.java b/metadata-dao-impl/neo4j-dao/src/main/java/com/linkedin/metadata/dao/internal/Neo4jGraphWriterDAO.java index ef0811c9d7..6aa87f0b13 100644 --- a/metadata-dao-impl/neo4j-dao/src/main/java/com/linkedin/metadata/dao/internal/Neo4jGraphWriterDAO.java +++ b/metadata-dao-impl/neo4j-dao/src/main/java/com/linkedin/metadata/dao/internal/Neo4jGraphWriterDAO.java @@ -103,7 +103,7 @@ public class Neo4jGraphWriterDAO extends BaseGraphWriterDAO { } /** - * Run a query statement with parameters and return StatementResult + * Run a query statement with parameters and return StatementResult. * * @param statement a statement with parameters to be executed */ @@ -208,7 +208,7 @@ public class Neo4jGraphWriterDAO extends BaseGraphWriterDAO { } /** - * Gets Node based on Urn, if not exist, creates placeholder node + * Gets Node based on Urn, if not exist, creates placeholder node. */ @Nonnull private Statement getOrInsertNode(@Nonnull Urn urn) { diff --git a/metadata-dao-impl/restli-dao/src/main/java/com/linkedin/metadata/dao/BaseActionRequestBuilder.java b/metadata-dao-impl/restli-dao/src/main/java/com/linkedin/metadata/dao/BaseActionRequestBuilder.java index 0a8ff3fd74..577b80c2f6 100644 --- a/metadata-dao-impl/restli-dao/src/main/java/com/linkedin/metadata/dao/BaseActionRequestBuilder.java +++ b/metadata-dao-impl/restli-dao/src/main/java/com/linkedin/metadata/dao/BaseActionRequestBuilder.java @@ -30,7 +30,7 @@ import static com.linkedin.metadata.restli.RestliConstants.*; /** * A base class for generating rest.li requests against entity-specific action methods. * - * See http://go/gma for more details. + *

See http://go/gma for more details. * * @param must be a valid snapshot type defined in com.linkedin.metadata.snapshot * @param must be the URN type used in {@code SNAPSHOT} diff --git a/metadata-dao-impl/restli-dao/src/main/java/com/linkedin/metadata/dao/internal/RestliRemoteWriterDAO.java b/metadata-dao-impl/restli-dao/src/main/java/com/linkedin/metadata/dao/internal/RestliRemoteWriterDAO.java index 78cc373f18..622b9bf0c1 100644 --- a/metadata-dao-impl/restli-dao/src/main/java/com/linkedin/metadata/dao/internal/RestliRemoteWriterDAO.java +++ b/metadata-dao-impl/restli-dao/src/main/java/com/linkedin/metadata/dao/internal/RestliRemoteWriterDAO.java @@ -14,7 +14,7 @@ import javax.annotation.Nonnull; /** * A rest.li implementation of {@link BaseRemoteWriterDAO}. * - * Uses rest.li snapshot endpoints to update metadata on remote services. + *

Uses rest.li snapshot endpoints to update metadata on remote services. */ public class RestliRemoteWriterDAO extends BaseRemoteWriterDAO { diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseBrowseDAO.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseBrowseDAO.java index 6c8f669d91..cc4f2c71fa 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseBrowseDAO.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseBrowseDAO.java @@ -11,13 +11,12 @@ import javax.annotation.Nullable; /** * A base class for all Browse DAOs. * - * A browse DAO is a standardized interface to browse metadata. - * See http://go/gma for more details. + *

A browse DAO is a standardized interface to browse metadata. See http://go/gma for more details. */ public abstract class BaseBrowseDAO { /** - * Gets a list of groups/entities that match given browse request + * Gets a list of groups/entities that match given browse request. * * @param path the path to be browsed * @param requestParams the request map with fields and values as filters @@ -29,7 +28,7 @@ public abstract class BaseBrowseDAO { public abstract BrowseResult browse(@Nonnull String path, @Nullable Filter requestParams, int from, int size); /** - * Gets a list of paths for a given urn + * Gets a list of paths for a given urn. * * @param urn urn of the entity * @return all paths related to a given urn diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseLocalDAO.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseLocalDAO.java index 9fc1ac31f7..d108d86799 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseLocalDAO.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseLocalDAO.java @@ -43,7 +43,7 @@ import lombok.Value; /** * A base class for all Local DAOs. * - * Local DAO is a standardized interface to store and retrieve aspects from a document store. + *

Local DAO is a standardized interface to store and retrieve aspects from a document store. * * @param must be a valid aspect union type defined in com.linkedin.metadata.aspect * @param must be the entity URN type in {@code ASPECT_UNION} @@ -100,9 +100,10 @@ public abstract class BaseLocalDAO aspectUnionClass, @Nonnull BaseMetadataEventProducer producer) { @@ -112,7 +113,7 @@ public abstract class BaseLocalDAOThe hook will be invoked with the latest value of an aspect after it's updated. There's no guarantee on the + * order of invocation when multiple hooks are added for a single aspect. Adding the same hook again will result in * {@link IllegalArgumentException} thrown. Hooks are invoked in the order they're registered. */ public void addPostUpdateHook(@Nonnull Class aspectClass, @@ -213,7 +214,8 @@ public abstract class BaseLocalDAOThe new aspect will have an automatically assigned version number, which is guaranteed to be positive and + * monotonically increasing. Older versions of aspect will be purged automatically based on the retention setting. A + * MetadataAuditEvent is also emitted if there's an actual update. * * @param urn the URN for the entity the aspect is attached to * @param auditStamp the audit stamp for the operation @@ -351,7 +353,7 @@ public abstract class BaseLocalDAO long saveLatest(@Nonnull URN urn, @Nonnull Class aspectClass, @Nullable ASPECT oldEntry, @Nullable AuditStamp oldAuditStamp, @Nonnull ASPECT newEntry, @Nonnull AuditStamp newAuditStamp); /** - * Saves the new value of an aspect to local secondary index + * Saves the new value of an aspect to local secondary index. * * @param urn the URN for the entity the aspect is attached to * @param newValue {@link RecordTemplate} of the new value of aspect @@ -387,7 +389,7 @@ public abstract class BaseLocalDAO listUrns(@Nonnull IndexFilter indexFilter, @Nullable URN lastUrn, int pageSize); /** - * Similar to {@link #listUrns(IndexFilter, URN, int)}. This is to get all urns with type URN + * Similar to {@link #listUrns(IndexFilter, URN, int)}. This is to get all urns with type URN. */ @Nonnull public ListResult listUrns(@Nonnull Class urnClazz, @Nullable URN lastUrn, int pageSize) { @@ -408,7 +410,7 @@ public abstract class BaseLocalDAO T runInTransactionWithRetry(@Nonnull Supplier block, int maxTransactionRetry); /** - * Gets the latest version of a specific aspect type for an entity + * Gets the latest version of a specific aspect type for an entity. * * @param urn {@link Urn} for the entity * @param aspectClass the type of aspect to get @@ -441,7 +443,7 @@ public abstract class BaseLocalDAO, Optional> backfill( @@ -493,7 +495,7 @@ public abstract class BaseLocalDAO Map> backfill(@Nonnull Class aspectClass, @@ -505,7 +507,8 @@ public abstract class BaseLocalDAO, Optional>> backfill( @@ -519,7 +522,7 @@ public abstract class BaseLocalDAO Map> backfill( @@ -529,7 +532,7 @@ public abstract class BaseLocalDAO, Optional>> backfill( @@ -540,7 +543,8 @@ public abstract class BaseLocalDAOQuery DAO is a standardized interface to query the centralized graph DB. See http://go/gma for more details. */ public abstract class BaseQueryDAO { /** - * Finds a list of entities of a specific type based on the given filter on the entity + * Finds a list of entities of a specific type based on the given filter on the entity. * * @param entityClass the entity class to query * @param filter the filter to apply when querying * @param offset the offset query should start at. Ignored if set to a negative value. * @param count the maximum number of entities to return. Ignored if set to a non-positive value. - * * @param returned entity type. Must be a type defined in com.linkedin.metadata.entity. * @return a list of entities that match the conditions specified in {@code filter} */ @@ -40,7 +38,6 @@ public abstract class BaseQueryDAO { * * @param entityClass the entity class to query * @param queryStatement a {@link Statement} with query text and parameters - * * @param returned entity type. Must be a type defined in com.linkedin.metadata.entity. * @return a list of entities from the outcome of the query statement */ @@ -58,8 +55,9 @@ public abstract class BaseQueryDAO { public abstract List findMixedTypesEntities(@Nonnull Statement queryStatement); /** - * Finds a list of entities through certain relationships given an entity filter - * For more details on design and use cases, refer to interface 1 in go/gma/graph/dao + * Finds a list of entities through certain relationships given an entity filter. + * + *

For more details on design and use cases, refer to interface 1 in go/gma/graph/dao. * * @param sourceEntityClass the source entity class to query * @param sourceEntityFilter the filter to apply to the source entity when querying @@ -87,7 +85,8 @@ public abstract class BaseQueryDAO { } /** - * Finds a list of entities of a specific type via multiple hops traversal based on the given relationship filter and source/destination entity filter. + * Finds a list of entities of a specific type via multiple hops traversal based on the given relationship filter and + * source/destination entity filter. * * @param sourceEntityClass the source entity class to query * @param sourceEntityFilter the filter to apply to the source entity when querying @@ -118,12 +117,16 @@ public abstract class BaseQueryDAO { * * @param sourceEntityClass the source entity class as the starting point for the query * @param sourceEntityFilter the filter to apply to the source entity when querying - * @param traversePaths specify the traverse paths via a list of + * @param traversePaths specify the traverse paths via a list of (relationship type, relationship filter, + * intermediate entities) * @param count the maximum number of entities to return. Ignored if set to a non-positive value. * - * @param source ENTITY type. Starting point of the traverse path. Must be a type defined in com.linkedin.metadata.entity. - * @param intermediate entity type on the traverse path. Must be a type defined in com.linkedin.metadata.entity. - * @param relationship type on the traverse path. Must be a type defined in com.linkedin.metadata.relationship. + * @param source ENTITY type. Starting point of the traverse path. Must be a type defined in + * com.linkedin.metadata.entity. + * @param intermediate entity type on the traverse path. Must be a type defined in + * com.linkedin.metadata.entity. + * @param relationship type on the traverse path. Must be a type defined in + * com.linkedin.metadata.relationship. * @return a list of entities that match the conditions specified in {@code filter} */ @Nonnull @@ -155,7 +158,8 @@ public abstract class BaseQueryDAO { } /** - * Finds a list of relationships of a specific type based on the given relationship filter and destination entity filter. + * Finds a list of relationships of a specific type based on the given relationship filter and destination entity + * filter. * * @param destinationEntityClass the destination entity class * @param destinationEntityFilter the filter to apply to the destination entity when querying @@ -177,7 +181,8 @@ public abstract class BaseQueryDAO { } /** - * Finds a list of relationships of a specific type based on the given relationship filter and source/destination entity filter. + * Finds a list of relationships of a specific type based on the given relationship filter and source/destination + * entity filter. * * @param sourceEntityClass the source entity class to query * @param sourceEntityFilter the filter to apply to the source entity when querying diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseReadDAO.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseReadDAO.java index f89913d7c9..3019e6646e 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseReadDAO.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseReadDAO.java @@ -72,7 +72,7 @@ public abstract class BaseReadDAOThe returned {@link Map} contains all the . */ @Nonnull public Map, Optional>> get( diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseRemoteDAO.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseRemoteDAO.java index 299ef66b4a..60dc8fc1d0 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseRemoteDAO.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseRemoteDAO.java @@ -8,8 +8,8 @@ import javax.annotation.Nonnull; /** * A base class for all Remote DAO. * - * Remote DAO is a standardized interface to fetch aspects stored on a remote service. - * See http://go/gma for more details. + *

Remote DAO is a standardized interface to fetch aspects stored on a remote service. See http://go/gma for more + * details. * * @param must be an aspect union type defined in com.linkedin.metadata.aspect */ diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseSearchDAO.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseSearchDAO.java index 2e78dd0730..91bb702bd9 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseSearchDAO.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseSearchDAO.java @@ -14,8 +14,7 @@ import javax.annotation.Nullable; /** * A base class for all Search DAOs. * - * A search DAO is a standardized interface to search metadata. - * See http://go/gma for more details. + *

A search DAO is a standardized interface to search metadata. See http://go/gma for more details. * * @param must be a search document type defined in com.linkedin.metadata.search */ @@ -56,9 +55,9 @@ public abstract class BaseSearchDAO { public abstract SearchResult filter(@Nullable Filter filters, @Nullable SortCriterion sortCriterion, int from, int size); /** - * Returns a list of suggestions given type ahead query + * Returns a list of suggestions given type ahead query. * - * The advanced auto complete can take filters and provides suggestions based on filtered context + *

The advanced auto complete can take filters and provides suggestions based on filtered context. * * @param query the type ahead query text * @param field the field name for the auto complete diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseSearchWriterDAO.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseSearchWriterDAO.java index 0c5b28cb9f..3d6bcb05d2 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseSearchWriterDAO.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/BaseSearchWriterDAO.java @@ -8,7 +8,7 @@ import javax.annotation.Nonnull; /** * A base class for all Search Writer DAOs. * - * Search Writer DAO is a standardized interface to update a search index. + *

Search Writer DAO is a standardized interface to update a search index. */ public abstract class BaseSearchWriterDAO { diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/internal/BaseGraphWriterDAO.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/internal/BaseGraphWriterDAO.java index 595c906461..b2e685f868 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/internal/BaseGraphWriterDAO.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/internal/BaseGraphWriterDAO.java @@ -10,7 +10,7 @@ import javax.annotation.Nonnull; /** * A base class for all Graph Writer DAOs. * - * Graph Writer DAO is a standardized interface to update a centralized graph DB. + *

Graph Writer DAO is a standardized interface to update a centralized graph DB. */ public abstract class BaseGraphWriterDAO { @@ -74,7 +74,7 @@ public abstract class BaseGraphWriterDAO { } /** - * Adds a relationship in the graph, with removal operations before adding + * Adds a relationship in the graph, with removal operations before adding. * * @param relationship the relationship to be persisted * @param removalOption whether to remove existing relationship of the same type @@ -99,7 +99,7 @@ public abstract class BaseGraphWriterDAO { } /** - * Adds a batch of relationships in the graph, with removal operations before adding + * Adds a batch of relationships in the graph, with removal operations before adding. * * @param relationships the list of relationships to be persisted * @param removalOption whether to remove existing relationship of the same type diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/internal/BaseRemoteWriterDAO.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/internal/BaseRemoteWriterDAO.java index 416c8a73dd..f80aa1060a 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/internal/BaseRemoteWriterDAO.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/internal/BaseRemoteWriterDAO.java @@ -8,13 +8,13 @@ import javax.annotation.Nonnull; /** * A base class for all remote writer DAOs. * - * Remote writer DAO allows updating metadata aspects hosted on a remote service without knowing the exact + *

Remote writer DAO allows updating metadata aspects hosted on a remote service without knowing the exact * URN-to-service mapping. */ public abstract class BaseRemoteWriterDAO { /** - * Creates a new metadata snapshot against a remote service + * Creates a new metadata snapshot against a remote service. * * @param urn the {@link Urn} for the entity * @param snapshot the snapshot containing updated metadata aspects diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/producer/BaseMetadataEventProducer.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/producer/BaseMetadataEventProducer.java index 200af0cb40..16242ef01b 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/producer/BaseMetadataEventProducer.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/producer/BaseMetadataEventProducer.java @@ -11,7 +11,7 @@ import javax.annotation.Nullable; /** * A base class for all metadata event producers. * - * See http://go/gma for more details. + *

See http://go/gma for more details. */ public abstract class BaseMetadataEventProducer { diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/retention/TimeBasedRetention.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/retention/TimeBasedRetention.java index f511fbc560..4d51eff8d8 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/retention/TimeBasedRetention.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/retention/TimeBasedRetention.java @@ -10,7 +10,7 @@ import lombok.Value; public class TimeBasedRetention implements Retention { /** - * Constructs a {@link TimeBasedRetention} object + * Constructs a {@link TimeBasedRetention} object. * * @param maxAgeToRetain maximal age (in milliseconds) to retain. Must be positive. */ diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/retention/VersionBasedRetention.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/retention/VersionBasedRetention.java index ff7753a35e..71e092ef70 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/retention/VersionBasedRetention.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/retention/VersionBasedRetention.java @@ -9,7 +9,7 @@ import lombok.Value; public class VersionBasedRetention implements Retention { /** - * Constructs a {@link VersionBasedRetention} object + * Constructs a {@link VersionBasedRetention} object. * * @param maxVersionsToRetain maximal number of versions to retain. Must be greater than 0. */ diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/storage/LocalDAOStorageConfig.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/storage/LocalDAOStorageConfig.java index 23a71fda1f..bb89121118 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/storage/LocalDAOStorageConfig.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/storage/LocalDAOStorageConfig.java @@ -7,39 +7,39 @@ import lombok.Value; /** - * Immutable class that holds the storage config for different paths of different metadata aspects + * Immutable class that holds the storage config for different paths of different metadata aspects. */ @Value @Builder public final class LocalDAOStorageConfig { /** - * Map of corresponding {@link Class} of metadata aspect to {@link AspectStorageConfig} config + * Map of corresponding {@link Class} of metadata aspect to {@link AspectStorageConfig} config. */ Map, AspectStorageConfig> aspectStorageConfigMap; /** - * Immutable class that holds the storage config of different pegasus paths of a given metadata aspect + * Immutable class that holds the storage config of different pegasus paths of a given metadata aspect. */ @Value @Builder public final static class AspectStorageConfig { /** - * Map of string representation of Pegasus Path to {@link PathStorageConfig} config + * Map of string representation of Pegasus Path to {@link PathStorageConfig} config. */ Map pathStorageConfigMap; } /** - * Immutable class that holds the storage config of a given pegasus path of a given metadata aspect + * Immutable class that holds the storage config of a given pegasus path of a given metadata aspect. */ @Value @Builder public final static class PathStorageConfig { /** - * Whether to index the pegasus path to local secondary index + * Whether to index the pegasus path to local secondary index. */ @Builder.Default boolean strongConsistentSecondaryIndex = false; diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/utils/ModelUtils.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/utils/ModelUtils.java index 9e651fd868..6b21f211e6 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/utils/ModelUtils.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/utils/ModelUtils.java @@ -103,7 +103,7 @@ public class ModelUtils { } /** - * Gets a snapshot class given its FQCN + * Gets a snapshot class given its FQCN. * * @param className FQCN of snapshot class * @return snapshot class that extends {@link RecordTemplate}, associated with className @@ -116,7 +116,7 @@ public class ModelUtils { } /** - * Extracts the "urn" field from a snapshot + * Extracts the "urn" field from a snapshot. * * @param snapshot the snapshot to extract urn from * @param must be a valid snapshot model defined in com.linkedin.metadata.snapshot @@ -129,7 +129,7 @@ public class ModelUtils { } /** - * Similar to {@link #getUrnFromSnapshot(RecordTemplate)} but extracts from a Snapshot union instead + * Similar to {@link #getUrnFromSnapshot(RecordTemplate)} but extracts from a Snapshot union instead. */ @Nonnull public static Urn getUrnFromSnapshotUnion(@Nonnull UnionTemplate snapshotUnion) { @@ -137,7 +137,7 @@ public class ModelUtils { } /** - * Extracts the "urn" field from a delta + * Extracts the "urn" field from a delta. * * @param delta the delta to extract urn from * @param must be a valid delta model defined in com.linkedin.metadata.delta @@ -150,7 +150,7 @@ public class ModelUtils { } /** - * Similar to {@link #getUrnFromDelta(RecordTemplate)} but extracts from a delta union instead + * Similar to {@link #getUrnFromDelta(RecordTemplate)} but extracts from a delta union instead. */ @Nonnull public static Urn getUrnFromDeltaUnion(@Nonnull UnionTemplate deltaUnion) { @@ -158,7 +158,7 @@ public class ModelUtils { } /** - * Extracts the "urn" field from a search document + * Extracts the "urn" field from a search document. * * @param document the document to extract urn from * @param must be a valid document model defined in com.linkedin.metadata.search @@ -171,7 +171,7 @@ public class ModelUtils { } /** - * Extracts the "urn" field from an entity + * Extracts the "urn" field from an entity. * * @param entity the entity to extract urn from * @param must be a valid entity model defined in com.linkedin.metadata.entity @@ -184,7 +184,7 @@ public class ModelUtils { } /** - * Extracts the fields with type urn from a relationship + * Extracts the fields with type urn from a relationship. * * @param relationship the relationship to extract urn from * @param must be a valid relationship model defined in com.linkedin.metadata.relationship @@ -200,7 +200,7 @@ public class ModelUtils { } /** - * Similar to {@link #getUrnFromRelationship} but extracts from a delta union instead + * Similar to {@link #getUrnFromRelationship} but extracts from a delta union instead. */ @Nonnull public static Urn getSourceUrnFromRelationship( @@ -209,7 +209,7 @@ public class ModelUtils { } /** - * Similar to {@link #getUrnFromRelationship} but extracts from a delta union instead + * Similar to {@link #getUrnFromRelationship} but extracts from a delta union instead. */ @Nonnull public static Urn getDestinationUrnFromRelationship( @@ -251,7 +251,7 @@ public class ModelUtils { } /** - * Similar to {@link #getAspectsFromSnapshot(RecordTemplate)} but extracts from a snapshot union instead + * Similar to {@link #getAspectsFromSnapshot(RecordTemplate)} but extracts from a snapshot union instead. */ @Nonnull public static List getAspectsFromSnapshotUnion(@Nonnull UnionTemplate snapshotUnion) { @@ -270,7 +270,7 @@ public class ModelUtils { } /** - * Creates a snapshot with its urn field set + * Creates a snapshot with its urn field set. * * @param snapshotClass the type of snapshot to create * @param urn value for the urn field @@ -492,7 +492,7 @@ public class ModelUtils { } /** - * Returns all entity classes + * Returns all entity classes. */ @Nonnull public static Set> getAllEntities() { @@ -503,7 +503,7 @@ public class ModelUtils { } /** - * Get entity type from urn class + * Get entity type from urn class. */ @Nonnull public static String getEntityTypeFromUrnClass(@Nonnull Class urnClass) { @@ -526,7 +526,7 @@ public class ModelUtils { } /** - * Return true if the aspect is defined in common namespace + * Return true if the aspect is defined in common namespace. */ public static boolean isCommonAspect(@Nonnull Class clazz) { return clazz.getPackage().getName().startsWith("com.linkedin.common"); diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/utils/QueryUtils.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/utils/QueryUtils.java index efd9e5843a..c857936d06 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/utils/QueryUtils.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/utils/QueryUtils.java @@ -68,7 +68,7 @@ public class QueryUtils { } /** - * Calculates the total page count + * Calculates the total page count. * * @param totalCount total count * @param size page size @@ -82,7 +82,7 @@ public class QueryUtils { } /** - * Calculates whether there is more results + * Calculates whether there is more results. * * @param from offset from the first result you want to fetch * @param size page size diff --git a/metadata-dao/src/main/java/com/linkedin/metadata/dao/utils/RecordUtils.java b/metadata-dao/src/main/java/com/linkedin/metadata/dao/utils/RecordUtils.java index 3c000e4a3e..6b4fdfef3a 100644 --- a/metadata-dao/src/main/java/com/linkedin/metadata/dao/utils/RecordUtils.java +++ b/metadata-dao/src/main/java/com/linkedin/metadata/dao/utils/RecordUtils.java @@ -75,7 +75,7 @@ public class RecordUtils { } /** - * Creates a {@link RecordTemplate} object from a serialized JSON string + * Creates a {@link RecordTemplate} object from a serialized JSON string. * * @param type the type of {@link RecordTemplate} to create * @param jsonString a JSON string serialized using {@link JacksonDataTemplateCodec} @@ -95,7 +95,7 @@ public class RecordUtils { } /** - * Creates a {@link RecordTemplate} object from a {@link DataMap} + * Creates a {@link RecordTemplate} object from a {@link DataMap}. * * @param type the type of {@link RecordTemplate} to create * @param dataMap a {@link DataMap} of the record @@ -119,7 +119,7 @@ public class RecordUtils { } /** - * Creates a {@link RecordTemplate} object from class FQCN and a {@link DataMap} + * Creates a {@link RecordTemplate} object from class FQCN and a {@link DataMap}. * * @param className FQCN of the record class extending RecordTemplate * @param dataMap a {@link DataMap} of the record @@ -401,7 +401,8 @@ public class RecordUtils { } /** - * Similar to {@link #getFieldValue(RecordTemplate, PathSpec)} but takes string representation of Pegasus PathSpec as input + * Similar to {@link #getFieldValue(RecordTemplate, PathSpec)} but takes string representation of Pegasus PathSpec as + * input. */ @Nonnull public static Optional getFieldValue(@Nonnull RecordTemplate recordTemplate, @Nonnull String pathSpecAsString) { diff --git a/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/EventSchemaComposer.java b/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/EventSchemaComposer.java index 1c181a61bf..75ee8600dc 100644 --- a/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/EventSchemaComposer.java +++ b/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/EventSchemaComposer.java @@ -13,7 +13,7 @@ import static com.linkedin.metadata.generator.SchemaGeneratorConstants.*; import static com.linkedin.metadata.generator.SchemaGeneratorUtil.*; -/*** +/** * Render the property annotations to the MXE pdl schema. */ @Slf4j diff --git a/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/EventSpec.java b/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/EventSpec.java index 9ba1e0f7ac..f92d3c3a5e 100644 --- a/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/EventSpec.java +++ b/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/EventSpec.java @@ -6,8 +6,8 @@ import javax.annotation.Nonnull; import lombok.Data; -/*** - * Getter & setter class for schema event metadata. +/** + * Getter & setter class for schema event metadata. */ @Data public class EventSpec { diff --git a/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/SchemaAnnotationRetriever.java b/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/SchemaAnnotationRetriever.java index c06134542c..79784c6d41 100644 --- a/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/SchemaAnnotationRetriever.java +++ b/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/SchemaAnnotationRetriever.java @@ -14,7 +14,7 @@ import lombok.extern.slf4j.Slf4j; import static com.linkedin.metadata.generator.SchemaGeneratorConstants.*; -/*** +/** * Parse the property annotations from the pdl schema. */ @Slf4j diff --git a/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/SchemaGenerator.java b/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/SchemaGenerator.java index ddb26b721f..b8f4fee22a 100644 --- a/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/SchemaGenerator.java +++ b/metadata-models-generator/src/main/java/com/linkedin/metadata/generator/SchemaGenerator.java @@ -7,6 +7,9 @@ import javax.annotation.Nonnull; import org.rythmengine.Rythm; +/** + * Generates MXE schemas. + */ public class SchemaGenerator { private final DataSchemaParser _dataSchemaParser; diff --git a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseBrowsableClient.java b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseBrowsableClient.java index ed11b95163..0f44566de3 100644 --- a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseBrowsableClient.java +++ b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseBrowsableClient.java @@ -11,7 +11,8 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; /** - * Base client that all entities supporting browse as well as search should implement in their respective restli MPs + * Base client that all entities supporting browse as well as search should implement in their respective restli MPs. + * * @param the client's value type * @param urn type of the entity */ @@ -37,7 +38,7 @@ public abstract class BaseBrowsableClientSee http://go/gma for more details * * @param the resource's key type * @param the resource's value type diff --git a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseClient.java b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseClient.java index 0ec2617e28..a7e00a5f34 100644 --- a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseClient.java +++ b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseClient.java @@ -51,7 +51,7 @@ public abstract class BaseClient implements AutoCloseable { } /** - * Similar to {@link #get(GetRequest)} but takes a @{link GetRequestBuilderBase} instead + * Similar to {@link #get(GetRequest)} but takes a @{link GetRequestBuilderBase} instead. */ protected > ASPECT get(@Nonnull GetRequestBuilderBase requestBuilder) throws RemoteInvocationException { @@ -82,8 +82,8 @@ public abstract class BaseClient implements AutoCloseable { } /** - * Similar to {@link #batchGet(BatchGetEntityRequest, Function)} but - * takes a @{link BatchGetEntityRequestBuilder} instead + * Similar to {@link #batchGet(BatchGetEntityRequest, Function)} but takes a {@link BatchGetEntityRequestBuilder} + * instead. */ protected Map batchGet( @Nonnull BatchGetEntityRequestBuilder, ASPECT> requestBuilder, @@ -102,7 +102,7 @@ public abstract class BaseClient implements AutoCloseable { } /** - * Similar to {@link #batchGet(BatchGetEntityRequest)} but takes a @{link BatchGetEntityRequestBuilder} instead + * Similar to {@link #batchGet(BatchGetEntityRequest)} but takes a @{link BatchGetEntityRequestBuilder} instead. */ protected Map batchGet( @Nonnull BatchGetEntityRequestBuilder, ASPECT> requestBuilder @@ -125,7 +125,7 @@ public abstract class BaseClient implements AutoCloseable { } /** - * Similar to {@link #getAll(GetAllRequest)} but takes a @{link GetAllRequestBuilderBase} instead + * Similar to {@link #getAll(GetAllRequest)} but takes a @{link GetAllRequestBuilderBase} instead. */ protected > CollectionResponse getAll(@Nonnull GetAllRequestBuilderBase requestBuilder) @@ -148,7 +148,7 @@ public abstract class BaseClient implements AutoCloseable { } /** - * Similar to {@link #doAction(ActionRequest)} but takes a @{link ActionRequestBuilderBase} instead + * Similar to {@link #doAction(ActionRequest)} but takes a @{link ActionRequestBuilderBase} instead. */ protected > ASPECT doAction(@Nonnull ActionRequestBuilderBase requestBuilder) throws RemoteInvocationException { diff --git a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseEntityResource.java b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseEntityResource.java index 0e156693c5..4bae078713 100644 --- a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseEntityResource.java +++ b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseEntityResource.java @@ -42,7 +42,7 @@ import static com.linkedin.metadata.restli.RestliConstants.*; /** * A base class for the entity rest.li resource, that supports CRUD methods. * - * See http://go/gma for more details + *

See http://go/gma for more details * * @param the resource's key type * @param the resource's value type @@ -335,7 +335,7 @@ public abstract class BaseEntityResource< } /** - * Returns a map of {@link VALUE} models given the collection of {@link URN}s and set of aspect classes + * Returns a map of {@link VALUE} models given the collection of {@link URN}s and set of aspect classes. * * @param urns collection of urns * @param aspectClasses set of aspect classes diff --git a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseEntitySimpleKeyResource.java b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseEntitySimpleKeyResource.java index 949c90f55e..281d78cd27 100644 --- a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseEntitySimpleKeyResource.java +++ b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseEntitySimpleKeyResource.java @@ -34,7 +34,7 @@ import static com.linkedin.metadata.restli.RestliConstants.*; /** * A base class for the entity rest.li resource where the key is of a primitive (simple) type. * - * See http://go/gma for more details + *

See http://go/gma for more details * * @param the resource's simple key type * @param the resource's value type @@ -229,7 +229,7 @@ public abstract class BaseEntitySimpleKeyResource< } /** - * Returns a map of {@link VALUE} models given the collection of {@link URN}s and set of aspect classes + * Returns a map of {@link VALUE} models given the collection of {@link URN}s and set of aspect classes. * * @param urns collection of urns * @param aspectClasses set of aspect classes diff --git a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSearchableClient.java b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSearchableClient.java index 36b3e68efd..13e4a3d7ce 100644 --- a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSearchableClient.java +++ b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSearchableClient.java @@ -11,8 +11,10 @@ import java.util.Map; import javax.annotation.Nonnull; import javax.annotation.Nullable; + /** - * Base client that all entities supporting search should implement in their respective restli MPs + * Base client that all entities supporting search should implement in their respective restli MPs. + * * @param the client's value type */ public abstract class BaseSearchableClient extends BaseClient { @@ -22,7 +24,8 @@ public abstract class BaseSearchableClient extends } /** - * Search method that the client inheriting this class must implement. Returns {@link CollectionResponse} containing list of aspects + * Search method that the client inheriting this class must implement. Returns {@link CollectionResponse} containing + * list of aspects. * * @param input Input query * @param aspectNames List of aspects to be returned in the VALUE model @@ -34,11 +37,13 @@ public abstract class BaseSearchableClient extends * @throws RemoteInvocationException when the rest.li request fails */ @Nonnull - public abstract CollectionResponse search(@Nonnull String input, @Nullable StringArray aspectNames, @Nullable Map requestFilters, - @Nullable SortCriterion sortCriterion, int start, int count) throws RemoteInvocationException; + public abstract CollectionResponse search(@Nonnull String input, @Nullable StringArray aspectNames, + @Nullable Map requestFilters, @Nullable SortCriterion sortCriterion, int start, int count) + throws RemoteInvocationException; /** - * Similar to {@link #search(String, StringArray, Map, SortCriterion, int, int)} with null for aspect names, meaning all aspects will be returned + * Similar to {@link #search(String, StringArray, Map, SortCriterion, int, int)} with null for aspect names, meaning + * all aspects will be returned. */ @Nonnull public CollectionResponse search(@Nonnull String input, @Nullable Map requestFilters, @@ -47,7 +52,7 @@ public abstract class BaseSearchableClient extends } /** - * Autocomplete method that the client will override only if they need this capability. It returns {@link AutoCompleteResult} containing list of suggestions. + * Autocomplete method that the client will override only if they need this capability. * * @param query Input query * @param field Field against which the query needs autocompletion @@ -61,5 +66,4 @@ public abstract class BaseSearchableClient extends @Nullable Map requestFilters, int limit) throws RemoteInvocationException { throw new UnsupportedOperationException("Not implemented yet."); } - } \ No newline at end of file diff --git a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSearchableEntityResource.java b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSearchableEntityResource.java index 22f2d0f6c1..689aa01b45 100644 --- a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSearchableEntityResource.java +++ b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSearchableEntityResource.java @@ -33,9 +33,9 @@ import static com.linkedin.metadata.restli.RestliConstants.*; /** - * A base class for the entity rest.li resource that supports CRUD + search methods + * A base class for the entity rest.li resource that supports CRUD + search methods. * - * See http://go/gma for more details + *

See http://go/gma for more details * * @param the resource's key type * @param the resource's value type diff --git a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSingleAspectEntitySimpleKeyResource.java b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSingleAspectEntitySimpleKeyResource.java index 5ba2546f17..0fd2dc0d76 100644 --- a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSingleAspectEntitySimpleKeyResource.java +++ b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSingleAspectEntitySimpleKeyResource.java @@ -145,10 +145,11 @@ public abstract class BaseSingleAspectEntitySimpleKeyResource< /** * Gets all {@link VALUE} objects from DB for an entity with single aspect - * Warning: this works only if the aspect is not shared with other entities. * - * It paginates over the latest version of a specific aspect for all Urns - * By default the list is sorted in ascending order of urn + *

Warning: this works only if the aspect is not shared with other entities. + * + *

It paginates over the latest version of a specific aspect for all Urns. By default the list is sorted in + * ascending order of urn * * @param pagingContext Paging context. * @return collection of latest resource(s). diff --git a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSingleAspectEntitySimpleKeyVersionedSubResource.java b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSingleAspectEntitySimpleKeyVersionedSubResource.java index 0cf8389602..e14efc97cb 100644 --- a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSingleAspectEntitySimpleKeyVersionedSubResource.java +++ b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSingleAspectEntitySimpleKeyVersionedSubResource.java @@ -25,8 +25,8 @@ import javax.annotation.Nonnull; * A base resource class for serving a versioned single-aspect entity values as sub resource. This resource class is * meant to be used as a child resource for classes extending from {@link BaseSingleAspectEntitySimpleKeyResource}. * - * The key for the sub-resource is typically a version field which is a Long value. The versioned resources - * are retrieved using {@link #get(Long)} and {@link #getAllWithMetadata(PagingContext)}. + *

The key for the sub-resource is typically a version field which is a Long value. The versioned resources are + * retrieved using {@link #get(Long)} and {@link #getAllWithMetadata(PagingContext)}. * * @param the resource's value type * @param must be a valid {@link Urn} type @@ -40,7 +40,7 @@ public abstract class BaseSingleAspectEntitySimpleKeyVersionedSubResource< ASPECT extends RecordTemplate, ASPECT_UNION extends UnionTemplate> extends CollectionResourceTaskTemplate { - // @formatter:on + // @formatter:on private final Class _aspectClass; private final Class _valueClass; diff --git a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSingleAspectSearchableEntitySimpleKeyResource.java b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSingleAspectSearchableEntitySimpleKeyResource.java index 4cba4cdedf..65e36889a8 100644 --- a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSingleAspectSearchableEntitySimpleKeyResource.java +++ b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseSingleAspectSearchableEntitySimpleKeyResource.java @@ -18,7 +18,7 @@ import static com.linkedin.metadata.dao.BaseReadDAO.*; /** * A base class for the single aspect entity rest.li resource that supports CRUD + search methods. * - * See http://go/gma for more details + *

See http://go/gma for more details. * * @param the resource's key type * @param the resource's value type diff --git a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseVersionedAspectResource.java b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseVersionedAspectResource.java index 7b52cd985c..371788843e 100644 --- a/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseVersionedAspectResource.java +++ b/metadata-restli-resource/src/main/java/com/linkedin/metadata/restli/BaseVersionedAspectResource.java @@ -31,7 +31,7 @@ import static com.linkedin.metadata.dao.BaseReadDAO.*; /** * A base class for an aspect rest.li subresource with versioning support. * - * See http://go/gma for more details + *

See http://go/gma for more details * * @param must be a valid {@link Urn} type * @param must be a valid union of aspect models defined in com.linkedin.metadata.aspect @@ -112,7 +112,7 @@ public abstract class BaseVersionedAspectResource create(@Nonnull Class aspectClass, @@ -126,7 +126,8 @@ public abstract class BaseVersionedAspectResource the client's value type + * Interface that all entities that support search and autocomplete should implement in their respective restli MPs. * + * @param the client's value type. * @deprecated Use {@link BaseSearchableClient} instead */ public interface SearchableClient { diff --git a/metadata-testing/metadata-test-models/src/main/java/com/linkedin/testing/TestUtils.java b/metadata-testing/metadata-test-models/src/main/java/com/linkedin/testing/TestUtils.java index 797e7695ad..42615d5a6c 100644 --- a/metadata-testing/metadata-test-models/src/main/java/com/linkedin/testing/TestUtils.java +++ b/metadata-testing/metadata-test-models/src/main/java/com/linkedin/testing/TestUtils.java @@ -81,7 +81,7 @@ public class TestUtils { } /** - * Returns all test entity classes + * Returns all test entity classes. */ @Nonnull public static Set> getAllTestEntities() { @@ -95,7 +95,7 @@ public class TestUtils { } /** - * Returns all test relationship classes + * Returns all test relationship classes. */ @Nonnull public static Set> getAllTestRelationships() { diff --git a/metadata-validators/src/main/java/com/linkedin/metadata/validator/AspectValidator.java b/metadata-validators/src/main/java/com/linkedin/metadata/validator/AspectValidator.java index 6777d69e9c..5d4c5ff21d 100644 --- a/metadata-validators/src/main/java/com/linkedin/metadata/validator/AspectValidator.java +++ b/metadata-validators/src/main/java/com/linkedin/metadata/validator/AspectValidator.java @@ -9,7 +9,10 @@ import java.util.concurrent.ConcurrentHashMap; import javax.annotation.Nonnull; -public class AspectValidator { +/** + * Utility class to validate aspects are part of the union schemas. + */ +public final class AspectValidator { // A cache of validated classes private static final Set> VALIDATED = ConcurrentHashMap.newKeySet(); diff --git a/metadata-validators/src/main/java/com/linkedin/metadata/validator/DeltaValidator.java b/metadata-validators/src/main/java/com/linkedin/metadata/validator/DeltaValidator.java index f9f6a05eee..6ffa5c2513 100644 --- a/metadata-validators/src/main/java/com/linkedin/metadata/validator/DeltaValidator.java +++ b/metadata-validators/src/main/java/com/linkedin/metadata/validator/DeltaValidator.java @@ -8,7 +8,10 @@ import java.util.concurrent.ConcurrentHashMap; import javax.annotation.Nonnull; -public class DeltaValidator { +/** + * Utility class to validate delta event schemas. + */ +public final class DeltaValidator { // A cache of validated classes private static final Set> VALIDATED = ConcurrentHashMap.newKeySet(); diff --git a/metadata-validators/src/main/java/com/linkedin/metadata/validator/DocumentValidator.java b/metadata-validators/src/main/java/com/linkedin/metadata/validator/DocumentValidator.java index 308aa40832..ea0c0a4c7c 100644 --- a/metadata-validators/src/main/java/com/linkedin/metadata/validator/DocumentValidator.java +++ b/metadata-validators/src/main/java/com/linkedin/metadata/validator/DocumentValidator.java @@ -9,7 +9,10 @@ import java.util.concurrent.ConcurrentHashMap; import javax.annotation.Nonnull; -public class DocumentValidator { +/** + * Utility class to validate search document schemas. + */ +public final class DocumentValidator { // Allowed non-optional fields. All other fields must be optional. private static final Set NON_OPTIONAL_FIELDS = Collections.unmodifiableSet(new HashSet() { diff --git a/metadata-validators/src/main/java/com/linkedin/metadata/validator/EntityValidator.java b/metadata-validators/src/main/java/com/linkedin/metadata/validator/EntityValidator.java index 483ebf0a5e..50c4aed02a 100644 --- a/metadata-validators/src/main/java/com/linkedin/metadata/validator/EntityValidator.java +++ b/metadata-validators/src/main/java/com/linkedin/metadata/validator/EntityValidator.java @@ -9,7 +9,10 @@ import java.util.concurrent.ConcurrentHashMap; import javax.annotation.Nonnull; -public class EntityValidator { +/** + * Utility class to validate entity schemas. + */ +public final class EntityValidator { // Allowed non-optional fields. All other fields must be optional. private static final Set NON_OPTIONAL_FIELDS = Collections.unmodifiableSet(new HashSet() { @@ -61,7 +64,7 @@ public class EntityValidator { } /** - * Checks if an entity schema is valid + * Checks if an entity schema is valid. */ public static boolean isValidEntitySchema(@Nonnull Class clazz) { if (!VALIDATED.contains(clazz)) { diff --git a/metadata-validators/src/main/java/com/linkedin/metadata/validator/SnapshotValidator.java b/metadata-validators/src/main/java/com/linkedin/metadata/validator/SnapshotValidator.java index a9e0526509..42753a1cb8 100644 --- a/metadata-validators/src/main/java/com/linkedin/metadata/validator/SnapshotValidator.java +++ b/metadata-validators/src/main/java/com/linkedin/metadata/validator/SnapshotValidator.java @@ -56,9 +56,9 @@ public class SnapshotValidator { } /** - * Validates that the URN class is unique across all snapshots + * Validates that the URN class is unique across all snapshots. * - * @param classes a collection of snapshot classes. + * @param snapshotClasses a collection of snapshot classes. */ public static void validateUniqueUrn(@Nonnull Collection snapshotClasses) { Set urnClasses = new HashSet<>(); diff --git a/metadata-validators/src/main/java/com/linkedin/metadata/validator/ValidationUtils.java b/metadata-validators/src/main/java/com/linkedin/metadata/validator/ValidationUtils.java index af59c626b8..e16bb53191 100644 --- a/metadata-validators/src/main/java/com/linkedin/metadata/validator/ValidationUtils.java +++ b/metadata-validators/src/main/java/com/linkedin/metadata/validator/ValidationUtils.java @@ -18,7 +18,10 @@ import java.util.stream.Collectors; import javax.annotation.Nonnull; -public class ValidationUtils { +/** + * Utility class for schema validation classes. + */ +public final class ValidationUtils { public static final Set PRIMITIVE_TYPES = Collections.unmodifiableSet(new HashSet() { @@ -90,7 +93,7 @@ public class ValidationUtils { } /** - * Returns the Java class for an URN typeref field + * Returns the Java class for an URN typeref field. */ public static Class getUrnClass(@Nonnull RecordDataSchema.Field field) { try { @@ -108,7 +111,7 @@ public class ValidationUtils { } /** - * Returns all the non-whitelisted, non-optional fields in a {@link RecordDataSchema} + * Returns all the non-whitelisted, non-optional fields in a {@link RecordDataSchema}. */ @Nonnull public static List nonOptionalFields(@Nonnull RecordDataSchema schema, @@ -124,7 +127,7 @@ public class ValidationUtils { } /** - * Returns all the non-whitelisted, optional fields in a {@link RecordDataSchema} + * Returns all the non-whitelisted, optional fields in a {@link RecordDataSchema}. */ @Nonnull public static List optionalFields(@Nonnull RecordDataSchema schema,