Commit db437bcb by Suma Shivaprasad

Merged with renaming changes for apache release

parents 8d8b0b71 1a7dba9f
...@@ -83,21 +83,21 @@ c. Using DGI ...@@ -83,21 +83,21 @@ c. Using DGI
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
* Verify if the server is up and running * Verify if the server is up and running
curl -v http://localhost:21000/api/metadata/admin/version curl -v http://localhost:21000/api/atlas/admin/version
{"Version":"v0.1"} {"Version":"v0.1"}
* List the types in the repository * List the types in the repository
curl -v http://localhost:21000/api/metadata/types curl -v http://localhost:21000/api/atlas/types
{"list":["biginteger","short","byte","int","string","bigdecimal","boolean","date","double","long","float"],"requestId":"902580786@qtp-1479771328-0"} {"list":["biginteger","short","byte","int","string","bigdecimal","boolean","date","double","long","float"],"requestId":"902580786@qtp-1479771328-0"}
* List the instances for a given type * List the instances for a given type
curl -v http://localhost:21000/api/metadata/entities?type=hive_table curl -v http://localhost:21000/api/atlas/entities?type=hive_table
{"requestId":"788558007@qtp-44808654-5","list":["cb9b5513-c672-42cb-8477-b8f3e537a162","ec985719-a794-4c98-b98f-0509bd23aac0","48998f81-f1d3-45a2-989a-223af5c1ed6e","a54b386e-c759-4651-8779-a099294244c4"]} {"requestId":"788558007@qtp-44808654-5","list":["cb9b5513-c672-42cb-8477-b8f3e537a162","ec985719-a794-4c98-b98f-0509bd23aac0","48998f81-f1d3-45a2-989a-223af5c1ed6e","a54b386e-c759-4651-8779-a099294244c4"]}
curl -v http://localhost:21000/api/metadata/entities/list/hive_db curl -v http://localhost:21000/api/atlas/entities/list/hive_db
* Search for entities (instances) in the repository * Search for entities (instances) in the repository
curl -v http://localhost:21000/api/metadata/discovery/search/dsl?query="from hive_table" curl -v http://localhost:21000/api/atlas/discovery/search/dsl?query="from hive_table"
d. Stopping DGI Server d. Stopping DGI Server
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
......
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>metadata-governance</artifactId> <artifactId>apache-atlas</artifactId>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<version>0.1-incubating-SNAPSHOT</version> <version>0.1-incubating-SNAPSHOT</version>
<relativePath>../../</relativePath> <relativePath>../../</relativePath>
</parent> </parent>
<artifactId>falcon-bridge</artifactId> <artifactId>falcon-bridge</artifactId>
<description>Apache Metadata Falcon Bridge Module</description> <description>Apache Atlas Falcon Bridge Module</description>
<name>Apache Metadata Falcon Bridge</name> <name>Apache Atlas Falcon Bridge</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<properties> <properties>
...@@ -50,13 +50,13 @@ ...@@ -50,13 +50,13 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-typesystem</artifactId> <artifactId>atlas-typesystem</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-repository</artifactId> <artifactId>atlas-repository</artifactId>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -16,9 +16,20 @@ ...@@ -16,9 +16,20 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.metadata.falcon; package org.apache.atlas.falcon;
import com.google.inject.Inject; import com.google.inject.Inject;
import org.apache.atlas.MetadataException;
import org.apache.atlas.repository.MetadataRepository;
import org.apache.atlas.typesystem.ITypedInstance;
import org.apache.atlas.typesystem.Referenceable;
import org.apache.atlas.typesystem.Struct;
import org.apache.atlas.typesystem.types.EnumType;
import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.atlas.typesystem.types.StructType;
import org.apache.atlas.typesystem.types.TraitType;
import org.apache.atlas.typesystem.types.TypeSystem;
import org.apache.commons.lang.StringUtils;
import org.apache.falcon.client.FalconCLIException; import org.apache.falcon.client.FalconCLIException;
import org.apache.falcon.client.FalconClient; import org.apache.falcon.client.FalconClient;
import org.apache.falcon.entity.v0.Entity; import org.apache.falcon.entity.v0.Entity;
...@@ -29,17 +40,6 @@ import org.apache.falcon.entity.v0.cluster.Location; ...@@ -29,17 +40,6 @@ import org.apache.falcon.entity.v0.cluster.Location;
import org.apache.falcon.entity.v0.cluster.Properties; import org.apache.falcon.entity.v0.cluster.Properties;
import org.apache.falcon.entity.v0.cluster.Property; import org.apache.falcon.entity.v0.cluster.Property;
import org.apache.falcon.resource.EntityList; import org.apache.falcon.resource.EntityList;
import org.apache.hadoop.metadata.ITypedInstance;
import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.Referenceable;
import org.apache.hadoop.metadata.Struct;
import org.apache.hadoop.metadata.repository.MetadataRepository;
import org.apache.hadoop.metadata.typesystem.types.EnumType;
import org.apache.hadoop.metadata.typesystem.types.Multiplicity;
import org.apache.hadoop.metadata.typesystem.types.StructType;
import org.apache.hadoop.metadata.typesystem.types.TraitType;
import org.apache.hadoop.metadata.typesystem.types.TypeSystem;
import org.parboiled.common.StringUtils;
import javax.xml.bind.JAXBException; import javax.xml.bind.JAXBException;
import java.io.StringReader; import java.io.StringReader;
...@@ -127,7 +127,7 @@ public class FalconImporter { ...@@ -127,7 +127,7 @@ public class FalconImporter {
} }
clusterRef.set("interfaces", interfaces); clusterRef.set("interfaces", interfaces);
} }
repository.createEntity(clusterRef, clusterRef.getTypeName()); repository.createEntity(clusterRef);
} }
} catch (Exception e) { } catch (Exception e) {
throw new MetadataException(e); throw new MetadataException(e);
......
...@@ -16,20 +16,20 @@ ...@@ -16,20 +16,20 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.metadata.falcon; package org.apache.atlas.falcon;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.types.AttributeDefinition; import org.apache.atlas.typesystem.types.AttributeDefinition;
import org.apache.hadoop.metadata.types.ClassType; import org.apache.atlas.typesystem.types.ClassType;
import org.apache.hadoop.metadata.types.DataTypes; import org.apache.atlas.typesystem.types.DataTypes;
import org.apache.hadoop.metadata.types.EnumTypeDefinition; import org.apache.atlas.typesystem.types.EnumTypeDefinition;
import org.apache.hadoop.metadata.types.EnumValue; import org.apache.atlas.typesystem.types.EnumValue;
import org.apache.hadoop.metadata.types.HierarchicalTypeDefinition; import org.apache.atlas.typesystem.types.HierarchicalTypeDefinition;
import org.apache.hadoop.metadata.types.Multiplicity; import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.hadoop.metadata.types.StructTypeDefinition; import org.apache.atlas.typesystem.types.StructTypeDefinition;
import org.apache.hadoop.metadata.types.TraitType; import org.apache.atlas.typesystem.types.TraitType;
import org.apache.hadoop.metadata.types.TypeSystem; import org.apache.atlas.typesystem.types.TypeSystem;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -39,6 +39,7 @@ import java.util.List; ...@@ -39,6 +39,7 @@ import java.util.List;
public class FalconTypeSystem { public class FalconTypeSystem {
public static final Logger LOG = LoggerFactory.getLogger(FalconTypeSystem.class); public static final Logger LOG = LoggerFactory.getLogger(FalconTypeSystem.class);
public static final TypeSystem TYPE_SYSTEM = TypeSystem.getInstance(); public static final TypeSystem TYPE_SYSTEM = TypeSystem.getInstance();
private static FalconTypeSystem INSTANCE;
private List<StructTypeDefinition> structTypeDefinitions = new ArrayList<>(); private List<StructTypeDefinition> structTypeDefinitions = new ArrayList<>();
private List<HierarchicalTypeDefinition<TraitType>> traitTypeDefinitions = new ArrayList<>(); private List<HierarchicalTypeDefinition<TraitType>> traitTypeDefinitions = new ArrayList<>();
...@@ -62,14 +63,6 @@ public class FalconTypeSystem { ...@@ -62,14 +63,6 @@ public class FalconTypeSystem {
return INSTANCE; return INSTANCE;
} }
private FalconTypeSystem() throws MetadataException {
HierarchicalTypeDefinition<ClassType> cluster = defineCluster();
//TODO define feed and process
TYPE_SYSTEM.defineTypes(ImmutableList.copyOf(structTypeDefinitions), ImmutableList.copyOf(traitTypeDefinitions),
ImmutableList.of(cluster));
}
private HierarchicalTypeDefinition<ClassType> defineCluster() throws MetadataException { private HierarchicalTypeDefinition<ClassType> defineCluster() throws MetadataException {
defineACL(); defineACL();
defineClusterInterface(); defineClusterInterface();
......
...@@ -16,10 +16,11 @@ ...@@ -16,10 +16,11 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.metadata.falcon; package org.apache.atlas.falcon;
import org.apache.atlas.repository.MetadataRepository;
import org.apache.atlas.typesystem.IReferenceableInstance;
import org.apache.commons.lang.RandomStringUtils; import org.apache.commons.lang.RandomStringUtils;
import org.apache.falcon.client.FalconCLIException;
import org.apache.falcon.client.FalconClient; import org.apache.falcon.client.FalconClient;
import org.apache.falcon.entity.v0.EntityType; import org.apache.falcon.entity.v0.EntityType;
import org.apache.falcon.entity.v0.cluster.Cluster; import org.apache.falcon.entity.v0.cluster.Cluster;
...@@ -29,9 +30,6 @@ import org.apache.falcon.entity.v0.cluster.Interfacetype; ...@@ -29,9 +30,6 @@ import org.apache.falcon.entity.v0.cluster.Interfacetype;
import org.apache.falcon.entity.v0.cluster.Location; import org.apache.falcon.entity.v0.cluster.Location;
import org.apache.falcon.entity.v0.cluster.Locations; import org.apache.falcon.entity.v0.cluster.Locations;
import org.apache.falcon.resource.EntityList; import org.apache.falcon.resource.EntityList;
import org.apache.hadoop.metadata.IReferenceableInstance;
import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.repository.MetadataRepository;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import java.io.StringWriter; import java.io.StringWriter;
...@@ -50,7 +48,8 @@ public class FalconImporterTest { ...@@ -50,7 +48,8 @@ public class FalconImporterTest {
FalconTypeSystem.getInstance(); FalconTypeSystem.getInstance();
FalconImporter importer = new FalconImporter(client, repo); FalconImporter importer = new FalconImporter(client, repo);
when(client.getEntityList(EntityType.CLUSTER.name(), null, null, null, null, null, null, null)).thenReturn(getEntityList()); when(client.getEntityList(EntityType.CLUSTER.name(), null, null, null, null, null, null,
null)).thenReturn(getEntityList());
//TODO Set other fields in cluster //TODO Set other fields in cluster
when(client.getDefinition(anyString(), anyString())).thenReturn(getCluster()); when(client.getDefinition(anyString(), anyString())).thenReturn(getCluster());
when(repo.createEntity(any(IReferenceableInstance.class), anyString())).thenReturn(UUID.randomUUID().toString()); when(repo.createEntity(any(IReferenceableInstance.class), anyString())).thenReturn(UUID.randomUUID().toString());
......
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.metadata.falcon; package org.apache.atlas.falcon;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.types.ClassType; import org.apache.atlas.typesystem.types.ClassType;
import org.apache.hadoop.metadata.types.TraitType; import org.apache.atlas.typesystem.types.TraitType;
import org.apache.hadoop.metadata.types.TypeSystem; import org.apache.atlas.typesystem.types.TypeSystem;
import org.junit.Assert; import org.junit.Assert;
import org.testng.annotations.Test; import org.testng.annotations.Test;
......
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>metadata-governance</artifactId> <artifactId>apache-atlas</artifactId>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<version>0.1-incubating-SNAPSHOT</version> <version>0.1-incubating-SNAPSHOT</version>
<relativePath>../../</relativePath> <relativePath>../../</relativePath>
</parent> </parent>
<artifactId>hive-bridge</artifactId> <artifactId>hive-bridge</artifactId>
<description>Apache Metadata Hive Bridge Module</description> <description>Apache Atlas Hive Bridge Module</description>
<name>Apache Metadata Hive Bridge</name> <name>Apache Atlas Hive Bridge</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<properties> <properties>
...@@ -76,8 +76,8 @@ ...@@ -76,8 +76,8 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-client</artifactId> <artifactId>atlas-client</artifactId>
<version>${version}</version> <version>${version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
...@@ -90,8 +90,8 @@ ...@@ -90,8 +90,8 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-typesystem</artifactId> <artifactId>atlas-typesystem</artifactId>
</dependency> </dependency>
<dependency> <dependency>
...@@ -110,8 +110,8 @@ ...@@ -110,8 +110,8 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-webapp</artifactId> <artifactId>atlas-webapp</artifactId>
<classifier>classes</classifier> <classifier>classes</classifier>
</dependency> </dependency>
...@@ -194,12 +194,12 @@ ...@@ -194,12 +194,12 @@
</artifactItem> </artifactItem>
<artifactItem> <artifactItem>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>metadata-client</artifactId> <artifactId>atlas-client</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</artifactItem> </artifactItem>
<artifactItem> <artifactItem>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>metadata-typesystem</artifactId> <artifactId>atlas-typesystem</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</artifactItem> </artifactItem>
<artifactItem> <artifactItem>
...@@ -241,20 +241,20 @@ ...@@ -241,20 +241,20 @@
<maxIdleTime>60000</maxIdleTime> <maxIdleTime>60000</maxIdleTime>
</connector> </connector>
</connectors> </connectors>
<webApp>../../webapp/target/metadata-webapp-${project.version}.war</webApp> <webApp>../../webapp/target/atlas-webapp-${project.version}.war</webApp>
<contextPath>/</contextPath> <contextPath>/</contextPath>
<useTestClasspath>true</useTestClasspath> <useTestClasspath>true</useTestClasspath>
<systemProperties> <systemProperties>
<systemProperty> <systemProperty>
<name>metadata.log.dir</name> <name>atlas.log.dir</name>
<value>${project.build.directory}/logs</value> <value>${project.build.directory}/logs</value>
</systemProperty> </systemProperty>
<systemProperty> <systemProperty>
<name>metadata.conf</name> <name>atlas.conf</name>
<value>addons/hive-bridge/src/test/resources</value> <value>addons/hive-bridge/src/test/resources</value>
</systemProperty> </systemProperty>
</systemProperties> </systemProperties>
<stopKey>metadata-stop</stopKey> <stopKey>atlas-stop</stopKey>
<stopPort>41001</stopPort> <stopPort>41001</stopPort>
</configuration> </configuration>
<executions> <executions>
......
...@@ -34,8 +34,8 @@ if [ -z "$METADATA_CONF" ]; then ...@@ -34,8 +34,8 @@ if [ -z "$METADATA_CONF" ]; then
fi fi
export METADATA_CONF export METADATA_CONF
if [ -f "${METADATA_CONF}/metadata-env.sh" ]; then if [ -f "${METADATA_CONF}/atlas-env.sh" ]; then
. "${METADATA_CONF}/metadata-env.sh" . "${METADATA_CONF}/atlas-env.sh"
fi fi
if test -z ${JAVA_HOME} if test -z ${JAVA_HOME}
...@@ -87,7 +87,7 @@ export HIVE_CP ...@@ -87,7 +87,7 @@ export HIVE_CP
echo Using Hive configuration directory [$HIVE_CP] echo Using Hive configuration directory [$HIVE_CP]
echo "Logs for import are in $METADATA_LOG_DIR/import-hive.log" echo "Logs for import are in $METADATA_LOG_DIR/import-hive.log"
${JAVA_BIN} ${JAVA_PROPERTIES} -cp ${HIVE_CP}:${METADATACPPATH} org.apache.hadoop.metadata.hive.bridge.HiveMetaStoreBridge ${JAVA_BIN} ${JAVA_PROPERTIES} -cp ${HIVE_CP}:${METADATACPPATH} org.apache.atlas.hive.bridge.HiveMetaStoreBridge
RETVAL=$? RETVAL=$?
[ $RETVAL -eq 0 ] && echo Hive Data Model imported successfully!!! [ $RETVAL -eq 0 ] && echo Hive Data Model imported successfully!!!
......
...@@ -16,8 +16,16 @@ ...@@ -16,8 +16,16 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.hive.bridge; package org.apache.atlas.hive.bridge;
import org.apache.atlas.MetadataServiceClient;
import org.apache.atlas.MetadataServiceException;
import org.apache.atlas.hive.model.HiveDataModelGenerator;
import org.apache.atlas.hive.model.HiveDataTypes;
import org.apache.atlas.typesystem.Referenceable;
import org.apache.atlas.typesystem.Struct;
import org.apache.atlas.typesystem.json.InstanceSerialization;
import org.apache.atlas.typesystem.persistence.Id;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf;
...@@ -31,14 +39,6 @@ import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants; ...@@ -31,14 +39,6 @@ import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants;
import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata.Hive;
import org.apache.hadoop.hive.ql.metadata.Partition; import org.apache.hadoop.hive.ql.metadata.Partition;
import org.apache.hadoop.hive.ql.metadata.Table; import org.apache.hadoop.hive.ql.metadata.Table;
import org.apache.hadoop.metadata.MetadataServiceClient;
import org.apache.hadoop.metadata.MetadataServiceException;
import org.apache.hadoop.metadata.hive.model.HiveDataModelGenerator;
import org.apache.hadoop.metadata.hive.model.HiveDataTypes;
import org.apache.hadoop.metadata.typesystem.Referenceable;
import org.apache.hadoop.metadata.typesystem.Struct;
import org.apache.hadoop.metadata.typesystem.json.InstanceSerialization;
import org.apache.hadoop.metadata.typesystem.persistence.Id;
import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject; import org.codehaus.jettison.json.JSONObject;
......
...@@ -33,10 +33,13 @@ ...@@ -33,10 +33,13 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.hive.hook; package org.apache.atlas.hive.hook;
import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.common.util.concurrent.ThreadFactoryBuilder;
import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
import org.apache.atlas.hive.model.HiveDataTypes;
import org.apache.atlas.typesystem.Referenceable;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.ql.QueryPlan; import org.apache.hadoop.hive.ql.QueryPlan;
...@@ -49,9 +52,6 @@ import org.apache.hadoop.hive.ql.hooks.ReadEntity; ...@@ -49,9 +52,6 @@ import org.apache.hadoop.hive.ql.hooks.ReadEntity;
import org.apache.hadoop.hive.ql.hooks.WriteEntity; import org.apache.hadoop.hive.ql.hooks.WriteEntity;
import org.apache.hadoop.hive.ql.metadata.Table; import org.apache.hadoop.hive.ql.metadata.Table;
import org.apache.hadoop.hive.ql.plan.HiveOperation; import org.apache.hadoop.hive.ql.plan.HiveOperation;
import org.apache.hadoop.metadata.hive.bridge.HiveMetaStoreBridge;
import org.apache.hadoop.metadata.hive.model.HiveDataTypes;
import org.apache.hadoop.metadata.typesystem.Referenceable;
import org.json.JSONObject; import org.json.JSONObject;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -16,25 +16,25 @@ ...@@ -16,25 +16,25 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.hive.model; package org.apache.atlas.hive.model;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.MetadataServiceClient; import org.apache.atlas.MetadataServiceClient;
import org.apache.hadoop.metadata.typesystem.TypesDef; import org.apache.atlas.typesystem.TypesDef;
import org.apache.hadoop.metadata.typesystem.json.TypesSerialization; import org.apache.atlas.typesystem.json.TypesSerialization;
import org.apache.hadoop.metadata.typesystem.types.AttributeDefinition; import org.apache.atlas.typesystem.types.AttributeDefinition;
import org.apache.hadoop.metadata.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.ClassType;
import org.apache.hadoop.metadata.typesystem.types.DataTypes; import org.apache.atlas.typesystem.types.DataTypes;
import org.apache.hadoop.metadata.typesystem.types.EnumType; import org.apache.atlas.typesystem.types.EnumType;
import org.apache.hadoop.metadata.typesystem.types.EnumTypeDefinition; import org.apache.atlas.typesystem.types.EnumTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.EnumValue; import org.apache.atlas.typesystem.types.EnumValue;
import org.apache.hadoop.metadata.typesystem.types.HierarchicalTypeDefinition; import org.apache.atlas.typesystem.types.HierarchicalTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.Multiplicity; import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.hadoop.metadata.typesystem.types.StructType; import org.apache.atlas.typesystem.types.StructType;
import org.apache.hadoop.metadata.typesystem.types.StructTypeDefinition; import org.apache.atlas.typesystem.types.StructTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.TraitType; import org.apache.atlas.typesystem.types.TraitType;
import org.apache.hadoop.metadata.typesystem.types.TypeUtils; import org.apache.atlas.typesystem.types.TypeUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.hive.model; package org.apache.atlas.hive.model;
/** /**
* Hive Data Types for model and bridge. * Hive Data Types for model and bridge.
......
---+ Hive DGI Bridge ---+ Hive DGI Bridge
Hive metadata can be modelled in DGI using its Type System. The default modelling is available in org.apache.hadoop.metadata.hive.model.HiveDataModelGenerator. It defines the following types: Hive metadata can be modelled in DGI using its Type System. The default modelling is available in org.apache.atlas.hive.model.HiveDataModelGenerator. It defines the following types:
* hive_resource_type(EnumType) - [JAR, FILE, ARCHIVE] * hive_resource_type(EnumType) - [JAR, FILE, ARCHIVE]
* hive_principal_type(EnumType) - [USER, ROLE, GROUP] * hive_principal_type(EnumType) - [USER, ROLE, GROUP]
* hive_function_type(EnumType) - [JAVA] * hive_function_type(EnumType) - [JAVA]
...@@ -19,7 +19,7 @@ Hive metadata can be modelled in DGI using its Type System. The default modellin ...@@ -19,7 +19,7 @@ Hive metadata can be modelled in DGI using its Type System. The default modellin
---++ Importing Hive Metadata ---++ Importing Hive Metadata
org.apache.hadoop.metadata.hive.bridge.HiveMetaStoreBridge imports the hive metadata into DGI using the typesystem defined in org.apache.hadoop.metadata.hive.model.HiveDataModelGenerator. import-hive.sh command can be used to facilitate this. org.apache.atlas.hive.bridge.HiveMetaStoreBridge imports the hive metadata into DGI using the typesystem defined in org.apache.atlas.hive.model.HiveDataModelGenerator. import-hive.sh command can be used to facilitate this.
Set-up the following configs in hive-site.xml of your hive set-up and set environment variable HIVE_CONFIG to the Set-up the following configs in hive-site.xml of your hive set-up and set environment variable HIVE_CONFIG to the
hive conf directory: hive conf directory:
* DGI endpoint - Add the following property with the DGI endpoint for your set-up * DGI endpoint - Add the following property with the DGI endpoint for your set-up
...@@ -38,13 +38,13 @@ Usage: <dgi package>/bin/import-hive.sh. The logs are in <dgi package>/logs/impo ...@@ -38,13 +38,13 @@ Usage: <dgi package>/bin/import-hive.sh. The logs are in <dgi package>/logs/impo
---++ Hive Hook ---++ Hive Hook
Hive supports listeners on hive command execution using hive hooks. This is used to add/update/remove entities in DGI using the model defined in org.apache.hadoop.metadata.hive.model.HiveDataModelGenerator. Hive supports listeners on hive command execution using hive hooks. This is used to add/update/remove entities in DGI using the model defined in org.apache.atlas.hive.model.HiveDataModelGenerator.
The hook submits the request to a thread pool executor to avoid blocking the command execution. Follow the these instructions in your hive set-up to add hive hook for DGI: The hook submits the request to a thread pool executor to avoid blocking the command execution. Follow the these instructions in your hive set-up to add hive hook for DGI:
* Add org.apache.hadoop.metadata.hive.hook.HiveHook as post execution hook in hive-site.xml * Add org.apache.atlas.hive.hook.HiveHook as post execution hook in hive-site.xml
<verbatim> <verbatim>
<property> <property>
<name>hive.exec.post.hooks</name> <name>hive.exec.post.hooks</name>
<value>org.apache.hadoop.metadata.hive.hook.HiveHook</value> <value>org.apache.atlas.hive.hook.HiveHook</value>
</property> </property>
</verbatim> </verbatim>
* Add the following properties in hive-ste.xml with the DGI endpoint for your set-up * Add the following properties in hive-ste.xml with the DGI endpoint for your set-up
......
...@@ -14,16 +14,16 @@ ...@@ -14,16 +14,16 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.hive.hook; package org.apache.atlas.hive.hook;
import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
import org.apache.atlas.security.BaseSecurityTest;
import org.apache.atlas.web.service.SecureEmbeddedServer;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.metadata.hive.bridge.HiveMetaStoreBridge;
import org.apache.hadoop.metadata.security.BaseSecurityTest;
import org.apache.hadoop.metadata.web.service.SecureEmbeddedServer;
import org.apache.hadoop.security.alias.CredentialProvider; import org.apache.hadoop.security.alias.CredentialProvider;
import org.apache.hadoop.security.alias.CredentialProviderFactory; import org.apache.hadoop.security.alias.CredentialProviderFactory;
import org.mortbay.jetty.Server; import org.mortbay.jetty.Server;
...@@ -31,9 +31,9 @@ import org.mortbay.jetty.Server; ...@@ -31,9 +31,9 @@ import org.mortbay.jetty.Server;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import static org.apache.hadoop.metadata.security.SecurityProperties.KEYSTORE_PASSWORD_KEY; import static org.apache.atlas.security.SecurityProperties.KEYSTORE_PASSWORD_KEY;
import static org.apache.hadoop.metadata.security.SecurityProperties.SERVER_CERT_PASSWORD_KEY; import static org.apache.atlas.security.SecurityProperties.SERVER_CERT_PASSWORD_KEY;
import static org.apache.hadoop.metadata.security.SecurityProperties.TRUSTSTORE_PASSWORD_KEY; import static org.apache.atlas.security.SecurityProperties.TRUSTSTORE_PASSWORD_KEY;
/** /**
* *
...@@ -123,7 +123,7 @@ public class BaseSSLAndKerberosTest extends BaseSecurityTest { ...@@ -123,7 +123,7 @@ public class BaseSSLAndKerberosTest extends BaseSecurityTest {
} }
protected String getWarPath() { protected String getWarPath() {
return String.format("/../../webapp/target/metadata-webapp-%s", return String.format("/../../webapp/target/atlas-webapp-%s",
System.getProperty("project.version", "0.1-incubating-SNAPSHOT")); System.getProperty("project.version", "0.1-incubating-SNAPSHOT"));
} }
...@@ -132,7 +132,8 @@ public class BaseSSLAndKerberosTest extends BaseSecurityTest { ...@@ -132,7 +132,8 @@ public class BaseSSLAndKerberosTest extends BaseSecurityTest {
hiveConf.setVar(HiveConf.ConfVars.PREEXECHOOKS, ""); hiveConf.setVar(HiveConf.ConfVars.PREEXECHOOKS, "");
hiveConf.setVar(HiveConf.ConfVars.POSTEXECHOOKS, HiveHook.class.getName()); hiveConf.setVar(HiveConf.ConfVars.POSTEXECHOOKS, HiveHook.class.getName());
hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, false); hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, false);
hiveConf.setVar(HiveConf.ConfVars.METASTOREWAREHOUSE, System.getProperty("user.dir") + "/target/metastore"); hiveConf.setVar(HiveConf.ConfVars.METASTOREWAREHOUSE,
System.getProperty("user.dir") + "/target/atlas");
hiveConf.set(HiveMetaStoreBridge.DGI_URL_PROPERTY, DGI_URL); hiveConf.set(HiveMetaStoreBridge.DGI_URL_PROPERTY, DGI_URL);
hiveConf.set("javax.jdo.option.ConnectionURL", "jdbc:derby:./target/metastore_db;create=true"); hiveConf.set("javax.jdo.option.ConnectionURL", "jdbc:derby:./target/metastore_db;create=true");
hiveConf.set("hive.hook.dgi.synchronous", "true"); hiveConf.set("hive.hook.dgi.synchronous", "true");
......
...@@ -16,8 +16,14 @@ ...@@ -16,8 +16,14 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.hive.hook; package org.apache.atlas.hive.hook;
import org.apache.atlas.MetadataServiceClient;
import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
import org.apache.atlas.hive.model.HiveDataModelGenerator;
import org.apache.atlas.hive.model.HiveDataTypes;
import org.apache.atlas.typesystem.Referenceable;
import org.apache.atlas.typesystem.persistence.Id;
import org.apache.commons.lang.RandomStringUtils; import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -25,12 +31,6 @@ import org.apache.hadoop.hive.conf.HiveConf; ...@@ -25,12 +31,6 @@ import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.TableType; import org.apache.hadoop.hive.metastore.TableType;
import org.apache.hadoop.hive.ql.Driver; import org.apache.hadoop.hive.ql.Driver;
import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.ql.session.SessionState;
import org.apache.hadoop.metadata.MetadataServiceClient;
import org.apache.hadoop.metadata.hive.bridge.HiveMetaStoreBridge;
import org.apache.hadoop.metadata.hive.model.HiveDataModelGenerator;
import org.apache.hadoop.metadata.hive.model.HiveDataTypes;
import org.apache.hadoop.metadata.typesystem.Referenceable;
import org.apache.hadoop.metadata.typesystem.persistence.Id;
import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONObject; import org.codehaus.jettison.json.JSONObject;
import org.slf4j.Logger; import org.slf4j.Logger;
......
...@@ -16,16 +16,16 @@ ...@@ -16,16 +16,16 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.hive.hook; package org.apache.atlas.hive.hook;
import org.apache.atlas.PropertiesUtil;
import org.apache.atlas.security.SecurityProperties;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.lang.RandomStringUtils; import org.apache.commons.lang.RandomStringUtils;
import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.ql.Driver; import org.apache.hadoop.hive.ql.Driver;
import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.ql.session.SessionState;
import org.apache.hadoop.metadata.PropertiesUtil;
import org.apache.hadoop.metadata.security.SecurityProperties;
import org.apache.hadoop.security.alias.JavaKeyStoreProvider; import org.apache.hadoop.security.alias.JavaKeyStoreProvider;
import org.apache.hadoop.security.ssl.SSLFactory; import org.apache.hadoop.security.ssl.SSLFactory;
import org.apache.hadoop.security.ssl.SSLHostnameVerifier; import org.apache.hadoop.security.ssl.SSLHostnameVerifier;
...@@ -40,7 +40,10 @@ import java.io.FileWriter; ...@@ -40,7 +40,10 @@ import java.io.FileWriter;
import java.net.URL; import java.net.URL;
import java.nio.file.Files; import java.nio.file.Files;
import static org.apache.hadoop.metadata.security.SecurityProperties.*; import static org.apache.atlas.security.SecurityProperties.CERT_STORES_CREDENTIAL_PROVIDER_PATH;
import static org.apache.atlas.security.SecurityProperties.KEYSTORE_FILE_KEY;
import static org.apache.atlas.security.SecurityProperties.TLS_ENABLED;
import static org.apache.atlas.security.SecurityProperties.TRUSTSTORE_FILE_KEY;
/** /**
* Perform all the necessary setup steps for client and server comm over SSL/Kerberos, but then don't estalish a * Perform all the necessary setup steps for client and server comm over SSL/Kerberos, but then don't estalish a
...@@ -85,15 +88,15 @@ public class NegativeSSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest { ...@@ -85,15 +88,15 @@ public class NegativeSSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest {
// client will actually only leverage subset of these properties // client will actually only leverage subset of these properties
final PropertiesConfiguration configuration = new PropertiesConfiguration(); final PropertiesConfiguration configuration = new PropertiesConfiguration();
configuration.setProperty(TLS_ENABLED, true); configuration.setProperty(TLS_ENABLED, true);
configuration.setProperty(TRUSTSTORE_FILE_KEY, "../../webapp/target/metadata.keystore"); configuration.setProperty(TRUSTSTORE_FILE_KEY, "../../webapp/target/atlas.keystore");
configuration.setProperty(KEYSTORE_FILE_KEY, "../../webapp/target/metadata.keystore"); configuration.setProperty(KEYSTORE_FILE_KEY, "../../webapp/target/atlas.keystore");
configuration.setProperty(CERT_STORES_CREDENTIAL_PROVIDER_PATH, providerUrl); configuration.setProperty(CERT_STORES_CREDENTIAL_PROVIDER_PATH, providerUrl);
configuration.setProperty("metadata.http.authentication.type", "kerberos"); configuration.setProperty("atlas.http.authentication.type", "kerberos");
configuration.setProperty(SSLFactory.SSL_HOSTNAME_VERIFIER_KEY, SSLHostnameVerifier.DEFAULT_AND_LOCALHOST.toString()); configuration.setProperty(SSLFactory.SSL_HOSTNAME_VERIFIER_KEY, SSLHostnameVerifier.DEFAULT_AND_LOCALHOST.toString());
configuration.save(new FileWriter(persistDir + File.separator + "client.properties")); configuration.save(new FileWriter(persistDir + File.separator + "client.properties"));
String confLocation = System.getProperty("metadata.conf"); String confLocation = System.getProperty("atlas.conf");
URL url; URL url;
if (confLocation == null) { if (confLocation == null) {
url = PropertiesUtil.class.getResource("/application.properties"); url = PropertiesUtil.class.getResource("/application.properties");
...@@ -102,15 +105,15 @@ public class NegativeSSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest { ...@@ -102,15 +105,15 @@ public class NegativeSSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest {
} }
configuration.load(url); configuration.load(url);
configuration.setProperty(TLS_ENABLED, true); configuration.setProperty(TLS_ENABLED, true);
configuration.setProperty("metadata.http.authentication.enabled", "true"); configuration.setProperty("atlas.http.authentication.enabled", "true");
configuration.setProperty("metadata.http.authentication.kerberos.principal", "HTTP/localhost@" + kdc.getRealm()); configuration.setProperty("atlas.http.authentication.kerberos.principal", "HTTP/localhost@" + kdc.getRealm());
configuration.setProperty("metadata.http.authentication.kerberos.keytab", httpKeytabFile.getAbsolutePath()); configuration.setProperty("atlas.http.authentication.kerberos.keytab", httpKeytabFile.getAbsolutePath());
configuration.setProperty("metadata.http.authentication.kerberos.name.rules", configuration.setProperty("atlas.http.authentication.kerberos.name.rules",
"RULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nDEFAULT"); "RULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nDEFAULT");
configuration.save(new FileWriter(persistDir + File.separator + "application.properties")); configuration.save(new FileWriter(persistDir + File.separator + "application.properties"));
secureEmbeddedServer = new TestSecureEmbeddedServer(21443, "webapp/target/metadata-governance") { secureEmbeddedServer = new TestSecureEmbeddedServer(21443, "webapp/target/apache-atlas") {
@Override @Override
public PropertiesConfiguration getConfiguration() { public PropertiesConfiguration getConfiguration() {
return configuration; return configuration;
...@@ -122,8 +125,8 @@ public class NegativeSSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest { ...@@ -122,8 +125,8 @@ public class NegativeSSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest {
secureEmbeddedServer.getServer().setHandler(webapp); secureEmbeddedServer.getServer().setHandler(webapp);
// save original setting // save original setting
originalConf = System.getProperty("metadata.conf"); originalConf = System.getProperty("atlas.conf");
System.setProperty("metadata.conf", persistDir); System.setProperty("atlas.conf", persistDir);
secureEmbeddedServer.getServer().start(); secureEmbeddedServer.getServer().start();
} }
...@@ -139,7 +142,7 @@ public class NegativeSSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest { ...@@ -139,7 +142,7 @@ public class NegativeSSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest {
} }
if (originalConf != null) { if (originalConf != null) {
System.setProperty("metadata.conf", originalConf); System.setProperty("atlas.conf", originalConf);
} }
} }
......
...@@ -16,24 +16,23 @@ ...@@ -16,24 +16,23 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.hive.hook; package org.apache.atlas.hive.hook;
import org.apache.atlas.MetadataException;
import org.apache.atlas.MetadataServiceClient;
import org.apache.atlas.PropertiesUtil;
import org.apache.atlas.hive.model.HiveDataTypes;
import org.apache.atlas.security.SecurityProperties;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.lang.RandomStringUtils; import org.apache.commons.lang.RandomStringUtils;
import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.ql.Driver; import org.apache.hadoop.hive.ql.Driver;
import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.ql.session.SessionState;
import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.MetadataServiceClient;
import org.apache.hadoop.metadata.PropertiesUtil;
import org.apache.hadoop.metadata.hive.model.HiveDataTypes;
import org.apache.hadoop.metadata.security.SecurityProperties;
import org.apache.hadoop.security.alias.JavaKeyStoreProvider; import org.apache.hadoop.security.alias.JavaKeyStoreProvider;
import org.apache.hadoop.security.ssl.SSLFactory; import org.apache.hadoop.security.ssl.SSLFactory;
import org.apache.hadoop.security.ssl.SSLHostnameVerifier; import org.apache.hadoop.security.ssl.SSLHostnameVerifier;
import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONObject;
import org.mortbay.jetty.webapp.WebAppContext; import org.mortbay.jetty.webapp.WebAppContext;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterClass; import org.testng.annotations.AfterClass;
...@@ -41,7 +40,11 @@ import org.testng.annotations.BeforeClass; ...@@ -41,7 +40,11 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import javax.security.auth.Subject; import javax.security.auth.Subject;
import javax.security.auth.callback.*; import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.NameCallback;
import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.auth.login.LoginContext; import javax.security.auth.login.LoginContext;
import javax.security.auth.login.LoginException; import javax.security.auth.login.LoginException;
import java.io.File; import java.io.File;
...@@ -51,7 +54,10 @@ import java.net.URL; ...@@ -51,7 +54,10 @@ import java.net.URL;
import java.nio.file.Files; import java.nio.file.Files;
import java.security.PrivilegedExceptionAction; import java.security.PrivilegedExceptionAction;
import static org.apache.hadoop.metadata.security.SecurityProperties.*; import static org.apache.atlas.security.SecurityProperties.CERT_STORES_CREDENTIAL_PROVIDER_PATH;
import static org.apache.atlas.security.SecurityProperties.KEYSTORE_FILE_KEY;
import static org.apache.atlas.security.SecurityProperties.TLS_ENABLED;
import static org.apache.atlas.security.SecurityProperties.TRUSTSTORE_FILE_KEY;
public class SSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest { public class SSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest {
public static final String TEST_USER_JAAS_SECTION = "TestUser"; public static final String TEST_USER_JAAS_SECTION = "TestUser";
...@@ -97,15 +103,15 @@ public class SSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest { ...@@ -97,15 +103,15 @@ public class SSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest {
// client will actually only leverage subset of these properties // client will actually only leverage subset of these properties
final PropertiesConfiguration configuration = new PropertiesConfiguration(); final PropertiesConfiguration configuration = new PropertiesConfiguration();
configuration.setProperty(TLS_ENABLED, true); configuration.setProperty(TLS_ENABLED, true);
configuration.setProperty(TRUSTSTORE_FILE_KEY, "../../webapp/target/metadata.keystore"); configuration.setProperty(TRUSTSTORE_FILE_KEY, "../../webapp/target/atlas.keystore");
configuration.setProperty(KEYSTORE_FILE_KEY, "../../webapp/target/metadata.keystore"); configuration.setProperty(KEYSTORE_FILE_KEY, "../../webapp/target/atlas.keystore");
configuration.setProperty(CERT_STORES_CREDENTIAL_PROVIDER_PATH, providerUrl); configuration.setProperty(CERT_STORES_CREDENTIAL_PROVIDER_PATH, providerUrl);
configuration.setProperty("metadata.http.authentication.type", "kerberos"); configuration.setProperty("atlas.http.authentication.type", "kerberos");
configuration.setProperty(SSLFactory.SSL_HOSTNAME_VERIFIER_KEY, SSLHostnameVerifier.DEFAULT_AND_LOCALHOST.toString()); configuration.setProperty(SSLFactory.SSL_HOSTNAME_VERIFIER_KEY, SSLHostnameVerifier.DEFAULT_AND_LOCALHOST.toString());
configuration.save(new FileWriter(persistDir + File.separator + "client.properties")); configuration.save(new FileWriter(persistDir + File.separator + "client.properties"));
String confLocation = System.getProperty("metadata.conf"); String confLocation = System.getProperty("atlas.conf");
URL url; URL url;
if (confLocation == null) { if (confLocation == null) {
url = PropertiesUtil.class.getResource("/application.properties"); url = PropertiesUtil.class.getResource("/application.properties");
...@@ -114,10 +120,10 @@ public class SSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest { ...@@ -114,10 +120,10 @@ public class SSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest {
} }
configuration.load(url); configuration.load(url);
configuration.setProperty(TLS_ENABLED, true); configuration.setProperty(TLS_ENABLED, true);
configuration.setProperty("metadata.http.authentication.enabled", "true"); configuration.setProperty("atlas.http.authentication.enabled", "true");
configuration.setProperty("metadata.http.authentication.kerberos.principal", "HTTP/localhost@" + kdc.getRealm()); configuration.setProperty("atlas.http.authentication.kerberos.principal", "HTTP/localhost@" + kdc.getRealm());
configuration.setProperty("metadata.http.authentication.kerberos.keytab", httpKeytabFile.getAbsolutePath()); configuration.setProperty("atlas.http.authentication.kerberos.keytab", httpKeytabFile.getAbsolutePath());
configuration.setProperty("metadata.http.authentication.kerberos.name.rules", configuration.setProperty("atlas.http.authentication.kerberos.name.rules",
"RULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nDEFAULT"); "RULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nDEFAULT");
configuration.save(new FileWriter(persistDir + File.separator + "application.properties")); configuration.save(new FileWriter(persistDir + File.separator + "application.properties"));
...@@ -129,7 +135,7 @@ public class SSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest { ...@@ -129,7 +135,7 @@ public class SSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest {
} }
}; };
secureEmbeddedServer = new TestSecureEmbeddedServer(21443, "webapp/target/metadata-governance") { secureEmbeddedServer = new TestSecureEmbeddedServer(21443, "webapp/target/apache-atlas") {
@Override @Override
public PropertiesConfiguration getConfiguration() { public PropertiesConfiguration getConfiguration() {
return configuration; return configuration;
...@@ -141,8 +147,8 @@ public class SSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest { ...@@ -141,8 +147,8 @@ public class SSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest {
secureEmbeddedServer.getServer().setHandler(webapp); secureEmbeddedServer.getServer().setHandler(webapp);
// save original setting // save original setting
originalConf = System.getProperty("metadata.conf"); originalConf = System.getProperty("atlas.conf");
System.setProperty("metadata.conf", persistDir); System.setProperty("atlas.conf", persistDir);
secureEmbeddedServer.getServer().start(); secureEmbeddedServer.getServer().start();
subject = loginTestUser(); subject = loginTestUser();
...@@ -159,7 +165,7 @@ public class SSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest { ...@@ -159,7 +165,7 @@ public class SSLAndKerberosHiveHookIT extends BaseSSLAndKerberosTest {
} }
if (originalConf != null) { if (originalConf != null) {
System.setProperty("metadata.conf", originalConf); System.setProperty("atlas.conf", originalConf);
} }
} }
......
...@@ -16,8 +16,14 @@ ...@@ -16,8 +16,14 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.hive.hook; package org.apache.atlas.hive.hook;
import org.apache.atlas.MetadataException;
import org.apache.atlas.MetadataServiceClient;
import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
import org.apache.atlas.hive.model.HiveDataTypes;
import org.apache.atlas.security.SecurityProperties;
import org.apache.atlas.web.service.SecureEmbeddedServer;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.lang.RandomStringUtils; import org.apache.commons.lang.RandomStringUtils;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
...@@ -25,19 +31,12 @@ import org.apache.hadoop.fs.Path; ...@@ -25,19 +31,12 @@ import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.ql.Driver; import org.apache.hadoop.hive.ql.Driver;
import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.ql.session.SessionState;
import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.MetadataServiceClient;
import org.apache.hadoop.metadata.hive.bridge.HiveMetaStoreBridge;
import org.apache.hadoop.metadata.hive.model.HiveDataTypes;
import org.apache.hadoop.metadata.security.SecurityProperties;
import org.apache.hadoop.metadata.web.service.SecureEmbeddedServer;
import org.apache.hadoop.security.alias.CredentialProvider; import org.apache.hadoop.security.alias.CredentialProvider;
import org.apache.hadoop.security.alias.CredentialProviderFactory; import org.apache.hadoop.security.alias.CredentialProviderFactory;
import org.apache.hadoop.security.alias.JavaKeyStoreProvider; import org.apache.hadoop.security.alias.JavaKeyStoreProvider;
import org.apache.hadoop.security.ssl.SSLFactory; import org.apache.hadoop.security.ssl.SSLFactory;
import org.apache.hadoop.security.ssl.SSLHostnameVerifier; import org.apache.hadoop.security.ssl.SSLHostnameVerifier;
import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONObject;
import org.mortbay.jetty.Server; import org.mortbay.jetty.Server;
import org.mortbay.jetty.webapp.WebAppContext; import org.mortbay.jetty.webapp.WebAppContext;
import org.testng.Assert; import org.testng.Assert;
...@@ -51,7 +50,13 @@ import java.io.IOException; ...@@ -51,7 +50,13 @@ import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.nio.file.Files; import java.nio.file.Files;
import static org.apache.hadoop.metadata.security.SecurityProperties.*; import static org.apache.atlas.security.SecurityProperties.CERT_STORES_CREDENTIAL_PROVIDER_PATH;
import static org.apache.atlas.security.SecurityProperties.KEYSTORE_FILE_KEY;
import static org.apache.atlas.security.SecurityProperties.KEYSTORE_PASSWORD_KEY;
import static org.apache.atlas.security.SecurityProperties.SERVER_CERT_PASSWORD_KEY;
import static org.apache.atlas.security.SecurityProperties.TLS_ENABLED;
import static org.apache.atlas.security.SecurityProperties.TRUSTSTORE_FILE_KEY;
import static org.apache.atlas.security.SecurityProperties.TRUSTSTORE_PASSWORD_KEY;
public class SSLHiveHookIT { public class SSLHiveHookIT {
private static final String DGI_URL = "https://localhost:21443/"; private static final String DGI_URL = "https://localhost:21443/";
...@@ -105,8 +110,8 @@ public class SSLHiveHookIT { ...@@ -105,8 +110,8 @@ public class SSLHiveHookIT {
final PropertiesConfiguration configuration = new PropertiesConfiguration(); final PropertiesConfiguration configuration = new PropertiesConfiguration();
configuration.setProperty(TLS_ENABLED, true); configuration.setProperty(TLS_ENABLED, true);
configuration.setProperty(TRUSTSTORE_FILE_KEY, "../../webapp/target/metadata.keystore"); configuration.setProperty(TRUSTSTORE_FILE_KEY, "../../webapp/target/atlas.keystore");
configuration.setProperty(KEYSTORE_FILE_KEY, "../../webapp/target/metadata.keystore"); configuration.setProperty(KEYSTORE_FILE_KEY, "../../webapp/target/atlas.keystore");
configuration.setProperty(CERT_STORES_CREDENTIAL_PROVIDER_PATH, providerUrl); configuration.setProperty(CERT_STORES_CREDENTIAL_PROVIDER_PATH, providerUrl);
configuration.setProperty(SSLFactory.SSL_HOSTNAME_VERIFIER_KEY, SSLHostnameVerifier.DEFAULT_AND_LOCALHOST.toString()); configuration.setProperty(SSLFactory.SSL_HOSTNAME_VERIFIER_KEY, SSLHostnameVerifier.DEFAULT_AND_LOCALHOST.toString());
...@@ -119,7 +124,7 @@ public class SSLHiveHookIT { ...@@ -119,7 +124,7 @@ public class SSLHiveHookIT {
} }
}; };
secureEmbeddedServer = new TestSecureEmbeddedServer(21443, "webapp/target/metadata-governance") { secureEmbeddedServer = new TestSecureEmbeddedServer(21443, "webapp/target/apache-atlas") {
@Override @Override
public PropertiesConfiguration getConfiguration() { public PropertiesConfiguration getConfiguration() {
return configuration; return configuration;
...@@ -179,7 +184,7 @@ public class SSLHiveHookIT { ...@@ -179,7 +184,7 @@ public class SSLHiveHookIT {
} }
protected String getWarPath() { protected String getWarPath() {
return String.format("/../../webapp/target/metadata-webapp-%s", return String.format("/../../webapp/target/atlas-webapp-%s",
System.getProperty("project.version", "0.1-incubating-SNAPSHOT")); System.getProperty("project.version", "0.1-incubating-SNAPSHOT"));
} }
...@@ -188,7 +193,7 @@ public class SSLHiveHookIT { ...@@ -188,7 +193,7 @@ public class SSLHiveHookIT {
hiveConf.setVar(HiveConf.ConfVars.PREEXECHOOKS, ""); hiveConf.setVar(HiveConf.ConfVars.PREEXECHOOKS, "");
hiveConf.setVar(HiveConf.ConfVars.POSTEXECHOOKS, HiveHook.class.getName()); hiveConf.setVar(HiveConf.ConfVars.POSTEXECHOOKS, HiveHook.class.getName());
hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, false); hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, false);
hiveConf.setVar(HiveConf.ConfVars.METASTOREWAREHOUSE, System.getProperty("user.dir") + "/target/metastore"); hiveConf.setVar(HiveConf.ConfVars.METASTOREWAREHOUSE, System.getProperty("user.dir") + "/target/atlas");
hiveConf.set(HiveMetaStoreBridge.DGI_URL_PROPERTY, DGI_URL); hiveConf.set(HiveMetaStoreBridge.DGI_URL_PROPERTY, DGI_URL);
hiveConf.set("javax.jdo.option.ConnectionURL", "jdbc:derby:./target/metastore_db;create=true"); hiveConf.set("javax.jdo.option.ConnectionURL", "jdbc:derby:./target/metastore_db;create=true");
hiveConf.set("hive.hook.dgi.synchronous", "true"); hiveConf.set("hive.hook.dgi.synchronous", "true");
......
...@@ -18,25 +18,25 @@ ...@@ -18,25 +18,25 @@
######### Graph Database Configs ######### ######### Graph Database Configs #########
# Graph Storage # Graph Storage
metadata.graph.storage.backend=inmemory atlas.graph.storage.backend=inmemory
# Graph Search Index # Graph Search Index
metadata.graph.index.search.backend=lucene atlas.graph.index.search.backend=lucene
metadata.graph.index.search.directory=target/data/lucene atlas.graph.index.search.directory=target/data/lucene
######### Hive Lineage Configs ######### ######### Hive Lineage Configs #########
# This models reflects the base super types for Data and Process # This models reflects the base super types for Data and Process
#metadata.lineage.hive.table.type.name=DataSet #atlas.lineage.hive.table.type.name=DataSet
#metadata.lineage.hive.process.type.name=Process #atlas.lineage.hive.process.type.name=Process
#metadata.lineage.hive.process.inputs.name=inputs #atlas.lineage.hive.process.inputs.name=inputs
#metadata.lineage.hive.process.outputs.name=outputs #atlas.lineage.hive.process.outputs.name=outputs
## Schema ## Schema
#metadata.lineage.hive.table.schema.query=hive_table where name=?, columns #atlas.lineage.hive.table.schema.query=hive_table where name=?, columns
######### Security Properties ######### ######### Security Properties #########
# SSL config # SSL config
metadata.enableTLS=false atlas.enableTLS=false
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-bridge-parent</artifactId> <artifactId>atlas-bridge-parent</artifactId>
<version>0.1-incubating-SNAPSHOT</version> <version>0.1-incubating-SNAPSHOT</version>
</parent> </parent>
<artifactId>metadata-bridge-core</artifactId> <artifactId>atlas-bridge-core</artifactId>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.hive</groupId> <groupId>org.apache.hive</groupId>
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-repository</artifactId> <artifactId>atlas-repository</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sun.jersey</groupId> <groupId>com.sun.jersey</groupId>
......
...@@ -16,20 +16,20 @@ ...@@ -16,20 +16,20 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge; package org.apache.atlas.bridge;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.repository.MetadataRepository; import org.apache.atlas.repository.MetadataRepository;
import org.apache.hadoop.metadata.repository.RepositoryException; import org.apache.atlas.repository.RepositoryException;
import org.apache.hadoop.metadata.typesystem.ITypedReferenceableInstance; import org.apache.atlas.typesystem.ITypedReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.Referenceable; import org.apache.atlas.typesystem.Referenceable;
import org.apache.hadoop.metadata.typesystem.types.AttributeDefinition; import org.apache.atlas.typesystem.types.AttributeDefinition;
import org.apache.hadoop.metadata.typesystem.types.AttributeInfo; import org.apache.atlas.typesystem.types.AttributeInfo;
import org.apache.hadoop.metadata.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.ClassType;
import org.apache.hadoop.metadata.typesystem.types.HierarchicalTypeDefinition; import org.apache.atlas.typesystem.types.HierarchicalTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.Multiplicity; import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.hadoop.metadata.typesystem.types.TypeSystem; import org.apache.atlas.typesystem.types.TypeSystem;
import org.slf4j.Logger; import org.slf4j.Logger;
import java.lang.reflect.Field; import java.lang.reflect.Field;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge; package org.apache.atlas.bridge;
public abstract class AEntityBean { public abstract class AEntityBean {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge; package org.apache.atlas.bridge;
import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.MetaException;
......
...@@ -16,21 +16,21 @@ ...@@ -16,21 +16,21 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge; package org.apache.atlas.bridge;
//TODO - Create Index Annotation Framework for BeanConverter //TODO - Create Index Annotation Framework for BeanConverter
//TODO - Enhance Bean Conversion to handled nested objects //TODO - Enhance Bean Conversion to handled nested objects
//TODO - Enhance Bean COnversion to handle Collections //TODO - Enhance Bean COnversion to handle Collections
import org.apache.atlas.MetadataException;
import org.apache.atlas.repository.MetadataRepository;
import org.apache.atlas.typesystem.types.AttributeDefinition;
import org.apache.atlas.typesystem.types.ClassType;
import org.apache.atlas.typesystem.types.HierarchicalTypeDefinition;
import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.atlas.typesystem.types.TypeSystem;
import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.repository.MetadataRepository;
import org.apache.hadoop.metadata.typesystem.types.AttributeDefinition;
import org.apache.hadoop.metadata.typesystem.types.ClassType;
import org.apache.hadoop.metadata.typesystem.types.HierarchicalTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.Multiplicity;
import org.apache.hadoop.metadata.typesystem.types.TypeSystem;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge; package org.apache.atlas.bridge;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.typesystem.types.AttributeDefinition; import org.apache.atlas.typesystem.types.AttributeDefinition;
import org.apache.hadoop.metadata.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.ClassType;
import org.apache.hadoop.metadata.typesystem.types.HierarchicalTypeDefinition; import org.apache.atlas.typesystem.types.HierarchicalTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.Multiplicity; import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.hadoop.metadata.typesystem.types.TypeSystem; import org.apache.atlas.typesystem.types.TypeSystem;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge; package org.apache.atlas.bridge;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge.hivelineage; package org.apache.atlas.bridge.hivelineage;
import org.apache.hadoop.metadata.bridge.ABridge; import org.apache.atlas.bridge.ABridge;
import org.apache.hadoop.metadata.bridge.hivelineage.hook.HiveLineage; import org.apache.atlas.bridge.hivelineage.hook.HiveLineage;
import org.apache.hadoop.metadata.repository.MetadataRepository; import org.apache.atlas.repository.MetadataRepository;
import javax.inject.Inject; import javax.inject.Inject;
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge.hivelineage.hook; package org.apache.atlas.bridge.hivelineage.hook;
import org.apache.hadoop.metadata.bridge.AEntityBean; import org.apache.atlas.bridge.AEntityBean;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -16,8 +16,14 @@ ...@@ -16,8 +16,14 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge.hivestructure; package org.apache.atlas.bridge.hivestructure;
import org.apache.atlas.MetadataException;
import org.apache.atlas.repository.IRepository;
import org.apache.atlas.repository.RepositoryException;
import org.apache.atlas.typesystem.Referenceable;
import org.apache.atlas.typesystem.types.ClassType;
import org.apache.atlas.typesystem.types.TypeSystem;
import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.HiveMetaStoreClient; import org.apache.hadoop.hive.metastore.HiveMetaStoreClient;
import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.Database;
...@@ -27,12 +33,6 @@ import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; ...@@ -27,12 +33,6 @@ import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.Table;
import org.apache.hadoop.hive.metastore.api.UnknownDBException; import org.apache.hadoop.hive.metastore.api.UnknownDBException;
import org.apache.hadoop.hive.metastore.api.UnknownTableException; import org.apache.hadoop.hive.metastore.api.UnknownTableException;
import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.repository.IRepository;
import org.apache.hadoop.metadata.repository.RepositoryException;
import org.apache.hadoop.metadata.typesystem.Referenceable;
import org.apache.hadoop.metadata.typesystem.types.ClassType;
import org.apache.hadoop.metadata.typesystem.types.TypeSystem;
import org.apache.thrift.TException; import org.apache.thrift.TException;
/* /*
* Initial pass at one time importer TODO - needs re-write * Initial pass at one time importer TODO - needs re-write
......
...@@ -16,16 +16,16 @@ ...@@ -16,16 +16,16 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge.hivestructure; package org.apache.atlas.bridge.hivestructure;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.bridge.ABridge; import org.apache.atlas.bridge.ABridge;
import org.apache.hadoop.metadata.repository.MetadataRepository; import org.apache.atlas.repository.MetadataRepository;
import org.apache.hadoop.metadata.typesystem.types.AttributeDefinition; import org.apache.atlas.typesystem.types.AttributeDefinition;
import org.apache.hadoop.metadata.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.ClassType;
import org.apache.hadoop.metadata.typesystem.types.HierarchicalTypeDefinition; import org.apache.atlas.typesystem.types.HierarchicalTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.Multiplicity; import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.hadoop.metadata.typesystem.types.TypeSystem; import org.apache.atlas.typesystem.types.TypeSystem;
import javax.inject.Inject; import javax.inject.Inject;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -16,16 +16,16 @@ ...@@ -16,16 +16,16 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge.module; package org.apache.atlas.bridge.module;
import com.google.inject.AbstractModule; import com.google.inject.AbstractModule;
import com.google.inject.Scopes; import com.google.inject.Scopes;
import com.google.inject.multibindings.MapBinder; import com.google.inject.multibindings.MapBinder;
import org.apache.atlas.RepositoryMetadataModule;
import org.apache.atlas.bridge.BridgeTypeBootstrapper;
import org.apache.atlas.bridge.IBridge;
import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.hadoop.metadata.RepositoryMetadataModule;
import org.apache.hadoop.metadata.bridge.BridgeTypeBootstrapper;
import org.apache.hadoop.metadata.bridge.IBridge;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.web.resources; package org.apache.atlas.web.resources;
import org.apache.hadoop.metadata.bridge.hivelineage.HiveLineageBridge; import org.apache.atlas.bridge.hivelineage.HiveLineageBridge;
import javax.inject.Singleton; import javax.inject.Singleton;
......
...@@ -19,4 +19,4 @@ ...@@ -19,4 +19,4 @@
#BridgeManager.activebridges denotes which bridge defintions to load from the classpath (Comma seperated list of fully qualified class paths) #BridgeManager.activebridges denotes which bridge defintions to load from the classpath (Comma seperated list of fully qualified class paths)
# #
BridgeManager.activeBridges=org.apache.hadoop.metadata.bridge.hivelineage.HiveLineageBridge BridgeManager.activeBridges=org.apache.atlas.bridge.hivelineage.HiveLineageBridge
\ No newline at end of file \ No newline at end of file
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge; package org.apache.atlas.bridge;
import org.apache.hadoop.metadata.RepositoryMetadataModule; import org.apache.atlas.RepositoryMetadataModule;
import org.apache.hadoop.metadata.repository.MetadataRepository; import org.apache.atlas.repository.MetadataRepository;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.Guice; import org.testng.annotations.Guice;
import org.testng.annotations.Test; import org.testng.annotations.Test;
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge; package org.apache.atlas.bridge;
import org.apache.hadoop.metadata.bridge.module.BridgeModule; import org.apache.atlas.bridge.module.BridgeModule;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.Guice; import org.testng.annotations.Guice;
import org.testng.annotations.Test; import org.testng.annotations.Test;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge; package org.apache.atlas.bridge;
public class TestGenericBridges { public class TestGenericBridges {
......
...@@ -16,15 +16,15 @@ ...@@ -16,15 +16,15 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge.hivelineage; package org.apache.atlas.bridge.hivelineage;
import com.google.gson.Gson; import com.google.gson.Gson;
import org.apache.atlas.MetadataException;
import org.apache.atlas.bridge.BridgeTypeBootstrapper;
import org.apache.atlas.bridge.hivelineage.hook.HiveLineage;
import org.apache.atlas.bridge.module.BridgeModule;
import org.apache.atlas.repository.RepositoryException;
import org.apache.commons.collections.IteratorUtils; import org.apache.commons.collections.IteratorUtils;
import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.bridge.BridgeTypeBootstrapper;
import org.apache.hadoop.metadata.bridge.hivelineage.hook.HiveLineage;
import org.apache.hadoop.metadata.bridge.module.BridgeModule;
import org.apache.hadoop.metadata.repository.RepositoryException;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Guice; import org.testng.annotations.Guice;
......
...@@ -19,4 +19,4 @@ ...@@ -19,4 +19,4 @@
#BridgeManager.activebridges denotes which bridge defintions to load from the classpath (Comma seperated list of fully qualified class paths) #BridgeManager.activebridges denotes which bridge defintions to load from the classpath (Comma seperated list of fully qualified class paths)
# #
BridgeManager.activeBridges=org.apache.hadoop.metadata.bridge.hivelineage.HiveLineageBridge BridgeManager.activeBridges=org.apache.atlas.bridge.hivelineage.HiveLineageBridge
\ No newline at end of file \ No newline at end of file
...@@ -19,4 +19,4 @@ ...@@ -19,4 +19,4 @@
#BridgeManager.activebridges denotes which bridge defintions to load from the classpath (Comma seperated list of fully qualified class paths) #BridgeManager.activebridges denotes which bridge defintions to load from the classpath (Comma seperated list of fully qualified class paths)
# #
BridgeManager.activeBridges=org.apache.hadoop.metadata.bridge.HiveLineage BridgeManager.activeBridges=org.apache.atlas.bridge.HiveLineage
\ No newline at end of file \ No newline at end of file
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-bridge-parent</artifactId> <artifactId>atlas-bridge-parent</artifactId>
<version>0.1-incubating-SNAPSHOT</version> <version>0.1-incubating-SNAPSHOT</version>
</parent> </parent>
<artifactId>metadata-bridge-hive</artifactId> <artifactId>atlas-bridge-hive</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<dependencies> <dependencies>
...@@ -93,8 +93,8 @@ ...@@ -93,8 +93,8 @@
<configuration> <configuration>
<artifactItems> <artifactItems>
<artifactItem> <artifactItem>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-common</artifactId> <artifactId>atlas-common</artifactId>
<version>0.1-incubating-SNAPSHOT</version> <version>0.1-incubating-SNAPSHOT</version>
<outputDirectory>${project.build.directory}</outputDirectory> <outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem> </artifactItem>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge.hivelineage.hook; package org.apache.atlas.bridge.hivelineage.hook;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -16,9 +16,14 @@ ...@@ -16,9 +16,14 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge.hivelineage.hook; package org.apache.atlas.bridge.hivelineage.hook;
import com.google.gson.Gson; import com.google.gson.Gson;
import org.apache.atlas.bridge.hivelineage.hook.HiveLineage.CreateColumns;
import org.apache.atlas.bridge.hivelineage.hook.HiveLineage.GroupBy;
import org.apache.atlas.bridge.hivelineage.hook.HiveLineage.QueryColumns;
import org.apache.atlas.bridge.hivelineage.hook.HiveLineage.SourceTables;
import org.apache.atlas.bridge.hivelineage.hook.HiveLineage.WhereClause;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker; import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker;
...@@ -34,11 +39,6 @@ import org.apache.hadoop.hive.ql.parse.HiveParser; ...@@ -34,11 +39,6 @@ import org.apache.hadoop.hive.ql.parse.HiveParser;
import org.apache.hadoop.hive.ql.parse.ParseDriver; import org.apache.hadoop.hive.ql.parse.ParseDriver;
import org.apache.hadoop.hive.ql.parse.ParseException; import org.apache.hadoop.hive.ql.parse.ParseException;
import org.apache.hadoop.hive.ql.parse.SemanticException; import org.apache.hadoop.hive.ql.parse.SemanticException;
import org.apache.hadoop.metadata.bridge.hivelineage.hook.HiveLineage.CreateColumns;
import org.apache.hadoop.metadata.bridge.hivelineage.hook.HiveLineage.GroupBy;
import org.apache.hadoop.metadata.bridge.hivelineage.hook.HiveLineage.QueryColumns;
import org.apache.hadoop.metadata.bridge.hivelineage.hook.HiveLineage.SourceTables;
import org.apache.hadoop.metadata.bridge.hivelineage.hook.HiveLineage.WhereClause;
import org.apache.log4j.ConsoleAppender; import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Level; import org.apache.log4j.Level;
import org.apache.log4j.LogManager; import org.apache.log4j.LogManager;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge.hivelineage.hook; package org.apache.atlas.bridge.hivelineage.hook;
import com.google.gson.Gson; import com.google.gson.Gson;
...@@ -203,8 +203,8 @@ public class Hook implements ExecuteWithHookContext { ...@@ -203,8 +203,8 @@ public class Hook implements ExecuteWithHookContext {
throws Exception { throws Exception {
String postUri = String String postUri = String
.format("http://%s:%s%s", METADATA_HOST, METADATA_PORT, METADATA_PATH); .format("http://%s:%s%s", METADATA_HOST, METADATA_PORT, METADATA_PATH);
if (conf.getTrimmed("hadoop.metadata.hive.hook.uri") != null) { if (conf.getTrimmed("atlas.hive.hook.uri") != null) {
postUri = conf.getTrimmed("hadoop.metadata.hive.hook.uri"); postUri = conf.getTrimmed("atlas.hive.hook.uri");
} }
Gson gson = new Gson(); Gson gson = new Gson();
String gsonString = gson.toJson(hookData); String gsonString = gson.toJson(hookData);
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.bridge.hivelineage.hook; package org.apache.atlas.bridge.hivelineage.hook;
import com.google.gson.Gson; import com.google.gson.Gson;
import org.apache.hadoop.hive.ql.parse.ParseException; import org.apache.hadoop.hive.ql.parse.ParseException;
......
...@@ -21,15 +21,15 @@ ...@@ -21,15 +21,15 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-governance</artifactId> <artifactId>apache-atlas</artifactId>
<version>0.1-incubating-SNAPSHOT</version> <version>0.1-incubating-SNAPSHOT</version>
<relativePath>../../</relativePath> <relativePath>../../</relativePath>
</parent> </parent>
<artifactId>metadata-bridge-parent</artifactId> <artifactId>atlas-bridge-parent</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>metadata-bridge-core</module> <module>atlas-bridge-core</module>
<module>metadata-bridge-hive</module> <module>atlas-bridge-hive</module>
</modules> </modules>
</project> </project>
\ No newline at end of file
...@@ -22,19 +22,19 @@ ...@@ -22,19 +22,19 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>metadata-governance</artifactId> <artifactId>apache-atlas</artifactId>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<version>0.1-incubating-SNAPSHOT</version> <version>0.1-incubating-SNAPSHOT</version>
</parent> </parent>
<artifactId>metadata-client</artifactId> <artifactId>atlas-client</artifactId>
<description>Apache Metadata Client</description> <description>Apache Atlas Client</description>
<name>Apache Metadata Client</name> <name>Apache Atlas Client</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-typesystem</artifactId> <artifactId>atlas-typesystem</artifactId>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -16,17 +16,17 @@ ...@@ -16,17 +16,17 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata; package org.apache.atlas;
import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource; import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.config.DefaultClientConfig; import com.sun.jersey.api.client.config.DefaultClientConfig;
import com.sun.jersey.client.urlconnection.URLConnectionClientHandler; import com.sun.jersey.client.urlconnection.URLConnectionClientHandler;
import org.apache.atlas.security.SecureClientUtils;
import org.apache.atlas.typesystem.Referenceable;
import org.apache.atlas.typesystem.json.InstanceSerialization;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.hadoop.metadata.security.SecureClientUtils;
import org.apache.hadoop.metadata.typesystem.Referenceable;
import org.apache.hadoop.metadata.typesystem.json.InstanceSerialization;
import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject; import org.codehaus.jettison.json.JSONObject;
...@@ -40,7 +40,7 @@ import javax.ws.rs.core.UriBuilder; ...@@ -40,7 +40,7 @@ import javax.ws.rs.core.UriBuilder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static org.apache.hadoop.metadata.security.SecurityProperties.TLS_ENABLED; import static org.apache.atlas.security.SecurityProperties.TLS_ENABLED;
/** /**
* Client for metadata. * Client for metadata.
...@@ -59,7 +59,7 @@ public class MetadataServiceClient { ...@@ -59,7 +59,7 @@ public class MetadataServiceClient {
public static final String COUNT = "count"; public static final String COUNT = "count";
public static final String ROWS = "rows"; public static final String ROWS = "rows";
public static final String BASE_URI = "api/metadata/"; public static final String BASE_URI = "api/atlas/";
public static final String TYPES = "types"; public static final String TYPES = "types";
public static final String URI_ENTITIES = "entities"; public static final String URI_ENTITIES = "entities";
public static final String URI_TRAITS = "traits"; public static final String URI_TRAITS = "traits";
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata; package org.apache.atlas;
import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.ClientResponse;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata; package org.apache.atlas;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -40,7 +40,7 @@ public class PropertiesUtil { ...@@ -40,7 +40,7 @@ public class PropertiesUtil {
} }
private static PropertiesConfiguration getPropertiesConfiguration(String name) throws MetadataException { private static PropertiesConfiguration getPropertiesConfiguration(String name) throws MetadataException {
String confLocation = System.getProperty("metadata.conf"); String confLocation = System.getProperty("atlas.conf");
URL url; URL url;
try { try {
if (confLocation == null) { if (confLocation == null) {
......
...@@ -14,18 +14,17 @@ ...@@ -14,18 +14,17 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.security; package org.apache.atlas.security;
import com.sun.jersey.api.client.config.DefaultClientConfig; import com.sun.jersey.api.client.config.DefaultClientConfig;
import com.sun.jersey.client.urlconnection.HttpURLConnectionFactory; import com.sun.jersey.client.urlconnection.HttpURLConnectionFactory;
import com.sun.jersey.client.urlconnection.URLConnectionClientHandler; import com.sun.jersey.client.urlconnection.URLConnectionClientHandler;
import org.apache.atlas.MetadataException;
import org.apache.atlas.PropertiesUtil;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.PropertiesUtil;
import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.alias.CredentialProviderFactory; import org.apache.hadoop.security.alias.CredentialProviderFactory;
import org.apache.hadoop.security.authentication.client.AuthenticationException;
import org.apache.hadoop.security.authentication.client.Authenticator; import org.apache.hadoop.security.authentication.client.Authenticator;
import org.apache.hadoop.security.authentication.client.ConnectionConfigurator; import org.apache.hadoop.security.authentication.client.ConnectionConfigurator;
import org.apache.hadoop.security.ssl.SSLFactory; import org.apache.hadoop.security.ssl.SSLFactory;
...@@ -42,14 +41,15 @@ import javax.net.ssl.SSLSocketFactory; ...@@ -42,14 +41,15 @@ import javax.net.ssl.SSLSocketFactory;
import java.io.File; import java.io.File;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.UndeclaredThrowableException;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.security.GeneralSecurityException; import java.security.GeneralSecurityException;
import java.security.PrivilegedExceptionAction;
import static org.apache.hadoop.metadata.security.SecurityProperties.*; import static org.apache.atlas.security.SecurityProperties.CERT_STORES_CREDENTIAL_PROVIDER_PATH;
import static org.apache.atlas.security.SecurityProperties.CLIENT_AUTH_KEY;
import static org.apache.atlas.security.SecurityProperties.KEYSTORE_FILE_KEY;
import static org.apache.atlas.security.SecurityProperties.TRUSTSTORE_FILE_KEY;
/** /**
* *
...@@ -69,7 +69,7 @@ public class SecureClientUtils { ...@@ -69,7 +69,7 @@ public class SecureClientUtils {
conf.addResource(conf.get(SSLFactory.SSL_CLIENT_CONF_KEY, "ssl-client.xml")); conf.addResource(conf.get(SSLFactory.SSL_CLIENT_CONF_KEY, "ssl-client.xml"));
String authType = "simple"; String authType = "simple";
if (clientConfig != null) { if (clientConfig != null) {
authType = clientConfig.getString("metadata.http.authentication.type", "simple"); authType = clientConfig.getString("atlas.http.authentication.type", "simple");
} }
UserGroupInformation.setConfiguration(conf); UserGroupInformation.setConfiguration(conf);
final ConnectionConfigurator connConfigurator = newConnConfigurator(conf); final ConnectionConfigurator connConfigurator = newConnConfigurator(conf);
...@@ -147,7 +147,7 @@ public class SecureClientUtils { ...@@ -147,7 +147,7 @@ public class SecureClientUtils {
} }
private static File getSSLClientFile() throws MetadataException { private static File getSSLClientFile() throws MetadataException {
String confLocation = System.getProperty("metadata.conf"); String confLocation = System.getProperty("atlas.conf");
File sslDir; File sslDir;
try { try {
if (confLocation == null) { if (confLocation == null) {
......
...@@ -15,22 +15,22 @@ ...@@ -15,22 +15,22 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.security; package org.apache.atlas.security;
/** /**
* *
*/ */
public interface SecurityProperties { public interface SecurityProperties {
public static final String TLS_ENABLED = "metadata.enableTLS"; public static final String TLS_ENABLED = "atlas.enableTLS";
public static final String KEYSTORE_FILE_KEY = "keystore.file"; public static final String KEYSTORE_FILE_KEY = "keystore.file";
public static final String DEFAULT_KEYSTORE_FILE_LOCATION = "target/metadata.keystore"; public static final String DEFAULT_KEYSTORE_FILE_LOCATION = "target/atlas.keystore";
public static final String KEYSTORE_PASSWORD_KEY = "keystore.password"; public static final String KEYSTORE_PASSWORD_KEY = "keystore.password";
public static final String TRUSTSTORE_FILE_KEY = "truststore.file"; public static final String TRUSTSTORE_FILE_KEY = "truststore.file";
public static final String DEFATULT_TRUSTORE_FILE_LOCATION = "target/metadata.keystore"; public static final String DEFATULT_TRUSTORE_FILE_LOCATION = "target/atlas.keystore";
public static final String TRUSTSTORE_PASSWORD_KEY = "truststore.password"; public static final String TRUSTSTORE_PASSWORD_KEY = "truststore.password";
public static final String SERVER_CERT_PASSWORD_KEY = "password"; public static final String SERVER_CERT_PASSWORD_KEY = "password";
public static final String CLIENT_AUTH_KEY = "client.auth.enabled"; public static final String CLIENT_AUTH_KEY = "client.auth.enabled";
public static final String CERT_STORES_CREDENTIAL_PROVIDER_PATH = "cert.stores.credential.provider.path"; public static final String CERT_STORES_CREDENTIAL_PROVIDER_PATH = "cert.stores.credential.provider.path";
public static final String SSL_CLIENT_PROPERTIES = "ssl-client.xml"; public static final String SSL_CLIENT_PROPERTIES = "ssl-client.xml";
public static final String BIND_ADDRESS = "metadata.server.bind.address"; public static final String BIND_ADDRESS = "atlas.server.bind.address";
} }
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.security; package org.apache.atlas.security;
import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
...@@ -51,7 +51,7 @@ public class BaseSecurityTest { ...@@ -51,7 +51,7 @@ public class BaseSecurityTest {
protected MiniKdc kdc; protected MiniKdc kdc;
protected String getWarPath() { protected String getWarPath() {
return String.format("/target/metadata-webapp-%s.war", return String.format("/target/atlas-webapp-%s.war",
System.getProperty("release.version", "0.1-incubating-SNAPSHOT")); System.getProperty("release.version", "0.1-incubating-SNAPSHOT"));
} }
......
...@@ -24,9 +24,9 @@ DgcControllers.controller("ListController", ['$scope','$http', function($scope, ...@@ -24,9 +24,9 @@ DgcControllers.controller("ListController", ['$scope','$http', function($scope,
$scope.executeSearch = function executeSearch() { $scope.executeSearch = function executeSearch() {
$scope.SearchQuery=$scope.query; $scope.SearchQuery=$scope.query;
$scope.iswiki=false; $scope.iswiki=false;
//$http.get('http://162.249.6.76:21000/api/metadata/entities/list/'+$scope.query) //$http.get('http://162.249.6.76:21000/api/atlas/entities/list/'+$scope.query)
var searchQry=$scope.query.split(","); var searchQry=$scope.query.split(",");
$http.get('http://162.249.6.76:21000/api/metadata/discovery/search/fulltext?depth=1&'+searchQry[0]+'&'+searchQry[1]) $http.get('http://162.249.6.76:21000/api/atlas/discovery/search/fulltext?depth=1&'+searchQry[0]+'&'+searchQry[1])
.success(function (data) { .success(function (data) {
$scope.iserror=false; $scope.iserror=false;
...@@ -59,7 +59,7 @@ DgcControllers.controller("DefinitionController", ['$scope','$http','$routeParam ...@@ -59,7 +59,7 @@ DgcControllers.controller("DefinitionController", ['$scope','$http','$routeParam
$scope.selectedDefination={ $scope.selectedDefination={
"path":"wiki.html" "path":"wiki.html"
}; };
$http.get('http://162.249.6.76:21000/api/metadata/entities/definition/'+$routeParams.Id) $http.get('http://162.249.6.76:21000/api/atlas/entities/definition/'+$routeParams.Id)
.success(function (data) { .success(function (data) {
$scope.iserror1=false; $scope.iserror1=false;
$scope.details=angular.fromJson(data.definition); $scope.details=angular.fromJson(data.definition);
...@@ -87,7 +87,7 @@ DgcControllers.controller("LineageController", ['$scope','$http','$routeParams', ...@@ -87,7 +87,7 @@ DgcControllers.controller("LineageController", ['$scope','$http','$routeParams',
$http.get('http://162.249.6.76:21000/api/metadata/discovery/search/relationships/'+$routeParams.Id+'?depth=3&&edgesToFollow=HiveLineage.sourceTables.0,HiveLineage.sourceTables.1,HiveLineage.tableName') $http.get('http://162.249.6.76:21000/api/atlas/discovery/search/relationships/'+$routeParams.Id+'?depth=3&&edgesToFollow=HiveLineage.sourceTables.0,HiveLineage.sourceTables.1,HiveLineage.tableName')
.success(function (data) { .success(function (data) {
$scope.iserror1=false; $scope.iserror1=false;
$scope.lineage=angular.fromJson(data); $scope.lineage=angular.fromJson(data);
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
'use strict'; 'use strict';
angular.module('dgc.details').factory('DetailsResource', ['$resource', function($resource) { angular.module('dgc.details').factory('DetailsResource', ['$resource', function($resource) {
return $resource('/api/metadata/entities/definition/:id', {}, { return $resource('/api/atlas/entities/definition/:id', {}, {
get: { get: {
method: 'GET', method: 'GET',
transformResponse: function(data) { transformResponse: function(data) {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
'use strict'; 'use strict';
angular.module('dgc.lineage').factory('LineageResource', ['$resource', function($resource) { angular.module('dgc.lineage').factory('LineageResource', ['$resource', function($resource) {
return $resource('/api/metadata/discovery/search/relationships/:id', { return $resource('/api/atlas/discovery/search/relationships/:id', {
depth: 3, depth: 3,
edgesToFollow: 'HiveLineage.sourceTables.0,HiveLineage.sourceTables.1,HiveLineage.sourceTables.2,HiveLineage.tableName' edgesToFollow: 'HiveLineage.sourceTables.0,HiveLineage.sourceTables.1,HiveLineage.sourceTables.2,HiveLineage.tableName'
}); });
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
'use strict'; 'use strict';
angular.module('dgc.search').factory('SearchResource', ['$resource', function($resource) { angular.module('dgc.search').factory('SearchResource', ['$resource', function($resource) {
return $resource('/api/metadata/discovery/search/fulltext', {}, { return $resource('/api/atlas/discovery/search/fulltext', {}, {
search: { search: {
'method': 'GET', 'method': 'GET',
'responseType': 'json', 'responseType': 'json',
......
...@@ -52,7 +52,7 @@ DgcControllers.controller("headerController", ['$scope', '$window', '$location', ...@@ -52,7 +52,7 @@ DgcControllers.controller("headerController", ['$scope', '$window', '$location',
DgcControllers.controller("footerController", ['$scope','$http', function($scope, $http) DgcControllers.controller("footerController", ['$scope','$http', function($scope, $http)
{ {
$http.get('/api/metadata/admin/version') $http.get('/api/atlas/admin/version')
.success(function (data) { .success(function (data) {
$scope.iserror1=false; $scope.iserror1=false;
$scope.apiVersion=data.Version; $scope.apiVersion=data.Version;
...@@ -70,7 +70,7 @@ DgcControllers.controller("footerController", ['$scope','$http', function($scope ...@@ -70,7 +70,7 @@ DgcControllers.controller("footerController", ['$scope','$http', function($scope
DgcControllers.controller("NavController", ['$scope','$http', '$filter', 'sharedProperties', function($scope, $http, $filter, sharedProperties) DgcControllers.controller("NavController", ['$scope','$http', '$filter', 'sharedProperties', function($scope, $http, $filter, sharedProperties)
{ {
$http.get('/api/metadata/types/traits/list') $http.get('/api/atlas/types/traits/list')
.success(function (data) { .success(function (data) {
$scope.iserror1=false; $scope.iserror1=false;
$scope.leftnav=angular.fromJson(data.results); $scope.leftnav=angular.fromJson(data.results);
...@@ -150,7 +150,7 @@ DgcControllers.controller("ListController", ['$scope','$http', '$filter','$state ...@@ -150,7 +150,7 @@ DgcControllers.controller("ListController", ['$scope','$http', '$filter','$state
}); });
$http.get('/api/metadata/discovery/search?query='+$scope.SearchQuery) $http.get('/api/atlas/discovery/search?query='+$scope.SearchQuery)
.success(function (data) { .success(function (data) {
$scope.iserror=false; $scope.iserror=false;
$scope.entities=angular.fromJson(data.results.rows); $scope.entities=angular.fromJson(data.results.rows);
...@@ -227,7 +227,7 @@ DgcControllers.controller("ListController", ['$scope','$http', '$filter','$state ...@@ -227,7 +227,7 @@ DgcControllers.controller("ListController", ['$scope','$http', '$filter','$state
}; };
//click value to textbox //click value to textbox
$scope.getGuidName=function getGuidName(val){ $scope.getGuidName=function getGuidName(val){
$http.get('/api/metadata/entities/definition/'+val) $http.get('/api/atlas/entities/definition/'+val)
.success(function (data) { .success(function (data) {
$scope.iserror1=false; $scope.iserror1=false;
if(!$scope.isUndefined(data.results)){ if(!$scope.isUndefined(data.results)){
...@@ -340,7 +340,7 @@ DgcControllers.controller("DefinitionController", ['$scope','$http', '$statePara ...@@ -340,7 +340,7 @@ DgcControllers.controller("DefinitionController", ['$scope','$http', '$statePara
}; };
//onclick to textbox //onclick to textbox
$scope.getGuidName=function getGuidName(val){ $scope.getGuidName=function getGuidName(val){
$http.get('/api/metadata/entities/definition/'+val) $http.get('/api/atlas/entities/definition/'+val)
.success(function (data) { .success(function (data) {
$scope.iserror1=false; $scope.iserror1=false;
if(!$scope.isUndefined(data.results)){ if(!$scope.isUndefined(data.results)){
...@@ -361,7 +361,7 @@ DgcControllers.controller("DefinitionController", ['$scope','$http', '$statePara ...@@ -361,7 +361,7 @@ DgcControllers.controller("DefinitionController", ['$scope','$http', '$statePara
$scope.searchqry=sharedProperties.getQuery(); $scope.searchqry=sharedProperties.getQuery();
$scope.datatype1=sharedProperties.getProperty(); $scope.datatype1=sharedProperties.getProperty();
$http.get('/api/metadata/entities/definition/'+$stateParams.Id) $http.get('/api/atlas/entities/definition/'+$stateParams.Id)
.success(function (data) { .success(function (data) {
$scope.iserror1=false; $scope.iserror1=false;
$scope.details= angular.fromJson(data.results); $scope.details= angular.fromJson(data.results);
...@@ -381,7 +381,7 @@ DgcControllers.controller("DefinitionController", ['$scope','$http', '$statePara ...@@ -381,7 +381,7 @@ DgcControllers.controller("DefinitionController", ['$scope','$http', '$statePara
$scope.getSchema= function (tableName) { $scope.getSchema= function (tableName) {
$http.get('/api/metadata/lineage/hive/schema/'+tableName) $http.get('/api/atlas/lineage/hive/schema/'+tableName)
.success(function (data) { .success(function (data) {
$scope.iserror1=false; $scope.iserror1=false;
$scope.schema= angular.fromJson(data.results.rows); $scope.schema= angular.fromJson(data.results.rows);
...@@ -403,7 +403,7 @@ $scope.getLinegae= function (tableName) { ...@@ -403,7 +403,7 @@ $scope.getLinegae= function (tableName) {
var arrmyalias=[]; var arrmyalias=[];
var datatypes=[]; var datatypes=[];
var tags=[]; var tags=[];
$http.get('/api/metadata/lineage/hive/outputs/'+tableName) $http.get('/api/atlas/lineage/hive/outputs/'+tableName)
.success(function (data) { .success(function (data) {
$scope.iserror1=false; $scope.iserror1=false;
$scope.lineage= angular.fromJson(data.results.rows); $scope.lineage= angular.fromJson(data.results.rows);
...@@ -445,7 +445,7 @@ $scope.getLinegae= function (tableName) { ...@@ -445,7 +445,7 @@ $scope.getLinegae= function (tableName) {
newarrvts.push(item); newarrvts.push(item);
uniquevts[item.Name] = item; uniquevts[item.Name] = item;
var url="/api/metadata/entities/definition/"+item.Name; var url="/api/atlas/entities/definition/"+item.Name;
arr.push($http.get(url)); arr.push($http.get(url));
} }
}); });
...@@ -795,7 +795,7 @@ $scope.getLinegaeforinput= function (tableName) { ...@@ -795,7 +795,7 @@ $scope.getLinegaeforinput= function (tableName) {
var arrmyalias=[]; var arrmyalias=[];
var datatypes=[]; var datatypes=[];
var tags=[]; var tags=[];
$http.get('/api/metadata/lineage/hive/inputs/'+tableName) $http.get('/api/atlas/lineage/hive/inputs/'+tableName)
.success(function (data) { .success(function (data) {
$scope.iserror1=false; $scope.iserror1=false;
$scope.lineage= angular.fromJson(data.results.rows); $scope.lineage= angular.fromJson(data.results.rows);
...@@ -836,7 +836,7 @@ $scope.getLinegaeforinput= function (tableName) { ...@@ -836,7 +836,7 @@ $scope.getLinegaeforinput= function (tableName) {
newarrvts.push(item); newarrvts.push(item);
uniquevts[item.Name] = item; uniquevts[item.Name] = item;
var url="/api/metadata/entities/definition/"+item.Name; var url="/api/atlas/entities/definition/"+item.Name;
arr.push($http.get(url)); arr.push($http.get(url));
//getLienageGuidName(item.Name); //getLienageGuidName(item.Name);
...@@ -1228,7 +1228,7 @@ DgcControllers.controller("GuidController", ['$scope','$http', '$filter','$state ...@@ -1228,7 +1228,7 @@ DgcControllers.controller("GuidController", ['$scope','$http', '$filter','$state
$scope.getGuidName=function getGuidName(val){ $scope.getGuidName=function getGuidName(val){
$scope.gnew=[]; $scope.gnew=[];
$http.get('/api/metadata/entities/definition/'+val) $http.get('/api/atlas/entities/definition/'+val)
.success(function (data) { .success(function (data) {
$scope.iserror1=false; $scope.iserror1=false;
if(!$scope.isUndefined(data.results)){ if(!$scope.isUndefined(data.results)){
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-governance</artifactId> <artifactId>apache-atlas</artifactId>
<version>0.1-incubating-SNAPSHOT</version> <version>0.1-incubating-SNAPSHOT</version>
</parent> </parent>
<artifactId>metadata-docs</artifactId> <artifactId>atlas-docs</artifactId>
<description>Apache Metadata Documentation</description> <description>Apache Atlas Documentation</description>
<name>Apache Metadata Documentation</name> <name>Apache Atlas Documentation</name>
<properties> <properties>
<skipTests>true</skipTests> <skipTests>true</skipTests>
......
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-governance</artifactId> <artifactId>apache-atlas</artifactId>
<version>0.1-incubating-SNAPSHOT</version> <version>0.1-incubating-SNAPSHOT</version>
<description>Metadata Management and Data Governance Platform over Hadoop</description> <description>Metadata Management and Data Governance Platform over Hadoop</description>
<name>metadata-governance</name> <name>apache-atlas</name>
<packaging>pom</packaging> <packaging>pom</packaging>
<url>http://www.apache.org/</url> <url>http://www.apache.org/</url>
...@@ -489,35 +489,35 @@ ...@@ -489,35 +489,35 @@
<version>${tinkerpop.version}</version> <version>${tinkerpop.version}</version>
</dependency> </dependency>
<!-- metadata modules --> <!-- atlas modules -->
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-typesystem</artifactId> <artifactId>atlas-typesystem</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-repository</artifactId> <artifactId>atlas-repository</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-webapp</artifactId> <artifactId>atlas-webapp</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<classifier>classes</classifier> <classifier>classes</classifier>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-client</artifactId> <artifactId>atlas-client</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-client</artifactId> <artifactId>atlas-client</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>test-jar</type> <type>test-jar</type>
<scope>test</scope> <scope>test</scope>
...@@ -894,7 +894,7 @@ ...@@ -894,7 +894,7 @@
<descriptor>src/main/assemblies/standalone-package.xml</descriptor> <descriptor>src/main/assemblies/standalone-package.xml</descriptor>
<descriptor>src/main/assemblies/src-package.xml</descriptor> <descriptor>src/main/assemblies/src-package.xml</descriptor>
</descriptors> </descriptors>
<finalName>apache-metadata-governance-${project.version}</finalName> <finalName>apache-atlas-${project.version}</finalName>
</configuration> </configuration>
</plugin> </plugin>
......
...@@ -24,24 +24,24 @@ ...@@ -24,24 +24,24 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-governance</artifactId> <artifactId>apache-atlas</artifactId>
<version>0.1-incubating-SNAPSHOT</version> <version>0.1-incubating-SNAPSHOT</version>
</parent> </parent>
<artifactId>metadata-repository</artifactId> <artifactId>atlas-repository</artifactId>
<description>Apache Metadata Repository Module</description> <description>Apache Atlas Repository Module</description>
<name>Apache Metadata Repository</name> <name>Apache Atlas Repository</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-typesystem</artifactId> <artifactId>atlas-typesystem</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.metadata</groupId> <groupId>org.apache.atlas</groupId>
<artifactId>metadata-client</artifactId> <artifactId>atlas-client</artifactId>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata; package org.apache.atlas;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
......
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata; package org.apache.atlas;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.thinkaurelius.titan.core.TitanGraph; import com.thinkaurelius.titan.core.TitanGraph;
import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation; import org.aopalliance.intercept.MethodInvocation;
import org.apache.hadoop.metadata.repository.graph.GraphProvider; import org.apache.atlas.repository.graph.GraphProvider;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -16,27 +16,26 @@ ...@@ -16,27 +16,26 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata; package org.apache.atlas;
import com.google.inject.Scopes;
import com.google.inject.matcher.Matchers; import com.google.inject.matcher.Matchers;
import com.google.inject.throwingproviders.ThrowingProviderBinder; import com.google.inject.throwingproviders.ThrowingProviderBinder;
import com.thinkaurelius.titan.core.TitanGraph; import com.thinkaurelius.titan.core.TitanGraph;
import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInterceptor;
import org.apache.hadoop.metadata.discovery.DiscoveryService; import org.apache.atlas.discovery.DiscoveryService;
import org.apache.hadoop.metadata.discovery.HiveLineageService; import org.apache.atlas.discovery.HiveLineageService;
import org.apache.hadoop.metadata.discovery.LineageService; import org.apache.atlas.discovery.LineageService;
import org.apache.hadoop.metadata.discovery.SearchIndexer; import org.apache.atlas.discovery.SearchIndexer;
import org.apache.hadoop.metadata.discovery.graph.GraphBackedDiscoveryService; import org.apache.atlas.discovery.graph.GraphBackedDiscoveryService;
import org.apache.hadoop.metadata.repository.MetadataRepository; import org.apache.atlas.repository.MetadataRepository;
import org.apache.hadoop.metadata.repository.graph.GraphBackedMetadataRepository; import org.apache.atlas.repository.graph.GraphBackedMetadataRepository;
import org.apache.hadoop.metadata.repository.graph.GraphBackedSearchIndexer; import org.apache.atlas.repository.graph.GraphBackedSearchIndexer;
import org.apache.hadoop.metadata.repository.graph.GraphProvider; import org.apache.atlas.repository.graph.GraphProvider;
import org.apache.hadoop.metadata.repository.graph.TitanGraphProvider; import org.apache.atlas.repository.graph.TitanGraphProvider;
import org.apache.hadoop.metadata.repository.typestore.GraphBackedTypeStore; import org.apache.atlas.repository.typestore.GraphBackedTypeStore;
import org.apache.hadoop.metadata.repository.typestore.ITypeStore; import org.apache.atlas.repository.typestore.ITypeStore;
import org.apache.hadoop.metadata.services.DefaultMetadataService; import org.apache.atlas.services.DefaultMetadataService;
import org.apache.hadoop.metadata.services.MetadataService; import org.apache.atlas.services.MetadataService;
/** /**
* Guice module for Repository module. * Guice module for Repository module.
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.discovery; package org.apache.atlas.discovery;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import java.security.PrivilegedActionException; import java.security.PrivilegedActionException;
......
...@@ -16,9 +16,7 @@ ...@@ -16,9 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.discovery; package org.apache.atlas.discovery;
import org.apache.hadoop.metadata.MetadataException;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -48,7 +46,7 @@ public interface DiscoveryService { ...@@ -48,7 +46,7 @@ public interface DiscoveryService {
* *
* @param gremlinQuery query in gremlin dsl format * @param gremlinQuery query in gremlin dsl format
* @return List of Maps * @return List of Maps
* @throws org.apache.hadoop.metadata.discovery.DiscoveryException * @throws org.apache.atlas.discovery.DiscoveryException
*/ */
List<Map<String, String>> searchByGremlin(String gremlinQuery) throws DiscoveryException; List<Map<String, String>> searchByGremlin(String gremlinQuery) throws DiscoveryException;
} }
...@@ -16,23 +16,23 @@ ...@@ -16,23 +16,23 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.discovery; package org.apache.atlas.discovery;
import com.thinkaurelius.titan.core.TitanGraph; import com.thinkaurelius.titan.core.TitanGraph;
import org.apache.atlas.GraphTransaction;
import org.apache.atlas.MetadataException;
import org.apache.atlas.ParamChecker;
import org.apache.atlas.PropertiesUtil;
import org.apache.atlas.discovery.graph.DefaultGraphPersistenceStrategy;
import org.apache.atlas.discovery.graph.GraphBackedDiscoveryService;
import org.apache.atlas.query.Expressions;
import org.apache.atlas.query.GremlinQueryResult;
import org.apache.atlas.query.HiveLineageQuery;
import org.apache.atlas.query.HiveWhereUsedQuery;
import org.apache.atlas.repository.EntityNotFoundException;
import org.apache.atlas.repository.MetadataRepository;
import org.apache.atlas.repository.graph.GraphProvider;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.hadoop.metadata.GraphTransaction;
import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.ParamChecker;
import org.apache.hadoop.metadata.PropertiesUtil;
import org.apache.hadoop.metadata.discovery.graph.DefaultGraphPersistenceStrategy;
import org.apache.hadoop.metadata.discovery.graph.GraphBackedDiscoveryService;
import org.apache.hadoop.metadata.query.Expressions;
import org.apache.hadoop.metadata.query.GremlinQueryResult;
import org.apache.hadoop.metadata.query.HiveLineageQuery;
import org.apache.hadoop.metadata.query.HiveWhereUsedQuery;
import org.apache.hadoop.metadata.repository.EntityNotFoundException;
import org.apache.hadoop.metadata.repository.MetadataRepository;
import org.apache.hadoop.metadata.repository.graph.GraphProvider;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import scala.Option; import scala.Option;
...@@ -66,19 +66,19 @@ public class HiveLineageService implements LineageService { ...@@ -66,19 +66,19 @@ public class HiveLineageService implements LineageService {
try { try {
PropertiesConfiguration conf = PropertiesUtil.getApplicationProperties(); PropertiesConfiguration conf = PropertiesUtil.getApplicationProperties();
HIVE_TABLE_TYPE_NAME = HIVE_TABLE_TYPE_NAME =
conf.getString("metadata.lineage.hive.table.type.name", "DataSet"); conf.getString("atlas.lineage.hive.table.type.name", "DataSet");
HIVE_PROCESS_TYPE_NAME = HIVE_PROCESS_TYPE_NAME =
conf.getString("metadata.lineage.hive.process.type.name", "Process"); conf.getString("atlas.lineage.hive.process.type.name", "Process");
HIVE_PROCESS_INPUT_ATTRIBUTE_NAME = HIVE_PROCESS_INPUT_ATTRIBUTE_NAME =
conf.getString("metadata.lineage.hive.process.inputs.name", "inputs"); conf.getString("atlas.lineage.hive.process.inputs.name", "inputs");
HIVE_PROCESS_OUTPUT_ATTRIBUTE_NAME = HIVE_PROCESS_OUTPUT_ATTRIBUTE_NAME =
conf.getString("metadata.lineage.hive.process.outputs.name", "outputs"); conf.getString("atlas.lineage.hive.process.outputs.name", "outputs");
HIVE_TABLE_SCHEMA_QUERY = conf.getString( HIVE_TABLE_SCHEMA_QUERY = conf.getString(
"metadata.lineage.hive.table.schema.query", "atlas.lineage.hive.table.schema.query",
"hive_table where name=\"%s\", columns"); "hive_table where name=\"%s\", columns");
HIVE_TABLE_EXISTS_QUERY = conf.getString( HIVE_TABLE_EXISTS_QUERY = conf.getString(
"metadata.lineage.hive.table.exists.query", "atlas.lineage.hive.table.exists.query",
"from hive_table where name=\"%s\""); "from hive_table where name=\"%s\"");
} catch (MetadataException e) { } catch (MetadataException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.discovery; package org.apache.atlas.discovery;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
/** /**
* Lineage service interface. * Lineage service interface.
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.discovery; package org.apache.atlas.discovery;
import org.apache.hadoop.metadata.listener.TypesChangeListener; import org.apache.atlas.listener.TypesChangeListener;
import org.apache.hadoop.metadata.repository.IndexException; import org.apache.atlas.repository.IndexException;
/** /**
......
...@@ -16,22 +16,28 @@ ...@@ -16,22 +16,28 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.discovery.graph; package org.apache.atlas.discovery.graph;
import com.thinkaurelius.titan.core.TitanVertex; import com.thinkaurelius.titan.core.TitanVertex;
import org.apache.hadoop.metadata.GraphTransaction; import org.apache.atlas.GraphTransaction;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.query.Expressions; import org.apache.atlas.query.Expressions;
import org.apache.hadoop.metadata.query.GraphPersistenceStrategies; import org.apache.atlas.query.GraphPersistenceStrategies;
import org.apache.hadoop.metadata.query.GraphPersistenceStrategies$class; import org.apache.atlas.query.GraphPersistenceStrategies$class;
import org.apache.hadoop.metadata.query.TypeUtils; import org.apache.atlas.query.IntSequence;
import org.apache.hadoop.metadata.repository.MetadataRepository; import org.apache.atlas.query.TypeUtils;
import org.apache.hadoop.metadata.repository.Constants; import org.apache.atlas.repository.Constants;
import org.apache.hadoop.metadata.repository.graph.GraphBackedMetadataRepository; import org.apache.atlas.repository.MetadataRepository;
import org.apache.hadoop.metadata.typesystem.ITypedReferenceableInstance; import org.apache.atlas.repository.graph.GraphBackedMetadataRepository;
import org.apache.hadoop.metadata.typesystem.ITypedStruct; import org.apache.atlas.typesystem.ITypedReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.persistence.Id; import org.apache.atlas.typesystem.ITypedStruct;
import org.apache.hadoop.metadata.typesystem.types.*; import org.apache.atlas.typesystem.persistence.Id;
import org.apache.atlas.typesystem.types.AttributeInfo;
import org.apache.atlas.typesystem.types.IDataType;
import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.atlas.typesystem.types.StructType;
import org.apache.atlas.typesystem.types.TraitType;
import org.apache.atlas.typesystem.types.TypeSystem;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -189,8 +195,18 @@ public class DefaultGraphPersistenceStrategy implements GraphPersistenceStrategi ...@@ -189,8 +195,18 @@ public class DefaultGraphPersistenceStrategy implements GraphPersistenceStrategi
public String idAttributeName() { return metadataRepository.getIdAttributeName(); } public String idAttributeName() { return metadataRepository.getIdAttributeName(); }
@Override @Override
public String typeTestExpression(String typeName) { public scala.collection.Seq<String> typeTestExpression(String typeName, IntSequence intSeq) {
return GraphPersistenceStrategies$class.typeTestExpression(this, typeName); return GraphPersistenceStrategies$class.typeTestExpression(this, typeName, intSeq);
}
@Override
public boolean collectTypeInstancesIntoVar() {
return GraphPersistenceStrategies$class.collectTypeInstancesIntoVar(this);
}
@Override
public boolean addGraphVertexPrefix(scala.collection.Traversable<String> preStatements) {
return GraphPersistenceStrategies$class.addGraphVertexPrefix(this, preStatements);
} }
} }
...@@ -16,27 +16,27 @@ ...@@ -16,27 +16,27 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.discovery.graph; package org.apache.atlas.discovery.graph;
import com.thinkaurelius.titan.core.TitanGraph; import com.thinkaurelius.titan.core.TitanGraph;
import com.thinkaurelius.titan.core.TitanIndexQuery; import com.thinkaurelius.titan.core.TitanIndexQuery;
import com.thinkaurelius.titan.core.TitanProperty; import com.thinkaurelius.titan.core.TitanProperty;
import com.thinkaurelius.titan.core.TitanVertex; import com.thinkaurelius.titan.core.TitanVertex;
import com.tinkerpop.blueprints.Vertex; import com.tinkerpop.blueprints.Vertex;
import org.apache.hadoop.metadata.GraphTransaction; import org.apache.atlas.GraphTransaction;
import org.apache.hadoop.metadata.MetadataServiceClient; import org.apache.atlas.MetadataServiceClient;
import org.apache.hadoop.metadata.discovery.DiscoveryException; import org.apache.atlas.discovery.DiscoveryException;
import org.apache.hadoop.metadata.discovery.DiscoveryService; import org.apache.atlas.discovery.DiscoveryService;
import org.apache.hadoop.metadata.query.Expressions; import org.apache.atlas.query.Expressions;
import org.apache.hadoop.metadata.query.GremlinEvaluator; import org.apache.atlas.query.GremlinEvaluator;
import org.apache.hadoop.metadata.query.GremlinQuery; import org.apache.atlas.query.GremlinQuery;
import org.apache.hadoop.metadata.query.GremlinQueryResult; import org.apache.atlas.query.GremlinQueryResult;
import org.apache.hadoop.metadata.query.GremlinTranslator; import org.apache.atlas.query.GremlinTranslator;
import org.apache.hadoop.metadata.query.QueryParser; import org.apache.atlas.query.QueryParser;
import org.apache.hadoop.metadata.query.QueryProcessor; import org.apache.atlas.query.QueryProcessor;
import org.apache.hadoop.metadata.repository.Constants; import org.apache.atlas.repository.Constants;
import org.apache.hadoop.metadata.repository.MetadataRepository; import org.apache.atlas.repository.MetadataRepository;
import org.apache.hadoop.metadata.repository.graph.GraphProvider; import org.apache.atlas.repository.graph.GraphProvider;
import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject; import org.codehaus.jettison.json.JSONObject;
...@@ -158,7 +158,7 @@ public class GraphBackedDiscoveryService implements DiscoveryService { ...@@ -158,7 +158,7 @@ public class GraphBackedDiscoveryService implements DiscoveryService {
* *
* @param gremlinQuery query in gremlin dsl format * @param gremlinQuery query in gremlin dsl format
* @return List of Maps * @return List of Maps
* @throws org.apache.hadoop.metadata.discovery.DiscoveryException * @throws org.apache.atlas.discovery.DiscoveryException
*/ */
@Override @Override
@GraphTransaction @GraphTransaction
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.listener; package org.apache.atlas.listener;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.typesystem.ITypedReferenceableInstance; import org.apache.atlas.typesystem.ITypedReferenceableInstance;
/** /**
* Entity (a Typed instance) change notification listener. * Entity (a Typed instance) change notification listener.
...@@ -30,7 +30,7 @@ public interface EntityChangeListener { ...@@ -30,7 +30,7 @@ public interface EntityChangeListener {
* This is upon adding a new typed instance to the repository. * This is upon adding a new typed instance to the repository.
* *
* @param typedInstance a typed instance * @param typedInstance a typed instance
* @throws org.apache.hadoop.metadata.MetadataException * @throws org.apache.atlas.MetadataException
*/ */
void onEntityAdded(ITypedReferenceableInstance typedInstance) throws MetadataException; void onEntityAdded(ITypedReferenceableInstance typedInstance) throws MetadataException;
...@@ -39,7 +39,7 @@ public interface EntityChangeListener { ...@@ -39,7 +39,7 @@ public interface EntityChangeListener {
* *
* @param guid globally unique identifier for the entity * @param guid globally unique identifier for the entity
* @param traitName trait name for the instance that needs to be added to entity * @param traitName trait name for the instance that needs to be added to entity
* @throws org.apache.hadoop.metadata.MetadataException * @throws org.apache.atlas.MetadataException
*/ */
void onTraitAdded(String guid, String traitName) throws MetadataException; void onTraitAdded(String guid, String traitName) throws MetadataException;
...@@ -48,7 +48,7 @@ public interface EntityChangeListener { ...@@ -48,7 +48,7 @@ public interface EntityChangeListener {
* *
* @param guid globally unique identifier for the entity * @param guid globally unique identifier for the entity
* @param traitName trait name for the instance that needs to be deleted from entity * @param traitName trait name for the instance that needs to be deleted from entity
* @throws org.apache.hadoop.metadata.MetadataException * @throws org.apache.atlas.MetadataException
*/ */
void onTraitDeleted(String guid, String traitName) throws MetadataException; void onTraitDeleted(String guid, String traitName) throws MetadataException;
} }
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.listener; package org.apache.atlas.listener;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.typesystem.types.IDataType; import org.apache.atlas.typesystem.types.IDataType;
/** /**
* Types change notification listener. * Types change notification listener.
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository; package org.apache.atlas.repository;
public final class Constants { public final class Constants {
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository; package org.apache.atlas.repository;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.typesystem.IReferenceableInstance; import org.apache.atlas.typesystem.IReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.persistence.Id; import org.apache.atlas.typesystem.persistence.Id;
import org.apache.hadoop.metadata.typesystem.types.DataTypes; import org.apache.atlas.typesystem.types.DataTypes;
import org.apache.hadoop.metadata.typesystem.types.ObjectGraphWalker; import org.apache.atlas.typesystem.types.ObjectGraphWalker;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
......
...@@ -16,9 +16,7 @@ ...@@ -16,9 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository; package org.apache.atlas.repository;
import org.apache.hadoop.metadata.MetadataException;
/** /**
* A simple wrapper for 404. * A simple wrapper for 404.
......
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository; package org.apache.atlas.repository;
import org.apache.hadoop.metadata.typesystem.IReferenceableInstance; import org.apache.atlas.typesystem.IReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.ITypedReferenceableInstance; import org.apache.atlas.typesystem.ITypedReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.persistence.Id; import org.apache.atlas.typesystem.persistence.Id;
import org.apache.hadoop.metadata.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.ClassType;
import org.apache.hadoop.metadata.typesystem.types.HierarchicalType; import org.apache.atlas.typesystem.types.HierarchicalType;
import org.apache.hadoop.metadata.typesystem.types.TraitType; import org.apache.atlas.typesystem.types.TraitType;
import java.util.List; import java.util.List;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository; package org.apache.atlas.repository;
public class IndexCreationException extends IndexException { public class IndexCreationException extends IndexException {
......
...@@ -15,9 +15,10 @@ ...@@ -15,9 +15,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository; package org.apache.atlas.repository;
import org.apache.hadoop.metadata.MetadataException;
import org.apache.atlas.MetadataException;
public class IndexException extends MetadataException { public class IndexException extends MetadataException {
......
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository; package org.apache.atlas.repository;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.typesystem.IReferenceableInstance; import org.apache.atlas.typesystem.IReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.ITypedReferenceableInstance; import org.apache.atlas.typesystem.ITypedReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.ITypedStruct; import org.apache.atlas.typesystem.ITypedStruct;
import org.apache.hadoop.metadata.typesystem.types.AttributeInfo; import org.apache.atlas.typesystem.types.AttributeInfo;
import org.apache.hadoop.metadata.typesystem.types.IDataType; import org.apache.atlas.typesystem.types.IDataType;
import java.util.List; import java.util.List;
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository; package org.apache.atlas.repository;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
/** /**
* Base Exception class for Repository API. * Base Exception class for Repository API.
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.graph; package org.apache.atlas.repository.graph;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.thinkaurelius.titan.core.TitanGraph; import com.thinkaurelius.titan.core.TitanGraph;
...@@ -26,30 +26,30 @@ import com.tinkerpop.blueprints.Direction; ...@@ -26,30 +26,30 @@ import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.blueprints.Edge; import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.GraphQuery; import com.tinkerpop.blueprints.GraphQuery;
import com.tinkerpop.blueprints.Vertex; import com.tinkerpop.blueprints.Vertex;
import org.apache.atlas.GraphTransaction;
import org.apache.atlas.MetadataException;
import org.apache.atlas.repository.Constants;
import org.apache.atlas.repository.EntityNotFoundException;
import org.apache.atlas.repository.MetadataRepository;
import org.apache.atlas.repository.RepositoryException;
import org.apache.atlas.typesystem.IReferenceableInstance;
import org.apache.atlas.typesystem.ITypedInstance;
import org.apache.atlas.typesystem.ITypedReferenceableInstance;
import org.apache.atlas.typesystem.ITypedStruct;
import org.apache.atlas.typesystem.persistence.Id;
import org.apache.atlas.typesystem.persistence.MapIds;
import org.apache.atlas.typesystem.types.AttributeInfo;
import org.apache.atlas.typesystem.types.ClassType;
import org.apache.atlas.typesystem.types.DataTypes;
import org.apache.atlas.typesystem.types.EnumValue;
import org.apache.atlas.typesystem.types.HierarchicalType;
import org.apache.atlas.typesystem.types.IDataType;
import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.atlas.typesystem.types.ObjectGraphWalker;
import org.apache.atlas.typesystem.types.StructType;
import org.apache.atlas.typesystem.types.TraitType;
import org.apache.atlas.typesystem.types.TypeSystem;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.metadata.GraphTransaction;
import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.repository.Constants;
import org.apache.hadoop.metadata.repository.EntityNotFoundException;
import org.apache.hadoop.metadata.repository.MetadataRepository;
import org.apache.hadoop.metadata.repository.RepositoryException;
import org.apache.hadoop.metadata.typesystem.IReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.ITypedInstance;
import org.apache.hadoop.metadata.typesystem.ITypedReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.ITypedStruct;
import org.apache.hadoop.metadata.typesystem.persistence.Id;
import org.apache.hadoop.metadata.typesystem.persistence.MapIds;
import org.apache.hadoop.metadata.typesystem.types.AttributeInfo;
import org.apache.hadoop.metadata.typesystem.types.ClassType;
import org.apache.hadoop.metadata.typesystem.types.DataTypes;
import org.apache.hadoop.metadata.typesystem.types.EnumValue;
import org.apache.hadoop.metadata.typesystem.types.HierarchicalType;
import org.apache.hadoop.metadata.typesystem.types.IDataType;
import org.apache.hadoop.metadata.typesystem.types.Multiplicity;
import org.apache.hadoop.metadata.typesystem.types.ObjectGraphWalker;
import org.apache.hadoop.metadata.typesystem.types.StructType;
import org.apache.hadoop.metadata.typesystem.types.TraitType;
import org.apache.hadoop.metadata.typesystem.types.TypeSystem;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.graph; package org.apache.atlas.repository.graph;
import com.thinkaurelius.titan.core.Cardinality; import com.thinkaurelius.titan.core.Cardinality;
import com.thinkaurelius.titan.core.PropertyKey; import com.thinkaurelius.titan.core.PropertyKey;
...@@ -26,17 +26,17 @@ import com.thinkaurelius.titan.core.schema.TitanGraphIndex; ...@@ -26,17 +26,17 @@ import com.thinkaurelius.titan.core.schema.TitanGraphIndex;
import com.thinkaurelius.titan.core.schema.TitanManagement; import com.thinkaurelius.titan.core.schema.TitanManagement;
import com.tinkerpop.blueprints.Edge; import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Vertex; import com.tinkerpop.blueprints.Vertex;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.discovery.SearchIndexer; import org.apache.atlas.discovery.SearchIndexer;
import org.apache.hadoop.metadata.repository.Constants; import org.apache.atlas.repository.Constants;
import org.apache.hadoop.metadata.repository.IndexException; import org.apache.atlas.repository.IndexException;
import org.apache.hadoop.metadata.repository.RepositoryException; import org.apache.atlas.repository.RepositoryException;
import org.apache.hadoop.metadata.typesystem.types.AttributeInfo; import org.apache.atlas.typesystem.types.AttributeInfo;
import org.apache.hadoop.metadata.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.ClassType;
import org.apache.hadoop.metadata.typesystem.types.DataTypes; import org.apache.atlas.typesystem.types.DataTypes;
import org.apache.hadoop.metadata.typesystem.types.IDataType; import org.apache.atlas.typesystem.types.IDataType;
import org.apache.hadoop.metadata.typesystem.types.StructType; import org.apache.atlas.typesystem.types.StructType;
import org.apache.hadoop.metadata.typesystem.types.TraitType; import org.apache.atlas.typesystem.types.TraitType;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -142,7 +142,7 @@ public class GraphBackedSearchIndexer implements SearchIndexer { ...@@ -142,7 +142,7 @@ public class GraphBackedSearchIndexer implements SearchIndexer {
* *
* @param typeName type name * @param typeName type name
* @param dataType data type * @param dataType data type
* @throws org.apache.hadoop.metadata.MetadataException * @throws org.apache.atlas.MetadataException
*/ */
@Override @Override
public void onAdd(String typeName, IDataType dataType) throws MetadataException { public void onAdd(String typeName, IDataType dataType) throws MetadataException {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.graph; package org.apache.atlas.repository.graph;
import com.thinkaurelius.titan.core.TitanGraph; import com.thinkaurelius.titan.core.TitanGraph;
import com.thinkaurelius.titan.core.TitanVertex; import com.thinkaurelius.titan.core.TitanVertex;
...@@ -25,9 +25,9 @@ import com.tinkerpop.blueprints.Edge; ...@@ -25,9 +25,9 @@ import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Graph; import com.tinkerpop.blueprints.Graph;
import com.tinkerpop.blueprints.GraphQuery; import com.tinkerpop.blueprints.GraphQuery;
import com.tinkerpop.blueprints.Vertex; import com.tinkerpop.blueprints.Vertex;
import org.apache.hadoop.metadata.repository.Constants; import org.apache.atlas.repository.Constants;
import org.apache.hadoop.metadata.typesystem.ITypedReferenceableInstance; import org.apache.atlas.typesystem.ITypedReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.persistence.Id; import org.apache.atlas.typesystem.persistence.Id;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.graph; package org.apache.atlas.repository.graph;
import com.google.inject.throwingproviders.CheckedProvider; import com.google.inject.throwingproviders.CheckedProvider;
import com.tinkerpop.blueprints.Graph; import com.tinkerpop.blueprints.Graph;
......
...@@ -16,16 +16,15 @@ ...@@ -16,16 +16,15 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.graph; package org.apache.atlas.repository.graph;
import com.google.inject.Provides; import com.google.inject.Provides;
import com.thinkaurelius.titan.core.TitanFactory; import com.thinkaurelius.titan.core.TitanFactory;
import com.thinkaurelius.titan.core.TitanGraph; import com.thinkaurelius.titan.core.TitanGraph;
import org.apache.atlas.MetadataException;
import org.apache.atlas.PropertiesUtil;
import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.PropertiesUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -42,7 +41,7 @@ public class TitanGraphProvider implements GraphProvider<TitanGraph> { ...@@ -42,7 +41,7 @@ public class TitanGraphProvider implements GraphProvider<TitanGraph> {
/** /**
* Constant for the configuration property that indicates the prefix. * Constant for the configuration property that indicates the prefix.
*/ */
private static final String METADATA_PREFIX = "metadata.graph."; private static final String ATLAS_PREFIX = "atlas.graph.";
private static Configuration getConfiguration() throws MetadataException { private static Configuration getConfiguration() throws MetadataException {
PropertiesConfiguration configProperties = PropertiesUtil.getApplicationProperties(); PropertiesConfiguration configProperties = PropertiesUtil.getApplicationProperties();
...@@ -52,9 +51,9 @@ public class TitanGraphProvider implements GraphProvider<TitanGraph> { ...@@ -52,9 +51,9 @@ public class TitanGraphProvider implements GraphProvider<TitanGraph> {
final Iterator<String> iterator = configProperties.getKeys(); final Iterator<String> iterator = configProperties.getKeys();
while (iterator.hasNext()) { while (iterator.hasNext()) {
String key = iterator.next(); String key = iterator.next();
if (key.startsWith(METADATA_PREFIX)) { if (key.startsWith(ATLAS_PREFIX)) {
String value = (String) configProperties.getProperty(key); String value = (String) configProperties.getProperty(key);
key = key.substring(METADATA_PREFIX.length()); key = key.substring(ATLAS_PREFIX.length());
graphConfig.setProperty(key, value); graphConfig.setProperty(key, value);
LOG.info("Using graph property {}={}", key, value); LOG.info("Using graph property {}={}", key, value);
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.memory; package org.apache.atlas.repository.memory;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
...@@ -28,12 +28,12 @@ import it.unimi.dsi.fastutil.floats.FloatArrayList; ...@@ -28,12 +28,12 @@ import it.unimi.dsi.fastutil.floats.FloatArrayList;
import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.longs.LongArrayList; import it.unimi.dsi.fastutil.longs.LongArrayList;
import it.unimi.dsi.fastutil.shorts.ShortArrayList; import it.unimi.dsi.fastutil.shorts.ShortArrayList;
import org.apache.hadoop.metadata.repository.RepositoryException; import org.apache.atlas.repository.RepositoryException;
import org.apache.hadoop.metadata.typesystem.persistence.Id; import org.apache.atlas.typesystem.persistence.Id;
import org.apache.hadoop.metadata.typesystem.persistence.StructInstance; import org.apache.atlas.typesystem.persistence.StructInstance;
import org.apache.hadoop.metadata.typesystem.types.AttributeInfo; import org.apache.atlas.typesystem.types.AttributeInfo;
import org.apache.hadoop.metadata.typesystem.types.DataTypes; import org.apache.atlas.typesystem.types.DataTypes;
import org.apache.hadoop.metadata.typesystem.types.IConstructableType; import org.apache.atlas.typesystem.types.IConstructableType;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;
......
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.memory; package org.apache.atlas.repository.memory;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.repository.RepositoryException; import org.apache.atlas.repository.RepositoryException;
import org.apache.hadoop.metadata.typesystem.persistence.Id; import org.apache.atlas.typesystem.persistence.Id;
import org.apache.hadoop.metadata.typesystem.persistence.ReferenceableInstance; import org.apache.atlas.typesystem.persistence.ReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.ClassType;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -16,19 +16,19 @@ ...@@ -16,19 +16,19 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.memory; package org.apache.atlas.repository.memory;
import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableBiMap;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import org.apache.hadoop.metadata.repository.RepositoryException; import org.apache.atlas.repository.RepositoryException;
import org.apache.hadoop.metadata.typesystem.persistence.Id; import org.apache.atlas.typesystem.persistence.Id;
import org.apache.hadoop.metadata.typesystem.persistence.ReferenceableInstance; import org.apache.atlas.typesystem.persistence.ReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.persistence.StructInstance; import org.apache.atlas.typesystem.persistence.StructInstance;
import org.apache.hadoop.metadata.typesystem.types.AttributeInfo; import org.apache.atlas.typesystem.types.AttributeInfo;
import org.apache.hadoop.metadata.typesystem.types.HierarchicalType; import org.apache.atlas.typesystem.types.HierarchicalType;
import org.apache.hadoop.metadata.typesystem.types.IConstructableType; import org.apache.atlas.typesystem.types.IConstructableType;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
......
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.memory; package org.apache.atlas.repository.memory;
import org.apache.hadoop.metadata.repository.RepositoryException; import org.apache.atlas.repository.RepositoryException;
import org.apache.hadoop.metadata.typesystem.persistence.StructInstance; import org.apache.atlas.typesystem.persistence.StructInstance;
import org.apache.hadoop.metadata.typesystem.types.IConstructableType; import org.apache.atlas.typesystem.types.IConstructableType;
public interface IAttributeStore { public interface IAttributeStore {
/** /**
......
...@@ -16,24 +16,24 @@ ...@@ -16,24 +16,24 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.memory; package org.apache.atlas.repository.memory;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.repository.DiscoverInstances; import org.apache.atlas.repository.DiscoverInstances;
import org.apache.hadoop.metadata.repository.IRepository; import org.apache.atlas.repository.IRepository;
import org.apache.hadoop.metadata.repository.RepositoryException; import org.apache.atlas.repository.RepositoryException;
import org.apache.hadoop.metadata.typesystem.IReferenceableInstance; import org.apache.atlas.typesystem.IReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.ITypedReferenceableInstance; import org.apache.atlas.typesystem.ITypedReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.persistence.Id; import org.apache.atlas.typesystem.persistence.Id;
import org.apache.hadoop.metadata.typesystem.persistence.MapIds; import org.apache.atlas.typesystem.persistence.MapIds;
import org.apache.hadoop.metadata.typesystem.persistence.ReferenceableInstance; import org.apache.atlas.typesystem.persistence.ReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.ClassType;
import org.apache.hadoop.metadata.typesystem.types.DataTypes; import org.apache.atlas.typesystem.types.DataTypes;
import org.apache.hadoop.metadata.typesystem.types.HierarchicalType; import org.apache.atlas.typesystem.types.HierarchicalType;
import org.apache.hadoop.metadata.typesystem.types.Multiplicity; import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.hadoop.metadata.typesystem.types.ObjectGraphWalker; import org.apache.atlas.typesystem.types.ObjectGraphWalker;
import org.apache.hadoop.metadata.typesystem.types.TraitType; import org.apache.atlas.typesystem.types.TraitType;
import org.apache.hadoop.metadata.typesystem.types.TypeSystem; import org.apache.atlas.typesystem.types.TypeSystem;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
...@@ -105,7 +105,7 @@ public class MemRepository implements IRepository { ...@@ -105,7 +105,7 @@ public class MemRepository implements IRepository {
* *
* @param i * @param i
* @return * @return
* @throws org.apache.hadoop.metadata.repository.RepositoryException * @throws org.apache.atlas.repository.RepositoryException
*/ */
public ITypedReferenceableInstance create(IReferenceableInstance i) throws RepositoryException { public ITypedReferenceableInstance create(IReferenceableInstance i) throws RepositoryException {
......
...@@ -16,18 +16,18 @@ ...@@ -16,18 +16,18 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.memory; package org.apache.atlas.repository.memory;
import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableCollection;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.typesystem.ITypedReferenceableInstance; import org.apache.atlas.typesystem.ITypedReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.persistence.Id; import org.apache.atlas.typesystem.persistence.Id;
import org.apache.hadoop.metadata.typesystem.types.DataTypes; import org.apache.atlas.typesystem.types.DataTypes;
import org.apache.hadoop.metadata.typesystem.types.Multiplicity; import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.hadoop.metadata.typesystem.types.ObjectGraphWalker; import org.apache.atlas.typesystem.types.ObjectGraphWalker;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
......
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.memory; package org.apache.atlas.repository.memory;
import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableBiMap;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import org.apache.hadoop.metadata.repository.RepositoryException; import org.apache.atlas.repository.RepositoryException;
import org.apache.hadoop.metadata.typesystem.persistence.StructInstance; import org.apache.atlas.typesystem.persistence.StructInstance;
import org.apache.hadoop.metadata.typesystem.types.AttributeInfo; import org.apache.atlas.typesystem.types.AttributeInfo;
import org.apache.hadoop.metadata.typesystem.types.StructType; import org.apache.atlas.typesystem.types.StructType;
import java.util.Collection; import java.util.Collection;
import java.util.Map; import java.util.Map;
......
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.memory; package org.apache.atlas.repository.memory;
import org.apache.hadoop.metadata.repository.RepositoryException; import org.apache.atlas.repository.RepositoryException;
import org.apache.hadoop.metadata.typesystem.persistence.ReferenceableInstance; import org.apache.atlas.typesystem.persistence.ReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.persistence.StructInstance; import org.apache.atlas.typesystem.persistence.StructInstance;
import org.apache.hadoop.metadata.typesystem.types.TraitType; import org.apache.atlas.typesystem.types.TraitType;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.typestore; package org.apache.atlas.repository.typestore;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.inject.Inject; import com.google.inject.Inject;
...@@ -25,27 +25,26 @@ import com.thinkaurelius.titan.core.TitanGraph; ...@@ -25,27 +25,26 @@ import com.thinkaurelius.titan.core.TitanGraph;
import com.tinkerpop.blueprints.Direction; import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.blueprints.Edge; import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Vertex; import com.tinkerpop.blueprints.Vertex;
import org.apache.commons.lang.StringUtils; import org.apache.atlas.GraphTransaction;
import org.apache.hadoop.metadata.GraphTransaction; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.repository.Constants;
import org.apache.hadoop.metadata.repository.Constants; import org.apache.atlas.repository.graph.GraphProvider;
import org.apache.hadoop.metadata.repository.graph.GraphProvider; import org.apache.atlas.typesystem.TypesDef;
import org.apache.hadoop.metadata.typesystem.TypesDef; import org.apache.atlas.typesystem.types.AttributeDefinition;
import org.apache.hadoop.metadata.typesystem.types.AttributeDefinition; import org.apache.atlas.typesystem.types.AttributeInfo;
import org.apache.hadoop.metadata.typesystem.types.AttributeInfo; import org.apache.atlas.typesystem.types.ClassType;
import org.apache.hadoop.metadata.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.DataTypes;
import org.apache.hadoop.metadata.typesystem.types.DataTypes; import org.apache.atlas.typesystem.types.EnumType;
import org.apache.hadoop.metadata.typesystem.types.EnumType; import org.apache.atlas.typesystem.types.EnumTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.EnumTypeDefinition; import org.apache.atlas.typesystem.types.EnumValue;
import org.apache.hadoop.metadata.typesystem.types.EnumValue; import org.apache.atlas.typesystem.types.HierarchicalType;
import org.apache.hadoop.metadata.typesystem.types.HierarchicalType; import org.apache.atlas.typesystem.types.HierarchicalTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.HierarchicalTypeDefinition; import org.apache.atlas.typesystem.types.IDataType;
import org.apache.hadoop.metadata.typesystem.types.IDataType; import org.apache.atlas.typesystem.types.StructType;
import org.apache.hadoop.metadata.typesystem.types.StructType; import org.apache.atlas.typesystem.types.StructTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.StructTypeDefinition; import org.apache.atlas.typesystem.types.TraitType;
import org.apache.hadoop.metadata.typesystem.types.TraitType; import org.apache.atlas.typesystem.types.TypeSystem;
import org.apache.hadoop.metadata.typesystem.types.TypeSystem; import org.apache.atlas.typesystem.types.TypeUtils;
import org.apache.hadoop.metadata.typesystem.types.TypeUtils;
import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONException;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.typestore; package org.apache.atlas.repository.typestore;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.typesystem.TypesDef; import org.apache.atlas.typesystem.TypesDef;
import org.apache.hadoop.metadata.typesystem.types.TypeSystem; import org.apache.atlas.typesystem.types.TypeSystem;
public interface ITypeStore { public interface ITypeStore {
/** /**
...@@ -42,7 +42,7 @@ public interface ITypeStore { ...@@ -42,7 +42,7 @@ public interface ITypeStore {
/** /**
* Restore all type definitions * Restore all type definitions
* @return List of persisted type definitions * @return List of persisted type definitions
* @throws org.apache.hadoop.metadata.MetadataException * @throws org.apache.atlas.MetadataException
*/ */
TypesDef restore() throws MetadataException; TypesDef restore() throws MetadataException;
} }
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.repository.typestore; package org.apache.atlas.repository.typestore;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
public class StorageException extends MetadataException { public class StorageException extends MetadataException {
public StorageException(String type) { public StorageException(String type) {
......
...@@ -16,41 +16,42 @@ ...@@ -16,41 +16,42 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.services; package org.apache.atlas.services;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.inject.Provider; import com.google.inject.Provider;
import com.sun.jersey.api.NotFoundException; import org.apache.atlas.GraphTransaction;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.MetadataServiceClient; import org.apache.atlas.MetadataServiceClient;
import org.apache.hadoop.metadata.ParamChecker; import org.apache.atlas.ParamChecker;
import org.apache.hadoop.metadata.TypeNotFoundException; import org.apache.atlas.TypeNotFoundException;
import org.apache.hadoop.metadata.classification.InterfaceAudience; import org.apache.atlas.classification.InterfaceAudience;
import org.apache.hadoop.metadata.discovery.SearchIndexer; import org.apache.atlas.discovery.SearchIndexer;
import org.apache.hadoop.metadata.listener.EntityChangeListener; import org.apache.atlas.listener.EntityChangeListener;
import org.apache.hadoop.metadata.repository.IndexCreationException; import org.apache.atlas.listener.TypesChangeListener;
import org.apache.hadoop.metadata.repository.MetadataRepository; import org.apache.atlas.repository.IndexCreationException;
import org.apache.hadoop.metadata.repository.typestore.ITypeStore; import org.apache.atlas.repository.MetadataRepository;
import org.apache.hadoop.metadata.typesystem.ITypedReferenceableInstance; import org.apache.atlas.repository.typestore.ITypeStore;
import org.apache.hadoop.metadata.typesystem.ITypedStruct; import org.apache.atlas.typesystem.ITypedReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.Referenceable; import org.apache.atlas.typesystem.ITypedStruct;
import org.apache.hadoop.metadata.typesystem.Struct; import org.apache.atlas.typesystem.Referenceable;
import org.apache.hadoop.metadata.typesystem.TypesDef; import org.apache.atlas.typesystem.Struct;
import org.apache.hadoop.metadata.typesystem.json.InstanceSerialization; import org.apache.atlas.typesystem.TypesDef;
import org.apache.hadoop.metadata.typesystem.json.TypesSerialization; import org.apache.atlas.typesystem.json.InstanceSerialization;
import org.apache.hadoop.metadata.typesystem.types.AttributeDefinition; import org.apache.atlas.typesystem.json.TypesSerialization;
import org.apache.hadoop.metadata.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.AttributeDefinition;
import org.apache.hadoop.metadata.typesystem.types.DataTypes; import org.apache.atlas.typesystem.types.ClassType;
import org.apache.hadoop.metadata.typesystem.types.EnumTypeDefinition; import org.apache.atlas.typesystem.types.DataTypes;
import org.apache.hadoop.metadata.typesystem.types.HierarchicalTypeDefinition; import org.apache.atlas.typesystem.types.EnumTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.IDataType; import org.apache.atlas.typesystem.types.HierarchicalTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.Multiplicity; import org.apache.atlas.typesystem.types.IDataType;
import org.apache.hadoop.metadata.typesystem.types.StructTypeDefinition; import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.hadoop.metadata.typesystem.types.TraitType; import org.apache.atlas.typesystem.types.StructTypeDefinition;
import org.apache.hadoop.metadata.typesystem.types.TypeSystem; import org.apache.atlas.typesystem.types.TraitType;
import org.apache.hadoop.metadata.typesystem.types.TypeUtils; import org.apache.atlas.typesystem.types.TypeSystem;
import org.apache.hadoop.metadata.typesystem.types.utils.TypesUtil; import org.apache.atlas.typesystem.types.TypeUtils;
import org.apache.atlas.typesystem.types.utils.TypesUtil;
import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject; import org.codehaus.jettison.json.JSONObject;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -58,7 +59,6 @@ import org.slf4j.LoggerFactory; ...@@ -58,7 +59,6 @@ import org.slf4j.LoggerFactory;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import java.util.HashMap;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -124,7 +124,8 @@ public class DefaultMetadataService implements MetadataService { ...@@ -124,7 +124,8 @@ public class DefaultMetadataService implements MetadataService {
ImmutableList.<String>of(), NAME_ATTRIBUTE, DESCRIPTION_ATTRIBUTE); ImmutableList.<String>of(), NAME_ATTRIBUTE, DESCRIPTION_ATTRIBUTE);
HierarchicalTypeDefinition<ClassType> datasetType = TypesUtil HierarchicalTypeDefinition<ClassType> datasetType = TypesUtil
.createClassTypeDef(MetadataServiceClient.DATA_SET_SUPER_TYPE, ImmutableList.<String>of(), .createClassTypeDef(MetadataServiceClient.DATA_SET_SUPER_TYPE,
ImmutableList.<String>of(),
NAME_ATTRIBUTE, DESCRIPTION_ATTRIBUTE); NAME_ATTRIBUTE, DESCRIPTION_ATTRIBUTE);
HierarchicalTypeDefinition<ClassType> processType = TypesUtil HierarchicalTypeDefinition<ClassType> processType = TypesUtil
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.services; package org.apache.atlas.services;
import org.apache.hadoop.metadata.MetadataException; import org.apache.atlas.MetadataException;
import org.apache.hadoop.metadata.typesystem.types.DataTypes; import org.apache.atlas.typesystem.types.DataTypes;
import org.codehaus.jettison.json.JSONObject; import org.codehaus.jettison.json.JSONObject;
import java.util.List; import java.util.List;
......
...@@ -16,18 +16,17 @@ ...@@ -16,18 +16,17 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.query package org.apache.atlas.query
import java.util import java.util
import Expressions._
import com.thinkaurelius.titan.core.TitanGraph import com.thinkaurelius.titan.core.TitanGraph
import org.apache.hadoop.metadata.MetadataException import org.apache.atlas.query.Expressions._
import org.apache.hadoop.metadata.typesystem.ITypedStruct import org.apache.atlas.typesystem.ITypedStruct
import org.apache.hadoop.metadata.typesystem.json.{InstanceSerialization, Serialization} import org.apache.atlas.typesystem.json.{InstanceSerialization, Serialization}
import org.apache.hadoop.metadata.typesystem.persistence.{Id, StructInstance} import org.apache.atlas.typesystem.persistence.StructInstance
import org.apache.hadoop.metadata.typesystem.types.{TypeSystem, StructType, DataTypes} import org.apache.atlas.typesystem.types.DataTypes.{MapType, PrimitiveType}
import org.apache.hadoop.metadata.typesystem.types.DataTypes.{MapType, PrimitiveType} import org.apache.atlas.typesystem.types.{DataTypes, StructType, TypeSystem}
/** /**
* Represents a Query to compute the closure based on a relationship between entities of a particular type. * Represents a Query to compute the closure based on a relationship between entities of a particular type.
......
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.query package org.apache.atlas.query
import org.apache.hadoop.metadata.MetadataException import org.apache.atlas.MetadataException
import org.apache.hadoop.metadata.typesystem.types.DataTypes.{ArrayType, PrimitiveType, TypeCategory} import org.apache.atlas.typesystem.types.DataTypes.{ArrayType, PrimitiveType, TypeCategory}
import org.apache.hadoop.metadata.typesystem.types._ import org.apache.atlas.typesystem.types._
object Expressions { object Expressions {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment