repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/notification/NotificationEntityChangeListener.java
NotificationEntityChangeListener.notifyOfEntityEvent
private void notifyOfEntityEvent(Collection<ITypedReferenceableInstance> entityDefinitions, EntityNotification.OperationType operationType) throws AtlasException { List<EntityNotification> messages = new LinkedList<>(); for (IReferenceableInstance entityDefinition :...
java
private void notifyOfEntityEvent(Collection<ITypedReferenceableInstance> entityDefinitions, EntityNotification.OperationType operationType) throws AtlasException { List<EntityNotification> messages = new LinkedList<>(); for (IReferenceableInstance entityDefinition :...
[ "private", "void", "notifyOfEntityEvent", "(", "Collection", "<", "ITypedReferenceableInstance", ">", "entityDefinitions", ",", "EntityNotification", ".", "OperationType", "operationType", ")", "throws", "AtlasException", "{", "List", "<", "EntityNotification", ">", "mess...
send notification of entity change
[ "send", "notification", "of", "entity", "change" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/notification/NotificationEntityChangeListener.java#L163-L186
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/optimizer/GremlinQueryOptimizer.java
GremlinQueryOptimizer.optimize
private GroovyExpression optimize(GroovyExpression source, GremlinOptimization optimization, OptimizationContext context) { GroovyExpression result = source; if (optimization.appliesTo(source, context)) { //Apply the optimization to the expression. ...
java
private GroovyExpression optimize(GroovyExpression source, GremlinOptimization optimization, OptimizationContext context) { GroovyExpression result = source; if (optimization.appliesTo(source, context)) { //Apply the optimization to the expression. ...
[ "private", "GroovyExpression", "optimize", "(", "GroovyExpression", "source", ",", "GremlinOptimization", "optimization", ",", "OptimizationContext", "context", ")", "{", "GroovyExpression", "result", "=", "source", ";", "if", "(", "optimization", ".", "appliesTo", "(...
Optimizes the expression using the given optimization @param source @param optimization @param context @return
[ "Optimizes", "the", "expression", "using", "the", "given", "optimization" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/optimizer/GremlinQueryOptimizer.java#L127-L151
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/optimizer/GremlinQueryOptimizer.java
GremlinQueryOptimizer.copyWithNewLeafNode
public static GroovyExpression copyWithNewLeafNode(AbstractFunctionExpression expr, GroovyExpression newLeaf) { AbstractFunctionExpression result = (AbstractFunctionExpression)expr.copy(); //remove leading anonymous traversal expression, if there is one if(FACTORY.isLeafAnonymousTraversalExpr...
java
public static GroovyExpression copyWithNewLeafNode(AbstractFunctionExpression expr, GroovyExpression newLeaf) { AbstractFunctionExpression result = (AbstractFunctionExpression)expr.copy(); //remove leading anonymous traversal expression, if there is one if(FACTORY.isLeafAnonymousTraversalExpr...
[ "public", "static", "GroovyExpression", "copyWithNewLeafNode", "(", "AbstractFunctionExpression", "expr", ",", "GroovyExpression", "newLeaf", ")", "{", "AbstractFunctionExpression", "result", "=", "(", "AbstractFunctionExpression", ")", "expr", ".", "copy", "(", ")", ";...
Recursively copies and follows the caller hierarchy of the expression until we come to a function call with a null caller. The caller of that expression is set to newLeaf. @param expr @param newLeaf @return the updated (/copied) expression
[ "Recursively", "copies", "and", "follows", "the", "caller", "hierarchy", "of", "the", "expression", "until", "we", "come", "to", "a", "function", "call", "with", "a", "null", "caller", ".", "The", "caller", "of", "that", "expression", "is", "set", "to", "n...
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/optimizer/GremlinQueryOptimizer.java#L242-L260
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java
ActiveServerFilter.doFilter
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ...
java
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ...
[ "@", "Override", "public", "void", "doFilter", "(", "ServletRequest", "servletRequest", ",", "ServletResponse", "servletResponse", ",", "FilterChain", "filterChain", ")", "throws", "IOException", ",", "ServletException", "{", "if", "(", "isFilteredURI", "(", "servletR...
Determines if this Atlas server instance is passive and redirects to active if so. @param servletRequest Request object from which the URL and other parameters are determined. @param servletResponse Response object to handle the redirect. @param filterChain Chain to pass through requests if the instance is Active. @th...
[ "Determines", "if", "this", "Atlas", "server", "instance", "is", "passive", "and", "redirects", "to", "active", "if", "so", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java#L76-L101
train
apache/incubator-atlas
graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0Element.java
Titan0Element.getPropertyValues
@Override public <T> Collection<T> getPropertyValues(String propertyName, Class<T> type) { return Collections.singleton(getProperty(propertyName, type)); }
java
@Override public <T> Collection<T> getPropertyValues(String propertyName, Class<T> type) { return Collections.singleton(getProperty(propertyName, type)); }
[ "@", "Override", "public", "<", "T", ">", "Collection", "<", "T", ">", "getPropertyValues", "(", "String", "propertyName", ",", "Class", "<", "T", ">", "type", ")", "{", "return", "Collections", ".", "singleton", "(", "getProperty", "(", "propertyName", ",...
Gets all of the values of the given property. @param propertyName @return
[ "Gets", "all", "of", "the", "values", "of", "the", "given", "property", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0Element.java#L97-L100
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
AtlasKnoxSSOAuthenticationFilter.isAuthenticated
private boolean isAuthenticated() { Authentication existingAuth = SecurityContextHolder.getContext().getAuthentication(); return !(!(existingAuth != null && existingAuth.isAuthenticated()) || existingAuth instanceof SSOAuthentication); }
java
private boolean isAuthenticated() { Authentication existingAuth = SecurityContextHolder.getContext().getAuthentication(); return !(!(existingAuth != null && existingAuth.isAuthenticated()) || existingAuth instanceof SSOAuthentication); }
[ "private", "boolean", "isAuthenticated", "(", ")", "{", "Authentication", "existingAuth", "=", "SecurityContextHolder", ".", "getContext", "(", ")", ".", "getAuthentication", "(", ")", ";", "return", "!", "(", "!", "(", "existingAuth", "!=", "null", "&&", "exi...
Do not try to validate JWT if user already authenticated via other provider @return true, if JWT validation required
[ "Do", "not", "try", "to", "validate", "JWT", "if", "user", "already", "authenticated", "via", "other", "provider" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java#L254-L257
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
AtlasKnoxSSOAuthenticationFilter.getJWTFromCookie
protected String getJWTFromCookie(HttpServletRequest req) { String serializedJWT = null; Cookie[] cookies = req.getCookies(); if (cookieName != null && cookies != null) { for (Cookie cookie : cookies) { if (cookieName.equals(cookie.getName())) { if...
java
protected String getJWTFromCookie(HttpServletRequest req) { String serializedJWT = null; Cookie[] cookies = req.getCookies(); if (cookieName != null && cookies != null) { for (Cookie cookie : cookies) { if (cookieName.equals(cookie.getName())) { if...
[ "protected", "String", "getJWTFromCookie", "(", "HttpServletRequest", "req", ")", "{", "String", "serializedJWT", "=", "null", ";", "Cookie", "[", "]", "cookies", "=", "req", ".", "getCookies", "(", ")", ";", "if", "(", "cookieName", "!=", "null", "&&", "c...
Encapsulate the acquisition of the JWT token from HTTP cookies within the request. @param req servlet request to get the JWT token from @return serialized JWT token
[ "Encapsulate", "the", "acquisition", "of", "the", "JWT", "token", "from", "HTTP", "cookies", "within", "the", "request", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java#L266-L281
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
AtlasKnoxSSOAuthenticationFilter.constructLoginURL
protected String constructLoginURL(HttpServletRequest request, boolean isXMLRequest) { String delimiter = "?"; if (authenticationProviderUrl.contains("?")) { delimiter = "&"; } StringBuilder loginURL = new StringBuilder(); if (isXMLRequest) { String atlasA...
java
protected String constructLoginURL(HttpServletRequest request, boolean isXMLRequest) { String delimiter = "?"; if (authenticationProviderUrl.contains("?")) { delimiter = "&"; } StringBuilder loginURL = new StringBuilder(); if (isXMLRequest) { String atlasA...
[ "protected", "String", "constructLoginURL", "(", "HttpServletRequest", "request", ",", "boolean", "isXMLRequest", ")", "{", "String", "delimiter", "=", "\"?\"", ";", "if", "(", "authenticationProviderUrl", ".", "contains", "(", "\"?\"", ")", ")", "{", "delimiter",...
Create the URL to be used for authentication of the user in the absence of a JWT token within the incoming request. @param request for getting the original request URL @return url to use as login url for redirect
[ "Create", "the", "URL", "to", "be", "used", "for", "authentication", "of", "the", "user", "in", "the", "absence", "of", "a", "JWT", "token", "within", "the", "incoming", "request", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java#L290-L311
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
AtlasKnoxSSOAuthenticationFilter.validateToken
protected boolean validateToken(SignedJWT jwtToken) { boolean isValid = validateSignature(jwtToken); if (isValid) { isValid = validateExpiration(jwtToken); if (!isValid) { LOG.warn("Expiration time validation of JWT token failed."); } } else {...
java
protected boolean validateToken(SignedJWT jwtToken) { boolean isValid = validateSignature(jwtToken); if (isValid) { isValid = validateExpiration(jwtToken); if (!isValid) { LOG.warn("Expiration time validation of JWT token failed."); } } else {...
[ "protected", "boolean", "validateToken", "(", "SignedJWT", "jwtToken", ")", "{", "boolean", "isValid", "=", "validateSignature", "(", "jwtToken", ")", ";", "if", "(", "isValid", ")", "{", "isValid", "=", "validateExpiration", "(", "jwtToken", ")", ";", "if", ...
This method provides a single method for validating the JWT for use in request processing. It provides for the override of specific aspects of this implementation through submethods used within but also allows for the override of the entire token validation algorithm. @param jwtToken the token to validate @return true...
[ "This", "method", "provides", "a", "single", "method", "for", "validating", "the", "JWT", "for", "use", "in", "request", "processing", ".", "It", "provides", "for", "the", "override", "of", "specific", "aspects", "of", "this", "implementation", "through", "sub...
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java#L327-L339
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
AtlasKnoxSSOAuthenticationFilter.validateSignature
protected boolean validateSignature(SignedJWT jwtToken) { boolean valid = false; if (JWSObject.State.SIGNED == jwtToken.getState()) { if (LOG.isDebugEnabled()) { LOG.debug("SSO token is in a SIGNED state"); } if (jwtToken.getSignature() != null) { ...
java
protected boolean validateSignature(SignedJWT jwtToken) { boolean valid = false; if (JWSObject.State.SIGNED == jwtToken.getState()) { if (LOG.isDebugEnabled()) { LOG.debug("SSO token is in a SIGNED state"); } if (jwtToken.getSignature() != null) { ...
[ "protected", "boolean", "validateSignature", "(", "SignedJWT", "jwtToken", ")", "{", "boolean", "valid", "=", "false", ";", "if", "(", "JWSObject", ".", "State", ".", "SIGNED", "==", "jwtToken", ".", "getState", "(", ")", ")", "{", "if", "(", "LOG", ".",...
Verify the signature of the JWT token in this method. This method depends on the public key that was established during init based upon the provisioned public key. Override this method in subclasses in order to customize the signature verification behavior. @param jwtToken the token that contains the signature to be v...
[ "Verify", "the", "signature", "of", "the", "JWT", "token", "in", "this", "method", ".", "This", "method", "depends", "on", "the", "public", "key", "that", "was", "established", "during", "init", "based", "upon", "the", "provisioned", "public", "key", ".", ...
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java#L350-L377
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
AtlasKnoxSSOAuthenticationFilter.validateExpiration
protected boolean validateExpiration(SignedJWT jwtToken) { boolean valid = false; try { Date expires = jwtToken.getJWTClaimsSet().getExpirationTime(); if (expires == null || new Date().before(expires)) { if (LOG.isDebugEnabled()) { LOG.debug("S...
java
protected boolean validateExpiration(SignedJWT jwtToken) { boolean valid = false; try { Date expires = jwtToken.getJWTClaimsSet().getExpirationTime(); if (expires == null || new Date().before(expires)) { if (LOG.isDebugEnabled()) { LOG.debug("S...
[ "protected", "boolean", "validateExpiration", "(", "SignedJWT", "jwtToken", ")", "{", "boolean", "valid", "=", "false", ";", "try", "{", "Date", "expires", "=", "jwtToken", ".", "getJWTClaimsSet", "(", ")", ".", "getExpirationTime", "(", ")", ";", "if", "(",...
Validate that the expiration time of the JWT token has not been violated. If it has then throw an AuthenticationException. Override this method in subclasses in order to customize the expiration validation behavior. @param jwtToken the token that contains the expiration date to validate @return valid true if the token...
[ "Validate", "that", "the", "expiration", "time", "of", "the", "JWT", "token", "has", "not", "been", "violated", ".", "If", "it", "has", "then", "throw", "an", "AuthenticationException", ".", "Override", "this", "method", "in", "subclasses", "in", "order", "t...
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java#L387-L403
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasTypeDefGraphStoreV1.java
AtlasTypeDefGraphStoreV1.hasIncomingEdgesWithLabel
boolean hasIncomingEdgesWithLabel(AtlasVertex vertex, String label) throws AtlasBaseException { boolean foundEdges = false; Iterator<AtlasEdge> inEdges = vertex.getEdges(AtlasEdgeDirection.IN).iterator(); while (inEdges.hasNext()) { AtlasEdge edge = inEdges.next(); if (...
java
boolean hasIncomingEdgesWithLabel(AtlasVertex vertex, String label) throws AtlasBaseException { boolean foundEdges = false; Iterator<AtlasEdge> inEdges = vertex.getEdges(AtlasEdgeDirection.IN).iterator(); while (inEdges.hasNext()) { AtlasEdge edge = inEdges.next(); if (...
[ "boolean", "hasIncomingEdgesWithLabel", "(", "AtlasVertex", "vertex", ",", "String", "label", ")", "throws", "AtlasBaseException", "{", "boolean", "foundEdges", "=", "false", ";", "Iterator", "<", "AtlasEdge", ">", "inEdges", "=", "vertex", ".", "getEdges", "(", ...
Look to see if there are any IN edges with the supplied label @param vertex @param label @return @throws AtlasBaseException
[ "Look", "to", "see", "if", "there", "are", "any", "IN", "edges", "with", "the", "supplied", "label" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasTypeDefGraphStoreV1.java#L252-L265
train
apache/incubator-atlas
intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java
AtlasRelationshipType.validateAtlasRelationshipType
private boolean validateAtlasRelationshipType(AtlasRelationshipType type) { boolean isValid = false; try { validateAtlasRelationshipDef(type.getRelationshipDef()); isValid = true; } catch (AtlasBaseException abe) { LOG.error("Validation error for AtlasRelation...
java
private boolean validateAtlasRelationshipType(AtlasRelationshipType type) { boolean isValid = false; try { validateAtlasRelationshipDef(type.getRelationshipDef()); isValid = true; } catch (AtlasBaseException abe) { LOG.error("Validation error for AtlasRelation...
[ "private", "boolean", "validateAtlasRelationshipType", "(", "AtlasRelationshipType", "type", ")", "{", "boolean", "isValid", "=", "false", ";", "try", "{", "validateAtlasRelationshipDef", "(", "type", ".", "getRelationshipDef", "(", ")", ")", ";", "isValid", "=", ...
Validate the fields in the the RelationshipType are consistent with respect to themselves. @param type @throws AtlasBaseException
[ "Validate", "the", "fields", "in", "the", "the", "RelationshipType", "are", "consistent", "with", "respect", "to", "themselves", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java#L178-L187
train
apache/incubator-atlas
intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java
AtlasRelationshipType.validateAtlasRelationshipDef
public static void validateAtlasRelationshipDef(AtlasRelationshipDef relationshipDef) throws AtlasBaseException { AtlasRelationshipEndDef endDef1 = relationshipDef.getEndDef1(); AtlasRelationshipEndDef endDef2 = relationshipDef.getEndDef2(); RelationshipCategory rel...
java
public static void validateAtlasRelationshipDef(AtlasRelationshipDef relationshipDef) throws AtlasBaseException { AtlasRelationshipEndDef endDef1 = relationshipDef.getEndDef1(); AtlasRelationshipEndDef endDef2 = relationshipDef.getEndDef2(); RelationshipCategory rel...
[ "public", "static", "void", "validateAtlasRelationshipDef", "(", "AtlasRelationshipDef", "relationshipDef", ")", "throws", "AtlasBaseException", "{", "AtlasRelationshipEndDef", "endDef1", "=", "relationshipDef", ".", "getEndDef1", "(", ")", ";", "AtlasRelationshipEndDef", "...
Throw an exception so we can junit easily. This method assumes that the 2 ends are not null. @param relationshipDef @throws AtlasBaseException
[ "Throw", "an", "exception", "so", "we", "can", "junit", "easily", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java#L197-L242
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/util/AtlasRepositoryConfiguration.java
AtlasRepositoryConfiguration.getCompiledQueryCacheCapacity
public static int getCompiledQueryCacheCapacity() { try { return ApplicationProperties.get().getInt(COMPILED_QUERY_CACHE_CAPACITY, DEFAULT_COMPILED_QUERY_CACHE_CAPACITY); } catch (AtlasException e) { throw new RuntimeException(e); } }
java
public static int getCompiledQueryCacheCapacity() { try { return ApplicationProperties.get().getInt(COMPILED_QUERY_CACHE_CAPACITY, DEFAULT_COMPILED_QUERY_CACHE_CAPACITY); } catch (AtlasException e) { throw new RuntimeException(e); } }
[ "public", "static", "int", "getCompiledQueryCacheCapacity", "(", ")", "{", "try", "{", "return", "ApplicationProperties", ".", "get", "(", ")", ".", "getInt", "(", "COMPILED_QUERY_CACHE_CAPACITY", ",", "DEFAULT_COMPILED_QUERY_CACHE_CAPACITY", ")", ";", "}", "catch", ...
Get the configuration property that specifies the size of the compiled query cache. This is an optional property. A default is used if it is not present. @return the size to be used when creating the compiled query cache.
[ "Get", "the", "configuration", "property", "that", "specifies", "the", "size", "of", "the", "compiled", "query", "cache", ".", "This", "is", "an", "optional", "property", ".", "A", "default", "is", "used", "if", "it", "is", "not", "present", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/util/AtlasRepositoryConfiguration.java#L127-L133
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/util/AtlasRepositoryConfiguration.java
AtlasRepositoryConfiguration.getCompiledQueryCacheEvictionWarningThrottle
public static int getCompiledQueryCacheEvictionWarningThrottle() { try { return ApplicationProperties.get().getInt(COMPILED_QUERY_CACHE_EVICTION_WARNING_THROTTLE, DEFAULT_COMPILED_QUERY_CACHE_EVICTION_WARNING_THROTTLE); } catch (AtlasException e) { throw new RuntimeException(e); ...
java
public static int getCompiledQueryCacheEvictionWarningThrottle() { try { return ApplicationProperties.get().getInt(COMPILED_QUERY_CACHE_EVICTION_WARNING_THROTTLE, DEFAULT_COMPILED_QUERY_CACHE_EVICTION_WARNING_THROTTLE); } catch (AtlasException e) { throw new RuntimeException(e); ...
[ "public", "static", "int", "getCompiledQueryCacheEvictionWarningThrottle", "(", ")", "{", "try", "{", "return", "ApplicationProperties", ".", "get", "(", ")", ".", "getInt", "(", "COMPILED_QUERY_CACHE_EVICTION_WARNING_THROTTLE", ",", "DEFAULT_COMPILED_QUERY_CACHE_EVICTION_WAR...
Get the configuration property that specifies the number evictions that pass before a warning is logged. This is an optional property. A default is used if it is not present. @return the number of evictions before a warning is logged.
[ "Get", "the", "configuration", "property", "that", "specifies", "the", "number", "evictions", "that", "pass", "before", "a", "warning", "is", "logged", ".", "This", "is", "an", "optional", "property", ".", "A", "default", "is", "used", "if", "it", "is", "n...
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/util/AtlasRepositoryConfiguration.java#L144-L150
train
apache/incubator-atlas
typesystem/src/main/java/org/apache/atlas/typesystem/types/utils/TypesUtil.java
TypesUtil.getFieldMapping
public static FieldMapping getFieldMapping(IDataType type) { switch (type.getTypeCategory()) { case CLASS: case TRAIT: return ((HierarchicalType)type).fieldMapping(); case STRUCT: return ((StructType)type).fieldMapping(); default: throw new I...
java
public static FieldMapping getFieldMapping(IDataType type) { switch (type.getTypeCategory()) { case CLASS: case TRAIT: return ((HierarchicalType)type).fieldMapping(); case STRUCT: return ((StructType)type).fieldMapping(); default: throw new I...
[ "public", "static", "FieldMapping", "getFieldMapping", "(", "IDataType", "type", ")", "{", "switch", "(", "type", ".", "getTypeCategory", "(", ")", ")", "{", "case", "CLASS", ":", "case", "TRAIT", ":", "return", "(", "(", "HierarchicalType", ")", "type", "...
Get the field mappings for the specified data type. Field mappings are only relevant for CLASS, TRAIT, and STRUCT types. @param type @return {@link FieldMapping} for the specified type @throws IllegalArgumentException if type is not a CLASS, TRAIT, or STRUCT type.
[ "Get", "the", "field", "mappings", "for", "the", "specified", "data", "type", ".", "Field", "mappings", "are", "only", "relevant", "for", "CLASS", "TRAIT", "and", "STRUCT", "types", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/typesystem/src/main/java/org/apache/atlas/typesystem/types/utils/TypesUtil.java#L145-L157
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java
DefaultMetadataService.getTypeDefinition
@Override public String getTypeDefinition(String typeName) throws AtlasException { final IDataType dataType = typeSystem.getDataType(IDataType.class, typeName); return TypesSerialization.toJson(typeSystem, dataType.getName()); }
java
@Override public String getTypeDefinition(String typeName) throws AtlasException { final IDataType dataType = typeSystem.getDataType(IDataType.class, typeName); return TypesSerialization.toJson(typeSystem, dataType.getName()); }
[ "@", "Override", "public", "String", "getTypeDefinition", "(", "String", "typeName", ")", "throws", "AtlasException", "{", "final", "IDataType", "dataType", "=", "typeSystem", ".", "getDataType", "(", "IDataType", ".", "class", ",", "typeName", ")", ";", "return...
Return the definition for the given type. @param typeName name for this type, must be unique @return type definition as JSON
[ "Return", "the", "definition", "for", "the", "given", "type", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java#L255-L259
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java
DefaultMetadataService.createEntities
@Override public CreateUpdateEntitiesResult createEntities(String entityInstanceDefinition) throws AtlasException { entityInstanceDefinition = ParamChecker.notEmpty(entityInstanceDefinition, "Entity instance definition"); ITypedReferenceableInstance[] typedInstances = deserializeClassInstances(enti...
java
@Override public CreateUpdateEntitiesResult createEntities(String entityInstanceDefinition) throws AtlasException { entityInstanceDefinition = ParamChecker.notEmpty(entityInstanceDefinition, "Entity instance definition"); ITypedReferenceableInstance[] typedInstances = deserializeClassInstances(enti...
[ "@", "Override", "public", "CreateUpdateEntitiesResult", "createEntities", "(", "String", "entityInstanceDefinition", ")", "throws", "AtlasException", "{", "entityInstanceDefinition", "=", "ParamChecker", ".", "notEmpty", "(", "entityInstanceDefinition", ",", "\"Entity instan...
Creates an entity, instance of the type. @param entityInstanceDefinition json array of entity definitions @return guids - list of guids
[ "Creates", "an", "entity", "instance", "of", "the", "type", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java#L280-L287
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java
DefaultMetadataService.validateUniqueAttribute
private void validateUniqueAttribute(String entityType, String attributeName) throws AtlasException { ClassType type = typeSystem.getDataType(ClassType.class, entityType); AttributeInfo attribute = type.fieldMapping().fields.get(attributeName); if(attribute == null) { throw new Illeg...
java
private void validateUniqueAttribute(String entityType, String attributeName) throws AtlasException { ClassType type = typeSystem.getDataType(ClassType.class, entityType); AttributeInfo attribute = type.fieldMapping().fields.get(attributeName); if(attribute == null) { throw new Illeg...
[ "private", "void", "validateUniqueAttribute", "(", "String", "entityType", ",", "String", "attributeName", ")", "throws", "AtlasException", "{", "ClassType", "type", "=", "typeSystem", ".", "getDataType", "(", "ClassType", ".", "class", ",", "entityType", ")", ";"...
Validate that attribute is unique attribute @param entityType the entity type @param attributeName the name of the attribute
[ "Validate", "that", "attribute", "is", "unique", "attribute" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java#L353-L364
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java
DefaultMetadataService.getEntityList
@Override public List<String> getEntityList(String entityType) throws AtlasException { validateTypeExists(entityType); return repository.getEntityList(entityType); }
java
@Override public List<String> getEntityList(String entityType) throws AtlasException { validateTypeExists(entityType); return repository.getEntityList(entityType); }
[ "@", "Override", "public", "List", "<", "String", ">", "getEntityList", "(", "String", "entityType", ")", "throws", "AtlasException", "{", "validateTypeExists", "(", "entityType", ")", ";", "return", "repository", ".", "getEntityList", "(", "entityType", ")", ";...
Return the list of entity guids for the given type in the repository. @param entityType type @return list of entity guids for the given type in the repository
[ "Return", "the", "list", "of", "entity", "guids", "for", "the", "given", "type", "in", "the", "repository", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java#L372-L377
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java
DefaultMetadataService.addTrait
@Override public void addTrait(List<String> entityGuids, ITypedStruct traitInstance) throws AtlasException { Preconditions.checkNotNull(entityGuids, "entityGuids list cannot be null"); Preconditions.checkNotNull(traitInstance, "Trait instance cannot be null"); final String traitName = trait...
java
@Override public void addTrait(List<String> entityGuids, ITypedStruct traitInstance) throws AtlasException { Preconditions.checkNotNull(entityGuids, "entityGuids list cannot be null"); Preconditions.checkNotNull(traitInstance, "Trait instance cannot be null"); final String traitName = trait...
[ "@", "Override", "public", "void", "addTrait", "(", "List", "<", "String", ">", "entityGuids", ",", "ITypedStruct", "traitInstance", ")", "throws", "AtlasException", "{", "Preconditions", ".", "checkNotNull", "(", "entityGuids", ",", "\"entityGuids list cannot be null...
Adds a new trait to the list of existing entities represented by their respective guids @param entityGuids list of guids of entities @param traitInstance trait instance json that needs to be added to entities @throws AtlasException
[ "Adds", "a", "new", "trait", "to", "the", "list", "of", "existing", "entities", "represented", "by", "their", "respective", "guids" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java#L566-L591
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
GraphHelper.getAdjacentEdgesByLabel
public Iterator<AtlasEdge> getAdjacentEdgesByLabel(AtlasVertex instanceVertex, AtlasEdgeDirection direction, final String edgeLabel) { if (LOG.isDebugEnabled()) { LOG.debug("Finding edges for {} with label {}", string(instanceVertex), edgeLabel); } if(instanceVertex != null && edgeL...
java
public Iterator<AtlasEdge> getAdjacentEdgesByLabel(AtlasVertex instanceVertex, AtlasEdgeDirection direction, final String edgeLabel) { if (LOG.isDebugEnabled()) { LOG.debug("Finding edges for {} with label {}", string(instanceVertex), edgeLabel); } if(instanceVertex != null && edgeL...
[ "public", "Iterator", "<", "AtlasEdge", ">", "getAdjacentEdgesByLabel", "(", "AtlasVertex", "instanceVertex", ",", "AtlasEdgeDirection", "direction", ",", "final", "String", "edgeLabel", ")", "{", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "LOG...
So traversing all the edges
[ "So", "traversing", "all", "the", "edges" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java#L310-L348
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
GraphHelper.getEdgeForLabel
public AtlasEdge getEdgeForLabel(AtlasVertex vertex, String edgeLabel) { return getEdgeForLabel(vertex, edgeLabel, AtlasEdgeDirection.OUT); }
java
public AtlasEdge getEdgeForLabel(AtlasVertex vertex, String edgeLabel) { return getEdgeForLabel(vertex, edgeLabel, AtlasEdgeDirection.OUT); }
[ "public", "AtlasEdge", "getEdgeForLabel", "(", "AtlasVertex", "vertex", ",", "String", "edgeLabel", ")", "{", "return", "getEdgeForLabel", "(", "vertex", ",", "edgeLabel", ",", "AtlasEdgeDirection", ".", "OUT", ")", ";", "}" ]
Returns the active edge for the given edge label. If the vertex is deleted and there is no active edge, it returns the latest deleted edge @param vertex @param edgeLabel @return
[ "Returns", "the", "active", "edge", "for", "the", "given", "edge", "label", ".", "If", "the", "vertex", "is", "deleted", "and", "there", "is", "no", "active", "edge", "it", "returns", "the", "latest", "deleted", "edge" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java#L399-L401
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
GraphHelper.removeEdge
public void removeEdge(AtlasEdge edge) { String edgeString = null; if (LOG.isDebugEnabled()) { edgeString = string(edge); LOG.debug("Removing {}", edgeString); } graph.removeEdge(edge); if (LOG.isDebugEnabled()) { LOG.info("Removed {}", edg...
java
public void removeEdge(AtlasEdge edge) { String edgeString = null; if (LOG.isDebugEnabled()) { edgeString = string(edge); LOG.debug("Removing {}", edgeString); } graph.removeEdge(edge); if (LOG.isDebugEnabled()) { LOG.info("Removed {}", edg...
[ "public", "void", "removeEdge", "(", "AtlasEdge", "edge", ")", "{", "String", "edgeString", "=", "null", ";", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "edgeString", "=", "string", "(", "edge", ")", ";", "LOG", ".", "debug", "(", "...
Remove the specified edge from the graph. @param edge
[ "Remove", "the", "specified", "edge", "from", "the", "graph", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java#L557-L571
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
GraphHelper.removeVertex
public void removeVertex(AtlasVertex vertex) { String vertexString = null; if (LOG.isDebugEnabled()) { vertexString = string(vertex); LOG.debug("Removing {}", vertexString); } graph.removeVertex(vertex); if (LOG.isDebugEnabled()) { LOG.info...
java
public void removeVertex(AtlasVertex vertex) { String vertexString = null; if (LOG.isDebugEnabled()) { vertexString = string(vertex); LOG.debug("Removing {}", vertexString); } graph.removeVertex(vertex); if (LOG.isDebugEnabled()) { LOG.info...
[ "public", "void", "removeVertex", "(", "AtlasVertex", "vertex", ")", "{", "String", "vertexString", "=", "null", ";", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "vertexString", "=", "string", "(", "vertex", ")", ";", "LOG", ".", "debug"...
Remove the specified AtlasVertex from the graph. @param vertex
[ "Remove", "the", "specified", "AtlasVertex", "from", "the", "graph", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java#L578-L592
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
GraphHelper.getVerticesForPropertyValues
public Map<String, AtlasVertex> getVerticesForPropertyValues(String property, List<String> values) { if(values.isEmpty()) { return Collections.emptyMap(); } Collection<String> nonNullValues = new HashSet<>(values.size()); for(String value : values) { if(value !=...
java
public Map<String, AtlasVertex> getVerticesForPropertyValues(String property, List<String> values) { if(values.isEmpty()) { return Collections.emptyMap(); } Collection<String> nonNullValues = new HashSet<>(values.size()); for(String value : values) { if(value !=...
[ "public", "Map", "<", "String", ",", "AtlasVertex", ">", "getVerticesForPropertyValues", "(", "String", "property", ",", "List", "<", "String", ">", "values", ")", "{", "if", "(", "values", ".", "isEmpty", "(", ")", ")", "{", "return", "Collections", ".", ...
Finds the Vertices that correspond to the given property values. Property values that are not found in the graph will not be in the map. @return propertyValue to AtlasVertex map with the result.
[ "Finds", "the", "Vertices", "that", "correspond", "to", "the", "given", "property", "values", ".", "Property", "values", "that", "are", "not", "found", "in", "the", "graph", "will", "not", "be", "in", "the", "map", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java#L608-L639
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
GraphHelper.getVerticesForGUIDs
public Map<String, AtlasVertex> getVerticesForGUIDs(List<String> guids) { return getVerticesForPropertyValues(Constants.GUID_PROPERTY_KEY, guids); }
java
public Map<String, AtlasVertex> getVerticesForGUIDs(List<String> guids) { return getVerticesForPropertyValues(Constants.GUID_PROPERTY_KEY, guids); }
[ "public", "Map", "<", "String", ",", "AtlasVertex", ">", "getVerticesForGUIDs", "(", "List", "<", "String", ">", "guids", ")", "{", "return", "getVerticesForPropertyValues", "(", "Constants", ".", "GUID_PROPERTY_KEY", ",", "guids", ")", ";", "}" ]
Finds the Vertices that correspond to the given GUIDs. GUIDs that are not found in the graph will not be in the map. @return GUID to AtlasVertex map with the result.
[ "Finds", "the", "Vertices", "that", "correspond", "to", "the", "given", "GUIDs", ".", "GUIDs", "that", "are", "not", "found", "in", "the", "graph", "will", "not", "be", "in", "the", "map", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java#L648-L651
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
GraphHelper.getVertexForInstanceByUniqueAttribute
public AtlasVertex getVertexForInstanceByUniqueAttribute(ClassType classType, IReferenceableInstance instance) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Checking if there is an instance with the same unique attributes for instance {}", instance.toShortString()); ...
java
public AtlasVertex getVertexForInstanceByUniqueAttribute(ClassType classType, IReferenceableInstance instance) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Checking if there is an instance with the same unique attributes for instance {}", instance.toShortString()); ...
[ "public", "AtlasVertex", "getVertexForInstanceByUniqueAttribute", "(", "ClassType", "classType", ",", "IReferenceableInstance", "instance", ")", "throws", "AtlasException", "{", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "LOG", ".", "debug", "(", ...
For the given type, finds an unique attribute and checks if there is an existing instance with the same unique value @param classType @param instance @return @throws AtlasException
[ "For", "the", "given", "type", "finds", "an", "unique", "attribute", "and", "checks", "if", "there", "is", "an", "existing", "instance", "with", "the", "same", "unique", "value" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java#L768-L792
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
GraphHelper.getVerticesForInstancesByUniqueAttribute
public List<AtlasVertex> getVerticesForInstancesByUniqueAttribute(ClassType classType, List<? extends IReferenceableInstance> instancesForClass) throws AtlasException { //For each attribute, need to figure out what values to search for and which instance(s) //those values correspond to. Map<Str...
java
public List<AtlasVertex> getVerticesForInstancesByUniqueAttribute(ClassType classType, List<? extends IReferenceableInstance> instancesForClass) throws AtlasException { //For each attribute, need to figure out what values to search for and which instance(s) //those values correspond to. Map<Str...
[ "public", "List", "<", "AtlasVertex", ">", "getVerticesForInstancesByUniqueAttribute", "(", "ClassType", "classType", ",", "List", "<", "?", "extends", "IReferenceableInstance", ">", "instancesForClass", ")", "throws", "AtlasException", "{", "//For each attribute, need to f...
Finds vertices that match at least one unique attribute of the instances specified. The AtlasVertex at a given index in the result corresponds to the IReferencableInstance at that same index that was passed in. The number of elements in the resultant list is guaranteed to match the number of instances that were passe...
[ "Finds", "vertices", "that", "match", "at", "least", "one", "unique", "attribute", "of", "the", "instances", "specified", ".", "The", "AtlasVertex", "at", "a", "given", "index", "in", "the", "result", "corresponds", "to", "the", "IReferencableInstance", "at", ...
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java#L805-L874
train
apache/incubator-atlas
graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/GraphDbObjectFactory.java
GraphDbObjectFactory.createEdge
public static Titan1Edge createEdge(Titan1Graph graph, Edge source) { if (source == null) { return null; } return new Titan1Edge(graph, source); }
java
public static Titan1Edge createEdge(Titan1Graph graph, Edge source) { if (source == null) { return null; } return new Titan1Edge(graph, source); }
[ "public", "static", "Titan1Edge", "createEdge", "(", "Titan1Graph", "graph", ",", "Edge", "source", ")", "{", "if", "(", "source", "==", "null", ")", "{", "return", "null", ";", "}", "return", "new", "Titan1Edge", "(", "graph", ",", "source", ")", ";", ...
Creates a Titan1Edge that corresponds to the given Gremlin Edge. @param graph The graph the edge should be created in @param source The gremlin edge
[ "Creates", "a", "Titan1Edge", "that", "corresponds", "to", "the", "given", "Gremlin", "Edge", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/GraphDbObjectFactory.java#L48-L54
train
apache/incubator-atlas
graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/GraphDbObjectFactory.java
GraphDbObjectFactory.createVertex
public static Titan1Vertex createVertex(Titan1Graph graph, Vertex source) { if (source == null) { return null; } return new Titan1Vertex(graph, source); }
java
public static Titan1Vertex createVertex(Titan1Graph graph, Vertex source) { if (source == null) { return null; } return new Titan1Vertex(graph, source); }
[ "public", "static", "Titan1Vertex", "createVertex", "(", "Titan1Graph", "graph", ",", "Vertex", "source", ")", "{", "if", "(", "source", "==", "null", ")", "{", "return", "null", ";", "}", "return", "new", "Titan1Vertex", "(", "graph", ",", "source", ")", ...
Creates a Titan1Vertex that corresponds to the given Gremlin Vertex. @param graph The graph that contains the vertex @param source the Gremlin vertex
[ "Creates", "a", "Titan1Vertex", "that", "corresponds", "to", "the", "given", "Gremlin", "Vertex", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/GraphDbObjectFactory.java#L72-L78
train
apache/incubator-atlas
client/src/main/java/org/apache/atlas/AtlasBaseClient.java
AtlasBaseClient.getAdminStatus
public String getAdminStatus() throws AtlasServiceException { String result = AtlasBaseClient.UNKNOWN_STATUS; WebResource resource = getResource(service, STATUS.getPath()); JSONObject response = callAPIWithResource(STATUS, resource, null, JSONObject.class); try { result = res...
java
public String getAdminStatus() throws AtlasServiceException { String result = AtlasBaseClient.UNKNOWN_STATUS; WebResource resource = getResource(service, STATUS.getPath()); JSONObject response = callAPIWithResource(STATUS, resource, null, JSONObject.class); try { result = res...
[ "public", "String", "getAdminStatus", "(", ")", "throws", "AtlasServiceException", "{", "String", "result", "=", "AtlasBaseClient", ".", "UNKNOWN_STATUS", ";", "WebResource", "resource", "=", "getResource", "(", "service", ",", "STATUS", ".", "getPath", "(", ")", ...
Return status of the service instance the client is pointing to. @return One of the values in ServiceState.ServiceStateValue or {@link #UNKNOWN_STATUS} if there is a JSON parse exception @throws AtlasServiceException if there is a HTTP error.
[ "Return", "status", "of", "the", "service", "instance", "the", "client", "is", "pointing", "to", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/client/src/main/java/org/apache/atlas/AtlasBaseClient.java#L388-L398
train
apache/incubator-atlas
client/src/main/java/org/apache/atlas/AtlasBaseClient.java
AtlasBaseClient.getResource
private WebResource getResource(WebResource service, APIInfo api, String... pathParams) { WebResource resource = service.path(api.getPath()); resource = appendPathParams(resource, pathParams); return resource; }
java
private WebResource getResource(WebResource service, APIInfo api, String... pathParams) { WebResource resource = service.path(api.getPath()); resource = appendPathParams(resource, pathParams); return resource; }
[ "private", "WebResource", "getResource", "(", "WebResource", "service", ",", "APIInfo", "api", ",", "String", "...", "pathParams", ")", "{", "WebResource", "resource", "=", "service", ".", "path", "(", "api", ".", "getPath", "(", ")", ")", ";", "resource", ...
Modify URL to include the path params
[ "Modify", "URL", "to", "include", "the", "path", "params" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/client/src/main/java/org/apache/atlas/AtlasBaseClient.java#L480-L484
train
apache/incubator-atlas
graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/graphson/AtlasGraphSONUtility.java
AtlasGraphSONUtility.objectNodeFromElement
private ObjectNode objectNodeFromElement(final AtlasElement element) { final boolean isEdge = element instanceof AtlasEdge; final boolean showTypes = mode == AtlasGraphSONMode.EXTENDED; final List<String> propertyKeys = isEdge ? this.edgePropertyKeys : this.vertexPropertyKeys; final Elem...
java
private ObjectNode objectNodeFromElement(final AtlasElement element) { final boolean isEdge = element instanceof AtlasEdge; final boolean showTypes = mode == AtlasGraphSONMode.EXTENDED; final List<String> propertyKeys = isEdge ? this.edgePropertyKeys : this.vertexPropertyKeys; final Elem...
[ "private", "ObjectNode", "objectNodeFromElement", "(", "final", "AtlasElement", "element", ")", "{", "final", "boolean", "isEdge", "=", "element", "instanceof", "AtlasEdge", ";", "final", "boolean", "showTypes", "=", "mode", "==", "AtlasGraphSONMode", ".", "EXTENDED...
Creates GraphSON for a single graph element.
[ "Creates", "GraphSON", "for", "a", "single", "graph", "element", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/graphson/AtlasGraphSONUtility.java#L127-L176
train
apache/incubator-atlas
graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/graphson/AtlasGraphSONUtility.java
AtlasGraphSONUtility.jsonFromElement
public static JSONObject jsonFromElement(final AtlasElement element, final Set<String> propertyKeys, final AtlasGraphSONMode mode) throws JSONException { final AtlasGraphSONUtility graphson = element instanceof AtlasEdge ? new AtlasGraphSONUt...
java
public static JSONObject jsonFromElement(final AtlasElement element, final Set<String> propertyKeys, final AtlasGraphSONMode mode) throws JSONException { final AtlasGraphSONUtility graphson = element instanceof AtlasEdge ? new AtlasGraphSONUt...
[ "public", "static", "JSONObject", "jsonFromElement", "(", "final", "AtlasElement", "element", ",", "final", "Set", "<", "String", ">", "propertyKeys", ",", "final", "AtlasGraphSONMode", "mode", ")", "throws", "JSONException", "{", "final", "AtlasGraphSONUtility", "g...
Creates a Jettison JSONObject from a graph element. @param element the graph element to convert to JSON. @param propertyKeys The property getPropertyKeys() at the root of the element to serialize. If null, then all getPropertyKeys() are serialized. @param mode the type of GraphSON to be generated.
[ "Creates", "a", "Jettison", "JSONObject", "from", "a", "graph", "element", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/graphson/AtlasGraphSONUtility.java#L189-L197
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/util/CredentialProviderUtility.java
CredentialProviderUtility.getPassword
private static char[] getPassword(TextDevice textDevice, String key) { boolean noMatch; char[] cred = new char[0]; char[] passwd1; char[] passwd2; do { passwd1 = textDevice.readPassword("Please enter the password value for %s:", key); passwd2 = textDevice....
java
private static char[] getPassword(TextDevice textDevice, String key) { boolean noMatch; char[] cred = new char[0]; char[] passwd1; char[] passwd2; do { passwd1 = textDevice.readPassword("Please enter the password value for %s:", key); passwd2 = textDevice....
[ "private", "static", "char", "[", "]", "getPassword", "(", "TextDevice", "textDevice", ",", "String", "key", ")", "{", "boolean", "noMatch", ";", "char", "[", "]", "cred", "=", "new", "char", "[", "0", "]", ";", "char", "[", "]", "passwd1", ";", "cha...
Retrieves a password from the command line. @param textDevice the system console. @param key the password key/alias. @return the password.
[ "Retrieves", "a", "password", "from", "the", "command", "line", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/util/CredentialProviderUtility.java#L109-L136
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/util/CredentialProviderUtility.java
CredentialProviderUtility.getCredentialProvider
private static CredentialProvider getCredentialProvider(TextDevice textDevice) throws IOException { String providerPath = textDevice.readLine("Please enter the full path to the credential provider:"); if (providerPath != null) { Configuration conf = new Configuration(false); con...
java
private static CredentialProvider getCredentialProvider(TextDevice textDevice) throws IOException { String providerPath = textDevice.readLine("Please enter the full path to the credential provider:"); if (providerPath != null) { Configuration conf = new Configuration(false); con...
[ "private", "static", "CredentialProvider", "getCredentialProvider", "(", "TextDevice", "textDevice", ")", "throws", "IOException", "{", "String", "providerPath", "=", "textDevice", ".", "readLine", "(", "\"Please enter the full path to the credential provider:\"", ")", ";", ...
\ Returns a credential provider for the entered JKS path. @param textDevice the system console. @return the Credential provider @throws IOException
[ "\\", "Returns", "a", "credential", "provider", "for", "the", "entered", "JKS", "path", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/util/CredentialProviderUtility.java#L144-L154
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/service/ActiveInstanceElectorService.java
ActiveInstanceElectorService.start
@Override public void start() throws AtlasException { if (!HAConfiguration.isHAEnabled(configuration)) { LOG.info("HA is not enabled, no need to start leader election service"); return; } cacheActiveStateChangeHandlers(); serverId = AtlasServerIdSelector.selec...
java
@Override public void start() throws AtlasException { if (!HAConfiguration.isHAEnabled(configuration)) { LOG.info("HA is not enabled, no need to start leader election service"); return; } cacheActiveStateChangeHandlers(); serverId = AtlasServerIdSelector.selec...
[ "@", "Override", "public", "void", "start", "(", ")", "throws", "AtlasException", "{", "if", "(", "!", "HAConfiguration", ".", "isHAEnabled", "(", "configuration", ")", ")", "{", "LOG", ".", "info", "(", "\"HA is not enabled, no need to start leader election service...
Join leader election on starting up. If Atlas High Availability configuration is disabled, this operation is a no-op. @throws AtlasException
[ "Join", "leader", "election", "on", "starting", "up", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/service/ActiveInstanceElectorService.java#L91-L100
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/service/ActiveInstanceElectorService.java
ActiveInstanceElectorService.stop
@Override public void stop() { if (!HAConfiguration.isHAEnabled(configuration)) { LOG.info("HA is not enabled, no need to stop leader election service"); return; } try { leaderLatch.close(); curatorFactory.close(); } catch (IOException ...
java
@Override public void stop() { if (!HAConfiguration.isHAEnabled(configuration)) { LOG.info("HA is not enabled, no need to stop leader election service"); return; } try { leaderLatch.close(); curatorFactory.close(); } catch (IOException ...
[ "@", "Override", "public", "void", "stop", "(", ")", "{", "if", "(", "!", "HAConfiguration", ".", "isHAEnabled", "(", "configuration", ")", ")", "{", "LOG", ".", "info", "(", "\"HA is not enabled, no need to stop leader election service\"", ")", ";", "return", "...
Leave leader election process and clean up resources on shutting down. If Atlas High Availability configuration is disabled, this operation is a no-op. @throws AtlasException
[ "Leave", "leader", "election", "process", "and", "clean", "up", "resources", "on", "shutting", "down", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/service/ActiveInstanceElectorService.java#L121-L133
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/graph/VertexLookupContext.java
VertexLookupContext.addInstance
public void addInstance(IReferenceableInstance instance) throws AtlasException { ClassType classType = typeSystem.getDataType(ClassType.class, instance.getTypeName()); ITypedReferenceableInstance newInstance = classType.convert(instance, Multiplicity.REQUIRED); findReferencedInstancesToPreLoad(...
java
public void addInstance(IReferenceableInstance instance) throws AtlasException { ClassType classType = typeSystem.getDataType(ClassType.class, instance.getTypeName()); ITypedReferenceableInstance newInstance = classType.convert(instance, Multiplicity.REQUIRED); findReferencedInstancesToPreLoad(...
[ "public", "void", "addInstance", "(", "IReferenceableInstance", "instance", ")", "throws", "AtlasException", "{", "ClassType", "classType", "=", "typeSystem", ".", "getDataType", "(", "ClassType", ".", "class", ",", "instance", ".", "getTypeName", "(", ")", ")", ...
Adds an instance to be loaded.
[ "Adds", "an", "instance", "to", "be", "loaded", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/graph/VertexLookupContext.java#L69-L83
train
apache/incubator-atlas
common/src/main/java/org/apache/atlas/ha/HAConfiguration.java
HAConfiguration.isHAEnabled
public static boolean isHAEnabled(Configuration configuration) { boolean ret = false; if (configuration.containsKey(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)) { ret = configuration.getBoolean(ATLAS_SERVER_HA_ENABLED_KEY); } else { String[] ids = configuration.getStrin...
java
public static boolean isHAEnabled(Configuration configuration) { boolean ret = false; if (configuration.containsKey(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)) { ret = configuration.getBoolean(ATLAS_SERVER_HA_ENABLED_KEY); } else { String[] ids = configuration.getStrin...
[ "public", "static", "boolean", "isHAEnabled", "(", "Configuration", "configuration", ")", "{", "boolean", "ret", "=", "false", ";", "if", "(", "configuration", ".", "containsKey", "(", "HAConfiguration", ".", "ATLAS_SERVER_HA_ENABLED_KEY", ")", ")", "{", "ret", ...
Return whether HA is enabled or not. @param configuration underlying configuration instance @return
[ "Return", "whether", "HA", "is", "enabled", "or", "not", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/common/src/main/java/org/apache/atlas/ha/HAConfiguration.java#L62-L74
train
apache/incubator-atlas
common/src/main/java/org/apache/atlas/ha/HAConfiguration.java
HAConfiguration.getBoundAddressForId
public static String getBoundAddressForId(Configuration configuration, String serverId) { String hostPort = configuration.getString(ATLAS_SERVER_ADDRESS_PREFIX +serverId); boolean isSecure = configuration.getBoolean(SecurityProperties.TLS_ENABLED); String protocol = (isSecure) ? "https://" : "ht...
java
public static String getBoundAddressForId(Configuration configuration, String serverId) { String hostPort = configuration.getString(ATLAS_SERVER_ADDRESS_PREFIX +serverId); boolean isSecure = configuration.getBoolean(SecurityProperties.TLS_ENABLED); String protocol = (isSecure) ? "https://" : "ht...
[ "public", "static", "String", "getBoundAddressForId", "(", "Configuration", "configuration", ",", "String", "serverId", ")", "{", "String", "hostPort", "=", "configuration", ".", "getString", "(", "ATLAS_SERVER_ADDRESS_PREFIX", "+", "serverId", ")", ";", "boolean", ...
Get the web server address that a server instance with the passed ID is bound to. This method uses the property {@link SecurityProperties#TLS_ENABLED} to determine whether the URL is http or https. @param configuration underlying configuration @param serverId serverId whose host:port property is picked to build the w...
[ "Get", "the", "web", "server", "address", "that", "a", "server", "instance", "with", "the", "passed", "ID", "is", "bound", "to", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/common/src/main/java/org/apache/atlas/ha/HAConfiguration.java#L86-L91
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/listeners/LoginProcessor.java
LoginProcessor.getApplicationConfiguration
protected org.apache.commons.configuration.Configuration getApplicationConfiguration() { try { return ApplicationProperties.get(); } catch (AtlasException e) { LOG.warn("Error reading application configuration", e); } return null; }
java
protected org.apache.commons.configuration.Configuration getApplicationConfiguration() { try { return ApplicationProperties.get(); } catch (AtlasException e) { LOG.warn("Error reading application configuration", e); } return null; }
[ "protected", "org", ".", "apache", ".", "commons", ".", "configuration", ".", "Configuration", "getApplicationConfiguration", "(", ")", "{", "try", "{", "return", "ApplicationProperties", ".", "get", "(", ")", ";", "}", "catch", "(", "AtlasException", "e", ")"...
Returns the metadata application configuration. @return the metadata configuration. @throws ConfigurationException
[ "Returns", "the", "metadata", "application", "configuration", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/listeners/LoginProcessor.java#L136-L143
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/util/Servlets.java
Servlets.getUserFromRequest
public static String getUserFromRequest(HttpServletRequest httpRequest) { String user = httpRequest.getRemoteUser(); if (!StringUtils.isEmpty(user)) { return user; } user = httpRequest.getParameter("user.name"); // available in query-param if (!StringUtils.isEmpty(us...
java
public static String getUserFromRequest(HttpServletRequest httpRequest) { String user = httpRequest.getRemoteUser(); if (!StringUtils.isEmpty(user)) { return user; } user = httpRequest.getParameter("user.name"); // available in query-param if (!StringUtils.isEmpty(us...
[ "public", "static", "String", "getUserFromRequest", "(", "HttpServletRequest", "httpRequest", ")", "{", "String", "user", "=", "httpRequest", ".", "getRemoteUser", "(", ")", ";", "if", "(", "!", "StringUtils", ".", "isEmpty", "(", "user", ")", ")", "{", "ret...
Returns the user of the given request. @param httpRequest an HTTP servlet request @return the user
[ "Returns", "the", "user", "of", "the", "given", "request", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/util/Servlets.java#L66-L88
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/util/Servlets.java
Servlets.getRequestURI
public static String getRequestURI(HttpServletRequest httpRequest) { final StringBuilder url = new StringBuilder(100).append(httpRequest.getRequestURI()); if (httpRequest.getQueryString() != null) { url.append('?').append(httpRequest.getQueryString()); } return url.toString(...
java
public static String getRequestURI(HttpServletRequest httpRequest) { final StringBuilder url = new StringBuilder(100).append(httpRequest.getRequestURI()); if (httpRequest.getQueryString() != null) { url.append('?').append(httpRequest.getQueryString()); } return url.toString(...
[ "public", "static", "String", "getRequestURI", "(", "HttpServletRequest", "httpRequest", ")", "{", "final", "StringBuilder", "url", "=", "new", "StringBuilder", "(", "100", ")", ".", "append", "(", "httpRequest", ".", "getRequestURI", "(", ")", ")", ";", "if",...
Returns the URI of the given request. @param httpRequest an HTTP servlet request @return the URI, including the query string
[ "Returns", "the", "URI", "of", "the", "given", "request", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/util/Servlets.java#L113-L120
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/service/ActiveInstanceState.java
ActiveInstanceState.update
public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasSe...
java
public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasSe...
[ "public", "void", "update", "(", "String", "serverId", ")", "throws", "AtlasBaseException", "{", "try", "{", "CuratorFramework", "client", "=", "curatorFactory", ".", "clientInstance", "(", ")", ";", "HAConfiguration", ".", "ZookeeperProperties", "zookeeperProperties"...
Update state of the active server instance. This method writes this instance's Server Address to a shared node in Zookeeper. This information is used by other passive instances to locate the current active server. @throws Exception @param serverId ID of this server instance
[ "Update", "state", "of", "the", "active", "server", "instance", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/service/ActiveInstanceState.java#L88-L109
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/service/ActiveInstanceState.java
ActiveInstanceState.getActiveServerAddress
public String getActiveServerAddress() { CuratorFramework client = curatorFactory.clientInstance(); String serverAddress = null; try { HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); byte...
java
public String getActiveServerAddress() { CuratorFramework client = curatorFactory.clientInstance(); String serverAddress = null; try { HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); byte...
[ "public", "String", "getActiveServerAddress", "(", ")", "{", "CuratorFramework", "client", "=", "curatorFactory", ".", "clientInstance", "(", ")", ";", "String", "serverAddress", "=", "null", ";", "try", "{", "HAConfiguration", ".", "ZookeeperProperties", "zookeeper...
Retrieve state of the active server instance. This method reads the active server location from the shared node in Zookeeper. @return the active server's address and port of form http://host-or-ip:port
[ "Retrieve", "state", "of", "the", "active", "server", "instance", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/service/ActiveInstanceState.java#L121-L133
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
EntityREST.deleteByGuid
@DELETE @Path("/guid/{guid}") @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Produces(Servlets.JSON_MEDIA_TYPE) public EntityMutationResponse deleteByGuid(@PathParam("guid") final String guid) throws AtlasBaseException { AtlasPerfTracer perf = null; try { ...
java
@DELETE @Path("/guid/{guid}") @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Produces(Servlets.JSON_MEDIA_TYPE) public EntityMutationResponse deleteByGuid(@PathParam("guid") final String guid) throws AtlasBaseException { AtlasPerfTracer perf = null; try { ...
[ "@", "DELETE", "@", "Path", "(", "\"/guid/{guid}\"", ")", "@", "Consumes", "(", "{", "Servlets", ".", "JSON_MEDIA_TYPE", ",", "MediaType", ".", "APPLICATION_JSON", "}", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "EntityMutati...
Delete an entity identified by its GUID. @param guid GUID for the entity @return EntityMutationResponse
[ "Delete", "an", "entity", "identified", "by", "its", "GUID", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java#L224-L240
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
EntityREST.getClassification
@GET @Path("/guid/{guid}/classification/{classificationName}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasClassification getClassification(@PathParam("guid") String guid, @PathParam("classificationName") final String classificationName) throws AtlasBaseException { AtlasPerfTracer perf = null; ...
java
@GET @Path("/guid/{guid}/classification/{classificationName}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasClassification getClassification(@PathParam("guid") String guid, @PathParam("classificationName") final String classificationName) throws AtlasBaseException { AtlasPerfTracer perf = null; ...
[ "@", "GET", "@", "Path", "(", "\"/guid/{guid}/classification/{classificationName}\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "AtlasClassification", "getClassification", "(", "@", "PathParam", "(", "\"guid\"", ")", "String", "guid...
Gets the list of classifications for a given entity represented by a guid. @param guid globally unique identifier for the entity @return classification for the given entity guid
[ "Gets", "the", "list", "of", "classifications", "for", "a", "given", "entity", "represented", "by", "a", "guid", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java#L276-L296
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
EntityREST.addClassifications
@POST @Path("/guid/{guid}/classifications") @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Produces(Servlets.JSON_MEDIA_TYPE) public void addClassifications(@PathParam("guid") final String guid, List<AtlasClassification> classifications) throws AtlasBaseException { AtlasPerfT...
java
@POST @Path("/guid/{guid}/classifications") @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Produces(Servlets.JSON_MEDIA_TYPE) public void addClassifications(@PathParam("guid") final String guid, List<AtlasClassification> classifications) throws AtlasBaseException { AtlasPerfT...
[ "@", "POST", "@", "Path", "(", "\"/guid/{guid}/classifications\"", ")", "@", "Consumes", "(", "{", "Servlets", ".", "JSON_MEDIA_TYPE", ",", "MediaType", ".", "APPLICATION_JSON", "}", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", ...
Adds classifications to an existing entity represented by a guid. @param guid globally unique identifier for the entity
[ "Adds", "classifications", "to", "an", "existing", "entity", "represented", "by", "a", "guid", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java#L328-L348
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
EntityREST.updateClassification
@PUT @Path("/guid/{guid}/classifications") @Produces(Servlets.JSON_MEDIA_TYPE) public void updateClassification(@PathParam("guid") final String guid, List<AtlasClassification> classifications) throws AtlasBaseException { AtlasPerfTracer perf = null; try { if (AtlasPerfTracer.isP...
java
@PUT @Path("/guid/{guid}/classifications") @Produces(Servlets.JSON_MEDIA_TYPE) public void updateClassification(@PathParam("guid") final String guid, List<AtlasClassification> classifications) throws AtlasBaseException { AtlasPerfTracer perf = null; try { if (AtlasPerfTracer.isP...
[ "@", "PUT", "@", "Path", "(", "\"/guid/{guid}/classifications\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "void", "updateClassification", "(", "@", "PathParam", "(", "\"guid\"", ")", "final", "String", "guid", ",", "List", ...
Updates classifications to an existing entity represented by a guid. @param guid globally unique identifier for the entity @return classification for the given entity guid
[ "Updates", "classifications", "to", "an", "existing", "entity", "represented", "by", "a", "guid", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java#L355-L375
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
EntityREST.deleteClassification
@DELETE @Path("/guid/{guid}/classification/{classificationName}") @Produces(Servlets.JSON_MEDIA_TYPE) public void deleteClassification(@PathParam("guid") String guid, @PathParam("classificationName") final String classificationName) throws AtlasBaseException { At...
java
@DELETE @Path("/guid/{guid}/classification/{classificationName}") @Produces(Servlets.JSON_MEDIA_TYPE) public void deleteClassification(@PathParam("guid") String guid, @PathParam("classificationName") final String classificationName) throws AtlasBaseException { At...
[ "@", "DELETE", "@", "Path", "(", "\"/guid/{guid}/classification/{classificationName}\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "void", "deleteClassification", "(", "@", "PathParam", "(", "\"guid\"", ")", "String", "guid", ",",...
Deletes a given classification from an existing entity represented by a guid. @param guid globally unique identifier for the entity @param classificationName name of the classifcation
[ "Deletes", "a", "given", "classification", "from", "an", "existing", "entity", "represented", "by", "a", "guid", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java#L382-L404
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
EntityREST.getByGuids
@GET @Path("/bulk") @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasEntitiesWithExtInfo getByGuids(@QueryParam("guid") List<String> guids) throws AtlasBaseException { AtlasPerfTracer perf = null; try { if (AtlasPerfTracer.isPerfTraceEnable...
java
@GET @Path("/bulk") @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasEntitiesWithExtInfo getByGuids(@QueryParam("guid") List<String> guids) throws AtlasBaseException { AtlasPerfTracer perf = null; try { if (AtlasPerfTracer.isPerfTraceEnable...
[ "@", "GET", "@", "Path", "(", "\"/bulk\"", ")", "@", "Consumes", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "AtlasEntitiesWithExtInfo", "getByGuids", "(", "@", "QueryParam", "(", "\"gu...
Bulk API to retrieve list of entities identified by its GUIDs.
[ "Bulk", "API", "to", "retrieve", "list", "of", "entities", "identified", "by", "its", "GUIDs", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java#L413-L433
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
EntityREST.deleteByGuids
@DELETE @Path("/bulk") @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public EntityMutationResponse deleteByGuids(@QueryParam("guid") final List<String> guids) throws AtlasBaseException { AtlasPerfTracer perf = null; try { if (AtlasPerfTracer.isPerfT...
java
@DELETE @Path("/bulk") @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public EntityMutationResponse deleteByGuids(@QueryParam("guid") final List<String> guids) throws AtlasBaseException { AtlasPerfTracer perf = null; try { if (AtlasPerfTracer.isPerfT...
[ "@", "DELETE", "@", "Path", "(", "\"/bulk\"", ")", "@", "Consumes", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "EntityMutationResponse", "deleteByGuids", "(", "@", "QueryParam", "(", "...
Bulk API to delete list of entities identified by its GUIDs
[ "Bulk", "API", "to", "delete", "list", "of", "entities", "identified", "by", "its", "GUIDs" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java#L463-L479
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
EntityREST.addClassification
@POST @Path("/bulk/classification") @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Produces(Servlets.JSON_MEDIA_TYPE) public void addClassification(ClassificationAssociateRequest request) throws AtlasBaseException { AtlasPerfTracer perf = null; try { if (...
java
@POST @Path("/bulk/classification") @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Produces(Servlets.JSON_MEDIA_TYPE) public void addClassification(ClassificationAssociateRequest request) throws AtlasBaseException { AtlasPerfTracer perf = null; try { if (...
[ "@", "POST", "@", "Path", "(", "\"/bulk/classification\"", ")", "@", "Consumes", "(", "{", "Servlets", ".", "JSON_MEDIA_TYPE", ",", "MediaType", ".", "APPLICATION_JSON", "}", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "void",...
Bulk API to associate a tag to multiple entities
[ "Bulk", "API", "to", "associate", "a", "tag", "to", "multiple", "entities" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java#L484-L511
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
EntityREST.validateUniqueAttribute
private void validateUniqueAttribute(AtlasEntityType entityType, Map<String, Object> attributes) throws AtlasBaseException { if (MapUtils.isEmpty(attributes)) { throw new AtlasBaseException(AtlasErrorCode.ATTRIBUTE_UNIQUE_INVALID, entityType.getTypeName(), ""); } for (String attribu...
java
private void validateUniqueAttribute(AtlasEntityType entityType, Map<String, Object> attributes) throws AtlasBaseException { if (MapUtils.isEmpty(attributes)) { throw new AtlasBaseException(AtlasErrorCode.ATTRIBUTE_UNIQUE_INVALID, entityType.getTypeName(), ""); } for (String attribu...
[ "private", "void", "validateUniqueAttribute", "(", "AtlasEntityType", "entityType", ",", "Map", "<", "String", ",", "Object", ">", "attributes", ")", "throws", "AtlasBaseException", "{", "if", "(", "MapUtils", ".", "isEmpty", "(", "attributes", ")", ")", "{", ...
Validate that each attribute given is an unique attribute @param entityType the entity type @param attributes attributes
[ "Validate", "that", "each", "attribute", "given", "is", "an", "unique", "attribute" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java#L557-L569
train
apache/incubator-atlas
common/src/main/java/org/apache/atlas/utils/ParamChecker.java
ParamChecker.notNull
public static <T> T notNull(T obj, String name) { if (obj == null) { throw new IllegalArgumentException(name + " cannot be null"); } return obj; }
java
public static <T> T notNull(T obj, String name) { if (obj == null) { throw new IllegalArgumentException(name + " cannot be null"); } return obj; }
[ "public", "static", "<", "T", ">", "T", "notNull", "(", "T", "obj", ",", "String", "name", ")", "{", "if", "(", "obj", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "name", "+", "\" cannot be null\"", ")", ";", "}", "return",...
Check that a value is not null. If null throws an IllegalArgumentException. @param obj value. @param name parameter name for the exception message. @return the given value.
[ "Check", "that", "a", "value", "is", "not", "null", ".", "If", "null", "throws", "an", "IllegalArgumentException", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/common/src/main/java/org/apache/atlas/utils/ParamChecker.java#L38-L43
train
apache/incubator-atlas
common/src/main/java/org/apache/atlas/utils/ParamChecker.java
ParamChecker.notEmpty
public static <T> Collection<T> notEmpty(Collection<T> list, String name) { notNull(list, name); if (list.isEmpty()) { throw new IllegalArgumentException(String.format("Collection %s is empty", name)); } return list; }
java
public static <T> Collection<T> notEmpty(Collection<T> list, String name) { notNull(list, name); if (list.isEmpty()) { throw new IllegalArgumentException(String.format("Collection %s is empty", name)); } return list; }
[ "public", "static", "<", "T", ">", "Collection", "<", "T", ">", "notEmpty", "(", "Collection", "<", "T", ">", "list", ",", "String", "name", ")", "{", "notNull", "(", "list", ",", "name", ")", ";", "if", "(", "list", ".", "isEmpty", "(", ")", ")"...
Check that a list is not null and not empty. @param list the list of T. @param name parameter name for the exception message.
[ "Check", "that", "a", "list", "is", "not", "null", "and", "not", "empty", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/common/src/main/java/org/apache/atlas/utils/ParamChecker.java#L78-L84
train
apache/incubator-atlas
common/src/main/java/org/apache/atlas/utils/ParamChecker.java
ParamChecker.lessThan
public static void lessThan(long value, long maxValue, String name) { if (value <= 0) { throw new IllegalArgumentException(name + " should be > 0, current value " + value); } if (value > maxValue) { throw new IllegalArgumentException(name + " should be <= " + maxValue + "...
java
public static void lessThan(long value, long maxValue, String name) { if (value <= 0) { throw new IllegalArgumentException(name + " should be > 0, current value " + value); } if (value > maxValue) { throw new IllegalArgumentException(name + " should be <= " + maxValue + "...
[ "public", "static", "void", "lessThan", "(", "long", "value", ",", "long", "maxValue", ",", "String", "name", ")", "{", "if", "(", "value", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "name", "+", "\" should be > 0, current value \"",...
Checks that the given value is <= max value. @param value @param maxValue @param name
[ "Checks", "that", "the", "given", "value", "is", "<", "=", "max", "value", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/common/src/main/java/org/apache/atlas/utils/ParamChecker.java#L147-L154
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
TypesREST.getTypeDefByName
@GET @Path("/typedef/name/{name}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasBaseTypeDef getTypeDefByName(@PathParam("name") String name) throws AtlasBaseException { AtlasBaseTypeDef ret = typeDefStore.getByName(name); return ret; }
java
@GET @Path("/typedef/name/{name}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasBaseTypeDef getTypeDefByName(@PathParam("name") String name) throws AtlasBaseException { AtlasBaseTypeDef ret = typeDefStore.getByName(name); return ret; }
[ "@", "GET", "@", "Path", "(", "\"/typedef/name/{name}\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "AtlasBaseTypeDef", "getTypeDefByName", "(", "@", "PathParam", "(", "\"name\"", ")", "String", "name", ")", "throws", "AtlasBa...
Get type definition by it's name @param name Type name @return Type definition @throws AtlasBaseException @HTTP 200 Successful lookup by name @HTTP 404 Failed lookup by name
[ "Get", "type", "definition", "by", "it", "s", "name" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java#L63-L70
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
TypesREST.getEnumDefByGuid
@GET @Path("/enumdef/guid/{guid}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasEnumDef getEnumDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { AtlasEnumDef ret = typeDefStore.getEnumDefByGuid(guid); return ret; }
java
@GET @Path("/enumdef/guid/{guid}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasEnumDef getEnumDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { AtlasEnumDef ret = typeDefStore.getEnumDefByGuid(guid); return ret; }
[ "@", "GET", "@", "Path", "(", "\"/enumdef/guid/{guid}\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "AtlasEnumDef", "getEnumDefByGuid", "(", "@", "PathParam", "(", "\"guid\"", ")", "String", "guid", ")", "throws", "AtlasBaseEx...
Get the enum definition for the given guid @param guid enum guid @return enum definition @throws AtlasBaseException @HTTP 200 On successful lookup of the the enum definition by it's guid @HTTP 404 On Failed lookup for the given guid
[ "Get", "the", "enum", "definition", "for", "the", "given", "guid" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java#L148-L155
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
TypesREST.getStructDefByGuid
@GET @Path("/structdef/guid/{guid}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasStructDef getStructDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { AtlasStructDef ret = typeDefStore.getStructDefByGuid(guid); return ret; }
java
@GET @Path("/structdef/guid/{guid}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasStructDef getStructDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { AtlasStructDef ret = typeDefStore.getStructDefByGuid(guid); return ret; }
[ "@", "GET", "@", "Path", "(", "\"/structdef/guid/{guid}\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "AtlasStructDef", "getStructDefByGuid", "(", "@", "PathParam", "(", "\"guid\"", ")", "String", "guid", ")", "throws", "Atlas...
Get the struct definition for the given guid @param guid struct guid @return struct definition @throws AtlasBaseException @HTTP 200 On successful lookup of the the struct definition by it's guid @HTTP 404 On Failed lookup for the given guid
[ "Get", "the", "struct", "definition", "for", "the", "given", "guid" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java#L183-L190
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
TypesREST.getClassificationDefByGuid
@GET @Path("/classificationdef/guid/{guid}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasClassificationDef getClassificationDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { AtlasClassificationDef ret = typeDefStore.getClassificationDefByGuid(guid); return ret; }
java
@GET @Path("/classificationdef/guid/{guid}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasClassificationDef getClassificationDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { AtlasClassificationDef ret = typeDefStore.getClassificationDefByGuid(guid); return ret; }
[ "@", "GET", "@", "Path", "(", "\"/classificationdef/guid/{guid}\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "AtlasClassificationDef", "getClassificationDefByGuid", "(", "@", "PathParam", "(", "\"guid\"", ")", "String", "guid", "...
Get the classification definition for the given guid @param guid classification guid @return classification definition @throws AtlasBaseException @HTTP 200 On successful lookup of the the classification definition by it's guid @HTTP 404 On Failed lookup for the given guid
[ "Get", "the", "classification", "definition", "for", "the", "given", "guid" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java#L217-L224
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
TypesREST.getEntityDefByGuid
@GET @Path("/entitydef/guid/{guid}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasEntityDef getEntityDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { AtlasEntityDef ret = typeDefStore.getEntityDefByGuid(guid); return ret; }
java
@GET @Path("/entitydef/guid/{guid}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasEntityDef getEntityDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { AtlasEntityDef ret = typeDefStore.getEntityDefByGuid(guid); return ret; }
[ "@", "GET", "@", "Path", "(", "\"/entitydef/guid/{guid}\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "AtlasEntityDef", "getEntityDefByGuid", "(", "@", "PathParam", "(", "\"guid\"", ")", "String", "guid", ")", "throws", "Atlas...
Get the Entity definition for the given guid @param guid entity guid @return Entity definition @throws AtlasBaseException @HTTP 200 On successful lookup of the the entity definition by it's guid @HTTP 404 On Failed lookup for the given guid
[ "Get", "the", "Entity", "definition", "for", "the", "given", "guid" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java#L251-L258
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
TypesREST.getRelationshipDefByGuid
@GET @Path("/relationshipdef/guid/{guid}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasRelationshipDef getRelationshipDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { AtlasRelationshipDef ret = typeDefStore.getRelationshipDefByGuid(guid); return ret; }
java
@GET @Path("/relationshipdef/guid/{guid}") @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasRelationshipDef getRelationshipDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { AtlasRelationshipDef ret = typeDefStore.getRelationshipDefByGuid(guid); return ret; }
[ "@", "GET", "@", "Path", "(", "\"/relationshipdef/guid/{guid}\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "AtlasRelationshipDef", "getRelationshipDefByGuid", "(", "@", "PathParam", "(", "\"guid\"", ")", "String", "guid", ")", ...
Get the relationship definition for the given guid @param guid relationship guid @return relationship definition @throws AtlasBaseException @HTTP 200 On successful lookup of the the relationship definition by it's guid @HTTP 404 On Failed lookup for the given guid
[ "Get", "the", "relationship", "definition", "for", "the", "given", "guid" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java#L284-L291
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
TypesREST.getSearchFilter
private SearchFilter getSearchFilter(HttpServletRequest httpServletRequest) { SearchFilter ret = new SearchFilter(); Set<String> keySet = httpServletRequest.getParameterMap().keySet(); for (String key : keySet) { ret.setParam(String.valueOf(key), String.valueOf(httpServletRequest.get...
java
private SearchFilter getSearchFilter(HttpServletRequest httpServletRequest) { SearchFilter ret = new SearchFilter(); Set<String> keySet = httpServletRequest.getParameterMap().keySet(); for (String key : keySet) { ret.setParam(String.valueOf(key), String.valueOf(httpServletRequest.get...
[ "private", "SearchFilter", "getSearchFilter", "(", "HttpServletRequest", "httpServletRequest", ")", "{", "SearchFilter", "ret", "=", "new", "SearchFilter", "(", ")", ";", "Set", "<", "String", ">", "keySet", "=", "httpServletRequest", ".", "getParameterMap", "(", ...
Populate a SearchFilter on the basis of the Query Parameters @return
[ "Populate", "a", "SearchFilter", "on", "the", "basis", "of", "the", "Query", "Parameters" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java#L382-L390
train
apache/incubator-atlas
typesystem/src/main/java/org/apache/atlas/typesystem/Referenceable.java
Referenceable.equalsContents
public boolean equalsContents(Object o) { if(this == o) { return true; } if(o == null) { return false; } if (o.getClass() != getClass()) { return false; } if(!super.equalsContents(o)) { return false; } ...
java
public boolean equalsContents(Object o) { if(this == o) { return true; } if(o == null) { return false; } if (o.getClass() != getClass()) { return false; } if(!super.equalsContents(o)) { return false; } ...
[ "public", "boolean", "equalsContents", "(", "Object", "o", ")", "{", "if", "(", "this", "==", "o", ")", "{", "return", "true", ";", "}", "if", "(", "o", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "o", ".", "getClass", "(", ...
Matches traits, values associated with this Referenceable and skips the id match @param o The Referenceable which needs to be matched with @return
[ "Matches", "traits", "values", "associated", "with", "this", "Referenceable", "and", "skips", "the", "id", "match" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/typesystem/src/main/java/org/apache/atlas/typesystem/Referenceable.java#L182-L203
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java
AtlasEntityStoreV1.validateEntityAssociations
private void validateEntityAssociations(String guid, List<AtlasClassification> classifications) throws AtlasBaseException { List<String> entityClassifications = getClassificationNames(guid); for (AtlasClassification classification : classifications) { String newClassification = classificati...
java
private void validateEntityAssociations(String guid, List<AtlasClassification> classifications) throws AtlasBaseException { List<String> entityClassifications = getClassificationNames(guid); for (AtlasClassification classification : classifications) { String newClassification = classificati...
[ "private", "void", "validateEntityAssociations", "(", "String", "guid", ",", "List", "<", "AtlasClassification", ">", "classifications", ")", "throws", "AtlasBaseException", "{", "List", "<", "String", ">", "entityClassifications", "=", "getClassificationNames", "(", ...
Validate if classification is not already associated with the entities @param guid unique entity id @param classifications list of classifications to be associated
[ "Validate", "if", "classification", "is", "not", "already", "associated", "with", "the", "entities" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java#L726-L737
train
apache/incubator-atlas
graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/graphson/AtlasElementPropertyConfig.java
AtlasElementPropertyConfig.includeProperties
public static AtlasElementPropertyConfig includeProperties(final Set<String> vertexPropertyKeys, final Set<String> edgePropertyKeys) { return new AtlasElementPropertyConfig(vertexPropertyKeys, edgePropertyKeys, ElementPropertiesRule.INCLUDE, ...
java
public static AtlasElementPropertyConfig includeProperties(final Set<String> vertexPropertyKeys, final Set<String> edgePropertyKeys) { return new AtlasElementPropertyConfig(vertexPropertyKeys, edgePropertyKeys, ElementPropertiesRule.INCLUDE, ...
[ "public", "static", "AtlasElementPropertyConfig", "includeProperties", "(", "final", "Set", "<", "String", ">", "vertexPropertyKeys", ",", "final", "Set", "<", "String", ">", "edgePropertyKeys", ")", "{", "return", "new", "AtlasElementPropertyConfig", "(", "vertexProp...
Construct a configuration that includes the specified properties from both vertices and edges.
[ "Construct", "a", "configuration", "that", "includes", "the", "specified", "properties", "from", "both", "vertices", "and", "edges", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/graphson/AtlasElementPropertyConfig.java#L70-L74
train
apache/incubator-atlas
graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/graphson/AtlasElementPropertyConfig.java
AtlasElementPropertyConfig.excludeProperties
public static AtlasElementPropertyConfig excludeProperties(final Set<String> vertexPropertyKeys, final Set<String> edgePropertyKeys) { return new AtlasElementPropertyConfig(vertexPropertyKeys, edgePropertyKeys, ElementPropertiesRule.EXCLUDE, ...
java
public static AtlasElementPropertyConfig excludeProperties(final Set<String> vertexPropertyKeys, final Set<String> edgePropertyKeys) { return new AtlasElementPropertyConfig(vertexPropertyKeys, edgePropertyKeys, ElementPropertiesRule.EXCLUDE, ...
[ "public", "static", "AtlasElementPropertyConfig", "excludeProperties", "(", "final", "Set", "<", "String", ">", "vertexPropertyKeys", ",", "final", "Set", "<", "String", ">", "edgePropertyKeys", ")", "{", "return", "new", "AtlasElementPropertyConfig", "(", "vertexProp...
Construct a configuration that excludes the specified properties from both vertices and edges.
[ "Construct", "a", "configuration", "that", "excludes", "the", "specified", "properties", "from", "both", "vertices", "and", "edges", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/graphson/AtlasElementPropertyConfig.java#L87-L91
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
DiscoveryREST.searchUsingDSL
@GET @Path("/dsl") @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasSearchResult searchUsingDSL(@QueryParam("query") String query, @QueryParam("typeName") String typeName, ...
java
@GET @Path("/dsl") @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasSearchResult searchUsingDSL(@QueryParam("query") String query, @QueryParam("typeName") String typeName, ...
[ "@", "GET", "@", "Path", "(", "\"/dsl\"", ")", "@", "Consumes", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "AtlasSearchResult", "searchUsingDSL", "(", "@", "QueryParam", "(", "\"query\...
Retrieve data for the specified DSL @param query DSL query @param typeName limit the result to only entities of specified type or its sub-types @param classification limit the result to only entities tagged with the given classification or or its sub-types @param limit limit the result set to only include the specified...
[ "Retrieve", "data", "for", "the", "specified", "DSL" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java#L70-L104
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
DiscoveryREST.searchUsingAttribute
@GET @Path("/attribute") @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasSearchResult searchUsingAttribute(@QueryParam("attrName") String attrName, @QueryParam("attrValuePrefix") String attrValuePrefix, ...
java
@GET @Path("/attribute") @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasSearchResult searchUsingAttribute(@QueryParam("attrName") String attrName, @QueryParam("attrValuePrefix") String attrValuePrefix, ...
[ "@", "GET", "@", "Path", "(", "\"/attribute\"", ")", "@", "Consumes", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "AtlasSearchResult", "searchUsingAttribute", "(", "@", "QueryParam", "(",...
Retrieve data for the specified attribute search query @param attrName Attribute name @param attrValuePrefix Attibute value to search on @param typeName limit the result to only entities of specified type or its sub-types @param limit limit the result set to only include the specified number of entries @param offset s...
[ "Retrieve", "data", "for", "the", "specified", "attribute", "search", "query" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java#L190-L217
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
EntityResource.getEntityDefinition
@GET @Path("{guid}") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getEntityDefinition(@PathParam("guid") String guid) { if (LOG.isDebugEnabled()) { LOG.debug("==> EntityResource.getEntityDefinition({})", guid); } AtlasPerfTracer perf = null; try { ...
java
@GET @Path("{guid}") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getEntityDefinition(@PathParam("guid") String guid) { if (LOG.isDebugEnabled()) { LOG.debug("==> EntityResource.getEntityDefinition({})", guid); } AtlasPerfTracer perf = null; try { ...
[ "@", "GET", "@", "Path", "(", "\"{guid}\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "Response", "getEntityDefinition", "(", "@", "PathParam", "(", "\"guid\"", ")", "String", "guid", ")", "{", "if", "(", "LOG", ".", "...
Fetch the complete definition of an entity given its GUID. @param guid GUID for the entity
[ "Fetch", "the", "complete", "definition", "of", "an", "entity", "given", "its", "GUID", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java#L650-L704
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
EntityResource.getEntityListByType
public Response getEntityListByType(String entityType) { try { Preconditions.checkNotNull(entityType, "Entity type cannot be null"); if (LOG.isDebugEnabled()) { LOG.debug("Fetching entity list for type={} ", entityType); } final List<String> enti...
java
public Response getEntityListByType(String entityType) { try { Preconditions.checkNotNull(entityType, "Entity type cannot be null"); if (LOG.isDebugEnabled()) { LOG.debug("Fetching entity list for type={} ", entityType); } final List<String> enti...
[ "public", "Response", "getEntityListByType", "(", "String", "entityType", ")", "{", "try", "{", "Preconditions", ".", "checkNotNull", "(", "entityType", ",", "\"Entity type cannot be null\"", ")", ";", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{",...
Gets the list of entities for a given entity type. @param entityType name of a type which is unique
[ "Gets", "the", "list", "of", "entities", "for", "a", "given", "entity", "type", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java#L711-L741
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
EntityResource.getEntityDefinitionByAttribute
public Response getEntityDefinitionByAttribute(String entityType, String attribute, String value) { try { if (LOG.isDebugEnabled()) { LOG.debug("Fetching entity definition for type={}, qualified name={}", entityType, value); } entityType = ParamChecker.notEmp...
java
public Response getEntityDefinitionByAttribute(String entityType, String attribute, String value) { try { if (LOG.isDebugEnabled()) { LOG.debug("Fetching entity definition for type={}, qualified name={}", entityType, value); } entityType = ParamChecker.notEmp...
[ "public", "Response", "getEntityDefinitionByAttribute", "(", "String", "entityType", ",", "String", "attribute", ",", "String", "value", ")", "{", "try", "{", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "LOG", ".", "debug", "(", "\"Fetching ...
Fetch the complete definition of an entity given its qualified name. @param entityType @param attribute @param value
[ "Fetch", "the", "complete", "definition", "of", "an", "entity", "given", "its", "qualified", "name", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java#L782-L840
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
EntityResource.getTraitDefinitionsForEntity
@GET @Path("{guid}/traitDefinitions") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getTraitDefinitionsForEntity(@PathParam("guid") String guid){ if (LOG.isDebugEnabled()) { LOG.debug("==> EntityResource.getTraitDefinitionsForEntity({})", guid); } AtlasPerfTracer p...
java
@GET @Path("{guid}/traitDefinitions") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getTraitDefinitionsForEntity(@PathParam("guid") String guid){ if (LOG.isDebugEnabled()) { LOG.debug("==> EntityResource.getTraitDefinitionsForEntity({})", guid); } AtlasPerfTracer p...
[ "@", "GET", "@", "Path", "(", "\"{guid}/traitDefinitions\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "Response", "getTraitDefinitionsForEntity", "(", "@", "PathParam", "(", "\"guid\"", ")", "String", "guid", ")", "{", "if", ...
Fetches the trait definitions of all the traits associated to the given entity @param guid globally unique identifier for the entity
[ "Fetches", "the", "trait", "definitions", "of", "all", "the", "traits", "associated", "to", "the", "given", "entity" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java#L907-L958
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
EntityResource.getTraitDefinitionForEntity
@GET @Path("{guid}/traitDefinitions/{traitName}") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getTraitDefinitionForEntity(@PathParam("guid") String guid, @PathParam("traitName") String traitName){ if (LOG.isDebugEnabled()) { LOG.debug("==> EntityResource.getTraitDefinitionForEnti...
java
@GET @Path("{guid}/traitDefinitions/{traitName}") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getTraitDefinitionForEntity(@PathParam("guid") String guid, @PathParam("traitName") String traitName){ if (LOG.isDebugEnabled()) { LOG.debug("==> EntityResource.getTraitDefinitionForEnti...
[ "@", "GET", "@", "Path", "(", "\"{guid}/traitDefinitions/{traitName}\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "Response", "getTraitDefinitionForEntity", "(", "@", "PathParam", "(", "\"guid\"", ")", "String", "guid", ",", "@...
Fetches the trait definition for an entity given its guid and trait name @param guid globally unique identifier for the entity @param traitName name of the trait
[ "Fetches", "the", "trait", "definition", "for", "an", "entity", "given", "its", "guid", "and", "trait", "name" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java#L966-L1014
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
EntityResource.getAuditEvents
@GET @Path("{guid}/audit") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getAuditEvents(@PathParam("guid") String guid, @QueryParam("startKey") String startKey, @QueryParam("count") @DefaultValue("100") short count) { if (LOG.isDebugEnabled()) { L...
java
@GET @Path("{guid}/audit") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getAuditEvents(@PathParam("guid") String guid, @QueryParam("startKey") String startKey, @QueryParam("count") @DefaultValue("100") short count) { if (LOG.isDebugEnabled()) { L...
[ "@", "GET", "@", "Path", "(", "\"{guid}/audit\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "Response", "getAuditEvents", "(", "@", "PathParam", "(", "\"guid\"", ")", "String", "guid", ",", "@", "QueryParam", "(", "\"start...
Returns the entity audit events for a given entity id. The events are returned in the decreasing order of timestamp. @param guid entity id @param startKey used for pagination. Startkey is inclusive, the returned results contain the event with the given startkey. First time getAuditEvents() is called for an entity, star...
[ "Returns", "the", "entity", "audit", "events", "for", "a", "given", "entity", "id", ".", "The", "events", "are", "returned", "in", "the", "decreasing", "order", "of", "timestamp", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java#L1143-L1185
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java
GremlinExpressionFactory.isOrderExpression
public boolean isOrderExpression(GroovyExpression expr) { if (expr instanceof FunctionCallExpression) { FunctionCallExpression functionCallExpression = (FunctionCallExpression) expr; if (functionCallExpression.getFunctionName().equals(ORDER_METHOD)) { return true; ...
java
public boolean isOrderExpression(GroovyExpression expr) { if (expr instanceof FunctionCallExpression) { FunctionCallExpression functionCallExpression = (FunctionCallExpression) expr; if (functionCallExpression.getFunctionName().equals(ORDER_METHOD)) { return true; ...
[ "public", "boolean", "isOrderExpression", "(", "GroovyExpression", "expr", ")", "{", "if", "(", "expr", "instanceof", "FunctionCallExpression", ")", "{", "FunctionCallExpression", "functionCallExpression", "=", "(", "FunctionCallExpression", ")", "expr", ";", "if", "(...
Determines if specified expression is an order method call @param expr @return
[ "Determines", "if", "specified", "expression", "is", "an", "order", "method", "call" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java#L242-L250
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java
GremlinExpressionFactory.generateUnaryHasExpression
public GroovyExpression generateUnaryHasExpression(GroovyExpression parent, String fieldName) { return new FunctionCallExpression(TraversalStepType.FILTER, parent, HAS_METHOD, new LiteralExpression(fieldName)); }
java
public GroovyExpression generateUnaryHasExpression(GroovyExpression parent, String fieldName) { return new FunctionCallExpression(TraversalStepType.FILTER, parent, HAS_METHOD, new LiteralExpression(fieldName)); }
[ "public", "GroovyExpression", "generateUnaryHasExpression", "(", "GroovyExpression", "parent", ",", "String", "fieldName", ")", "{", "return", "new", "FunctionCallExpression", "(", "TraversalStepType", ".", "FILTER", ",", "parent", ",", "HAS_METHOD", ",", "new", "Lite...
Generates an expression which checks whether the vertices in the query have a field with the given name. @param parent @param fieldName @return
[ "Generates", "an", "expression", "which", "checks", "whether", "the", "vertices", "in", "the", "query", "have", "a", "field", "with", "the", "given", "name", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java#L421-L423
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java
GremlinExpressionFactory.generateLoopEmitExpression
protected GroovyExpression generateLoopEmitExpression(GraphPersistenceStrategies s, IDataType dataType) { return typeTestExpression(s, dataType.getName(), getCurrentObjectExpression()); }
java
protected GroovyExpression generateLoopEmitExpression(GraphPersistenceStrategies s, IDataType dataType) { return typeTestExpression(s, dataType.getName(), getCurrentObjectExpression()); }
[ "protected", "GroovyExpression", "generateLoopEmitExpression", "(", "GraphPersistenceStrategies", "s", ",", "IDataType", "dataType", ")", "{", "return", "typeTestExpression", "(", "s", ",", "dataType", ".", "getName", "(", ")", ",", "getCurrentObjectExpression", "(", ...
Generates the emit expression used in loop expressions. @param s @param dataType @return
[ "Generates", "the", "emit", "expression", "used", "in", "loop", "expressions", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java#L441-L443
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java
GremlinExpressionFactory.generateAliasExpression
public GroovyExpression generateAliasExpression(GroovyExpression parent, String alias) { return new FunctionCallExpression(TraversalStepType.SIDE_EFFECT, parent, AS_METHOD, new LiteralExpression(alias)); }
java
public GroovyExpression generateAliasExpression(GroovyExpression parent, String alias) { return new FunctionCallExpression(TraversalStepType.SIDE_EFFECT, parent, AS_METHOD, new LiteralExpression(alias)); }
[ "public", "GroovyExpression", "generateAliasExpression", "(", "GroovyExpression", "parent", ",", "String", "alias", ")", "{", "return", "new", "FunctionCallExpression", "(", "TraversalStepType", ".", "SIDE_EFFECT", ",", "parent", ",", "AS_METHOD", ",", "new", "Literal...
Generates an alias expression @param parent @param alias @return
[ "Generates", "an", "alias", "expression" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java#L452-L454
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java
GremlinExpressionFactory.generateAdjacentVerticesExpression
public GroovyExpression generateAdjacentVerticesExpression(GroovyExpression parent, AtlasEdgeDirection dir) { return new FunctionCallExpression(TraversalStepType.FLAT_MAP_TO_ELEMENTS, parent, getGremlinFunctionName(dir)); }
java
public GroovyExpression generateAdjacentVerticesExpression(GroovyExpression parent, AtlasEdgeDirection dir) { return new FunctionCallExpression(TraversalStepType.FLAT_MAP_TO_ELEMENTS, parent, getGremlinFunctionName(dir)); }
[ "public", "GroovyExpression", "generateAdjacentVerticesExpression", "(", "GroovyExpression", "parent", ",", "AtlasEdgeDirection", "dir", ")", "{", "return", "new", "FunctionCallExpression", "(", "TraversalStepType", ".", "FLAT_MAP_TO_ELEMENTS", ",", "parent", ",", "getGreml...
Generates an expression that gets the vertices adjacent to the vertex in 'parent' in the specified direction. @param parent @param dir @return
[ "Generates", "an", "expression", "that", "gets", "the", "vertices", "adjacent", "to", "the", "vertex", "in", "parent", "in", "the", "specified", "direction", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java#L464-L466
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java
GremlinExpressionFactory.generateAdjacentVerticesExpression
public GroovyExpression generateAdjacentVerticesExpression(GroovyExpression parent, AtlasEdgeDirection dir, String label) { return new FunctionCallExpression(TraversalStepType.FLAT_MAP_TO_ELEMENTS, parent, getGremlinFunctionName(dir), new LiteralExpression(label)); }
java
public GroovyExpression generateAdjacentVerticesExpression(GroovyExpression parent, AtlasEdgeDirection dir, String label) { return new FunctionCallExpression(TraversalStepType.FLAT_MAP_TO_ELEMENTS, parent, getGremlinFunctionName(dir), new LiteralExpression(label)); }
[ "public", "GroovyExpression", "generateAdjacentVerticesExpression", "(", "GroovyExpression", "parent", ",", "AtlasEdgeDirection", "dir", ",", "String", "label", ")", "{", "return", "new", "FunctionCallExpression", "(", "TraversalStepType", ".", "FLAT_MAP_TO_ELEMENTS", ",", ...
Generates an expression that gets the vertices adjacent to the vertex in 'parent' in the specified direction, following only edges with the given label. @param parent @param dir @return
[ "Generates", "an", "expression", "that", "gets", "the", "vertices", "adjacent", "to", "the", "vertex", "in", "parent", "in", "the", "specified", "direction", "following", "only", "edges", "with", "the", "given", "label", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java#L489-L492
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java
GremlinExpressionFactory.generateCountExpression
public GroovyExpression generateCountExpression(GroovyExpression itExpr) { GroovyExpression collectionExpr = new CastExpression(itExpr,"Collection"); return new FunctionCallExpression(collectionExpr, "size"); }
java
public GroovyExpression generateCountExpression(GroovyExpression itExpr) { GroovyExpression collectionExpr = new CastExpression(itExpr,"Collection"); return new FunctionCallExpression(collectionExpr, "size"); }
[ "public", "GroovyExpression", "generateCountExpression", "(", "GroovyExpression", "itExpr", ")", "{", "GroovyExpression", "collectionExpr", "=", "new", "CastExpression", "(", "itExpr", ",", "\"Collection\"", ")", ";", "return", "new", "FunctionCallExpression", "(", "col...
assumes cast already performed
[ "assumes", "cast", "already", "performed" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java#L525-L528
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java
GremlinExpressionFactory.getAliasNameIfRelevant
public String getAliasNameIfRelevant(GroovyExpression expr) { if(!(expr instanceof FunctionCallExpression)) { return null; } FunctionCallExpression fc = (FunctionCallExpression)expr; if(! fc.getFunctionName().equals(AS_METHOD)) { return null; } Lite...
java
public String getAliasNameIfRelevant(GroovyExpression expr) { if(!(expr instanceof FunctionCallExpression)) { return null; } FunctionCallExpression fc = (FunctionCallExpression)expr; if(! fc.getFunctionName().equals(AS_METHOD)) { return null; } Lite...
[ "public", "String", "getAliasNameIfRelevant", "(", "GroovyExpression", "expr", ")", "{", "if", "(", "!", "(", "expr", "instanceof", "FunctionCallExpression", ")", ")", "{", "return", "null", ";", "}", "FunctionCallExpression", "fc", "=", "(", "FunctionCallExpressi...
Checks if the given expression is an alias expression, and if so returns the alias from the expression. Otherwise, null is returned.
[ "Checks", "if", "the", "given", "expression", "is", "an", "alias", "expression", "and", "if", "so", "returns", "the", "alias", "from", "the", "expression", ".", "Otherwise", "null", "is", "returned", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java#L644-L655
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java
AdminResource.getThreadDump
@GET @Path("stack") @Produces(MediaType.TEXT_PLAIN) public String getThreadDump() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getThreadDump()"); } ThreadGroup topThreadGroup = Thread.currentThread().getThreadGroup(); while (topThreadGroup.getParen...
java
@GET @Path("stack") @Produces(MediaType.TEXT_PLAIN) public String getThreadDump() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getThreadDump()"); } ThreadGroup topThreadGroup = Thread.currentThread().getThreadGroup(); while (topThreadGroup.getParen...
[ "@", "GET", "@", "Path", "(", "\"stack\"", ")", "@", "Produces", "(", "MediaType", ".", "TEXT_PLAIN", ")", "public", "String", "getThreadDump", "(", ")", "{", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "LOG", ".", "debug", "(", "\"=...
Fetches the thread stack dump for this application. @return json representing the thread stack dump.
[ "Fetches", "the", "thread", "stack", "dump", "for", "this", "application", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java#L141-L170
train
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java
AdminResource.getVersion
@GET @Path("version") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getVersion() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getVersion()"); } if (version == null) { try { PropertiesConfiguration configProperties = new Pro...
java
@GET @Path("version") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getVersion() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getVersion()"); } if (version == null) { try { PropertiesConfiguration configProperties = new Pro...
[ "@", "GET", "@", "Path", "(", "\"version\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "Response", "getVersion", "(", ")", "{", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "LOG", ".", "debug", "(", ...
Fetches the version for this application. @return json representing the version.
[ "Fetches", "the", "version", "for", "this", "application", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java#L177-L208
train
apache/incubator-atlas
addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
HiveMetaStoreBridge.registerDatabase
private Referenceable registerDatabase(String databaseName) throws Exception { Referenceable dbRef = getDatabaseReference(clusterName, databaseName); Database db = hiveClient.getDatabase(databaseName); if (db != null) { if (dbRef == null) { dbRef = createDBInstance(d...
java
private Referenceable registerDatabase(String databaseName) throws Exception { Referenceable dbRef = getDatabaseReference(clusterName, databaseName); Database db = hiveClient.getDatabase(databaseName); if (db != null) { if (dbRef == null) { dbRef = createDBInstance(d...
[ "private", "Referenceable", "registerDatabase", "(", "String", "databaseName", ")", "throws", "Exception", "{", "Referenceable", "dbRef", "=", "getDatabaseReference", "(", "clusterName", ",", "databaseName", ")", ";", "Database", "db", "=", "hiveClient", ".", "getDa...
Checks if db is already registered, else creates and registers db entity @param databaseName @return @throws Exception
[ "Checks", "if", "db", "is", "already", "registered", "else", "creates", "and", "registers", "db", "entity" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java#L164-L179
train
apache/incubator-atlas
addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
HiveMetaStoreBridge.registerInstance
private Referenceable registerInstance(Referenceable referenceable) throws Exception { String typeName = referenceable.getTypeName(); LOG.debug("creating instance of type {}", typeName); String entityJSON = InstanceSerialization.toJson(referenceable, true); LOG.debug("Submitting new ent...
java
private Referenceable registerInstance(Referenceable referenceable) throws Exception { String typeName = referenceable.getTypeName(); LOG.debug("creating instance of type {}", typeName); String entityJSON = InstanceSerialization.toJson(referenceable, true); LOG.debug("Submitting new ent...
[ "private", "Referenceable", "registerInstance", "(", "Referenceable", "referenceable", ")", "throws", "Exception", "{", "String", "typeName", "=", "referenceable", ".", "getTypeName", "(", ")", ";", "LOG", ".", "debug", "(", "\"creating instance of type {}\"", ",", ...
Registers an entity in atlas @param referenceable @return @throws Exception
[ "Registers", "an", "entity", "in", "atlas" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java#L207-L217
train
apache/incubator-atlas
addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
HiveMetaStoreBridge.getDatabaseReference
private Referenceable getDatabaseReference(String clusterName, String databaseName) throws Exception { LOG.debug("Getting reference for database {}", databaseName); String typeName = HiveDataTypes.HIVE_DB.getName(); return getEntityReference(typeName, getDBQualifiedName(clusterName, databaseNam...
java
private Referenceable getDatabaseReference(String clusterName, String databaseName) throws Exception { LOG.debug("Getting reference for database {}", databaseName); String typeName = HiveDataTypes.HIVE_DB.getName(); return getEntityReference(typeName, getDBQualifiedName(clusterName, databaseNam...
[ "private", "Referenceable", "getDatabaseReference", "(", "String", "clusterName", ",", "String", "databaseName", ")", "throws", "Exception", "{", "LOG", ".", "debug", "(", "\"Getting reference for database {}\"", ",", "databaseName", ")", ";", "String", "typeName", "=...
Gets reference to the atlas entity for the database @param databaseName database Name @param clusterName cluster name @return Reference for database if exists, else null @throws Exception
[ "Gets", "reference", "to", "the", "atlas", "entity", "for", "the", "database" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java#L226-L231
train
apache/incubator-atlas
addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
HiveMetaStoreBridge.getDBQualifiedName
public static String getDBQualifiedName(String clusterName, String dbName) { return String.format("%s@%s", dbName.toLowerCase(), clusterName); }
java
public static String getDBQualifiedName(String clusterName, String dbName) { return String.format("%s@%s", dbName.toLowerCase(), clusterName); }
[ "public", "static", "String", "getDBQualifiedName", "(", "String", "clusterName", ",", "String", "dbName", ")", "{", "return", "String", ".", "format", "(", "\"%s@%s\"", ",", "dbName", ".", "toLowerCase", "(", ")", ",", "clusterName", ")", ";", "}" ]
Construct the qualified name used to uniquely identify a Database instance in Atlas. @param clusterName Name of the cluster to which the Hive component belongs @param dbName Name of the Hive database @return Unique qualified name to identify the Database instance in Atlas.
[ "Construct", "the", "qualified", "name", "used", "to", "uniquely", "identify", "a", "Database", "instance", "in", "Atlas", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java#L239-L241
train
apache/incubator-atlas
addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
HiveMetaStoreBridge.importTables
private int importTables(Referenceable databaseReferenceable, String databaseName, final boolean failOnError) throws Exception { int tablesImported = 0; List<String> hiveTables = hiveClient.getAllTables(databaseName); LOG.info("Importing tables {} for db {}", hiveTables.toString(), databaseName)...
java
private int importTables(Referenceable databaseReferenceable, String databaseName, final boolean failOnError) throws Exception { int tablesImported = 0; List<String> hiveTables = hiveClient.getAllTables(databaseName); LOG.info("Importing tables {} for db {}", hiveTables.toString(), databaseName)...
[ "private", "int", "importTables", "(", "Referenceable", "databaseReferenceable", ",", "String", "databaseName", ",", "final", "boolean", "failOnError", ")", "throws", "Exception", "{", "int", "tablesImported", "=", "0", ";", "List", "<", "String", ">", "hiveTables...
Imports all tables for the given db @param databaseReferenceable @param databaseName @param failOnError @throws Exception
[ "Imports", "all", "tables", "for", "the", "given", "db" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java#L267-L283
train
apache/incubator-atlas
addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
HiveMetaStoreBridge.getTableReference
private Referenceable getTableReference(Table hiveTable) throws Exception { LOG.debug("Getting reference for table {}.{}", hiveTable.getDbName(), hiveTable.getTableName()); String typeName = HiveDataTypes.HIVE_TABLE.getName(); String tblQualifiedName = getTableQualifiedName(getClusterName(), h...
java
private Referenceable getTableReference(Table hiveTable) throws Exception { LOG.debug("Getting reference for table {}.{}", hiveTable.getDbName(), hiveTable.getTableName()); String typeName = HiveDataTypes.HIVE_TABLE.getName(); String tblQualifiedName = getTableQualifiedName(getClusterName(), h...
[ "private", "Referenceable", "getTableReference", "(", "Table", "hiveTable", ")", "throws", "Exception", "{", "LOG", ".", "debug", "(", "\"Getting reference for table {}.{}\"", ",", "hiveTable", ".", "getDbName", "(", ")", ",", "hiveTable", ".", "getTableName", "(", ...
Gets reference for the table @param hiveTable @return table reference if exists, else null @throws Exception
[ "Gets", "reference", "for", "the", "table" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java#L341-L347
train
apache/incubator-atlas
addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
HiveMetaStoreBridge.createTableInstance
public Referenceable createTableInstance(Referenceable dbReference, Table hiveTable) throws AtlasHookException { return createOrUpdateTableInstance(dbReference, null, hiveTable); }
java
public Referenceable createTableInstance(Referenceable dbReference, Table hiveTable) throws AtlasHookException { return createOrUpdateTableInstance(dbReference, null, hiveTable); }
[ "public", "Referenceable", "createTableInstance", "(", "Referenceable", "dbReference", ",", "Table", "hiveTable", ")", "throws", "AtlasHookException", "{", "return", "createOrUpdateTableInstance", "(", "dbReference", ",", "null", ",", "hiveTable", ")", ";", "}" ]
Create a new table instance in Atlas @param dbReference reference to a created Hive database {@link Referenceable} to which this table belongs @param hiveTable reference to the Hive {@link Table} from which to map properties @return Newly created Hive reference @throws Exception
[ "Create", "a", "new", "table", "instance", "in", "Atlas" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java#L422-L425
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/optimizer/ExpandAndsOptimization.java
ExpandAndsOptimization.apply
@Override public GroovyExpression apply(GroovyExpression expr, OptimizationContext context) { FunctionCallExpression exprAsFunction = (FunctionCallExpression)expr; GroovyExpression result = exprAsFunction.getCaller(); List<GroovyExpression> nonExtractableArguments = new ArrayList<>(); ...
java
@Override public GroovyExpression apply(GroovyExpression expr, OptimizationContext context) { FunctionCallExpression exprAsFunction = (FunctionCallExpression)expr; GroovyExpression result = exprAsFunction.getCaller(); List<GroovyExpression> nonExtractableArguments = new ArrayList<>(); ...
[ "@", "Override", "public", "GroovyExpression", "apply", "(", "GroovyExpression", "expr", ",", "OptimizationContext", "context", ")", "{", "FunctionCallExpression", "exprAsFunction", "=", "(", "FunctionCallExpression", ")", "expr", ";", "GroovyExpression", "result", "=",...
Expands the given and expression. There is no need to recursively expand the children here. This method is called recursively by GremlinQueryOptimier on the children.
[ "Expands", "the", "given", "and", "expression", ".", "There", "is", "no", "need", "to", "recursively", "expand", "the", "children", "here", ".", "This", "method", "is", "called", "recursively", "by", "GremlinQueryOptimier", "on", "the", "children", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/optimizer/ExpandAndsOptimization.java#L82-L124
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/optimizer/FunctionGenerator.java
FunctionGenerator.updateCurrentFunction
private void updateCurrentFunction(AbstractFunctionExpression parentExpr) { GroovyExpression expr = parentExpr.getCaller(); if (expr instanceof AbstractFunctionExpression) { AbstractFunctionExpression exprAsFunction = (AbstractFunctionExpression) expr; GroovyExpression exprCaller...
java
private void updateCurrentFunction(AbstractFunctionExpression parentExpr) { GroovyExpression expr = parentExpr.getCaller(); if (expr instanceof AbstractFunctionExpression) { AbstractFunctionExpression exprAsFunction = (AbstractFunctionExpression) expr; GroovyExpression exprCaller...
[ "private", "void", "updateCurrentFunction", "(", "AbstractFunctionExpression", "parentExpr", ")", "{", "GroovyExpression", "expr", "=", "parentExpr", ".", "getCaller", "(", ")", ";", "if", "(", "expr", "instanceof", "AbstractFunctionExpression", ")", "{", "AbstractFun...
Adds the caller of parentExpr to the current body of the last function that was created. @param parentExpr
[ "Adds", "the", "caller", "of", "parentExpr", "to", "the", "current", "body", "of", "the", "last", "function", "that", "was", "created", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/optimizer/FunctionGenerator.java#L271-L279
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/optimizer/FunctionGenerator.java
FunctionGenerator.creatingFunctionShortensGremlin
private boolean creatingFunctionShortensGremlin(GroovyExpression headExpr) { int tailLength = getTailLength(); int length = headExpr.toString().length() - tailLength; int overhead = 0; if (nextFunctionBodyStart instanceof AbstractFunctionExpression) { overhead = functionDefL...
java
private boolean creatingFunctionShortensGremlin(GroovyExpression headExpr) { int tailLength = getTailLength(); int length = headExpr.toString().length() - tailLength; int overhead = 0; if (nextFunctionBodyStart instanceof AbstractFunctionExpression) { overhead = functionDefL...
[ "private", "boolean", "creatingFunctionShortensGremlin", "(", "GroovyExpression", "headExpr", ")", "{", "int", "tailLength", "=", "getTailLength", "(", ")", ";", "int", "length", "=", "headExpr", ".", "toString", "(", ")", ".", "length", "(", ")", "-", "tailLe...
the overall length of the Groovy script.
[ "the", "overall", "length", "of", "the", "Groovy", "script", "." ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/optimizer/FunctionGenerator.java#L296-L310
train
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
EntityGraphMapper.createInverseReference
private AtlasEdge createInverseReference(AtlasAttribute inverseAttribute, AtlasStructType inverseAttributeType, AtlasVertex inverseVertex, AtlasVertex vertex) throws AtlasBaseException { String propertyName = AtlasGraphUtilsV1.getQualifiedAttributePropertyKey(in...
java
private AtlasEdge createInverseReference(AtlasAttribute inverseAttribute, AtlasStructType inverseAttributeType, AtlasVertex inverseVertex, AtlasVertex vertex) throws AtlasBaseException { String propertyName = AtlasGraphUtilsV1.getQualifiedAttributePropertyKey(in...
[ "private", "AtlasEdge", "createInverseReference", "(", "AtlasAttribute", "inverseAttribute", ",", "AtlasStructType", "inverseAttributeType", ",", "AtlasVertex", "inverseVertex", ",", "AtlasVertex", "vertex", ")", "throws", "AtlasBaseException", "{", "String", "propertyName", ...
legacy method to create edges for inverse reference
[ "legacy", "method", "to", "create", "edges", "for", "inverse", "reference" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java#L523-L538
train