ATLAS-2251: Remove TypeSystem and related implementation, to avoid unncessary 
duplicate of type details in cache


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/435fe3fb
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/435fe3fb
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/435fe3fb

Branch: refs/heads/master
Commit: 435fe3fbad0dbb41297cc7af7986d3062704d7ee
Parents: 0abf84c
Author: Madhan Neethiraj <[email protected]>
Authored: Fri Nov 3 22:45:05 2017 -0700
Committer: Madhan Neethiraj <[email protected]>
Committed: Sun Nov 12 10:08:25 2017 -0800

----------------------------------------------------------------------
 addons/falcon-bridge/pom.xml                    |   61 +-
 .../atlas/falcon/bridge/FalconBridge.java       |    4 +-
 .../apache/atlas/falcon/hook/FalconHook.java    |    9 +-
 .../apache/atlas/falcon/hook/FalconHookIT.java  |   20 +-
 addons/hbase-bridge/pom.xml                     |   97 +-
 .../atlas/hbase/bridge/HBaseAtlasHook.java      |   47 +-
 .../hbase/model/HBaseOperationContext.java      |    8 +-
 .../apache/atlas/hbase/HBaseAtlasHookIT.java    |    2 +-
 addons/hdfs-model/pom.xml                       |   66 -
 addons/hive-bridge/pom.xml                      |   56 +-
 .../atlas/hive/bridge/ColumnLineageUtils.java   |    2 +-
 .../atlas/hive/bridge/HiveMetaStoreBridge.java  |   18 +-
 .../org/apache/atlas/hive/hook/HiveHook.java    |   29 +-
 .../java/org/apache/atlas/hive/HiveITBase.java  |    4 +-
 .../hive/bridge/HiveMetaStoreBridgeTest.java    |    4 +-
 .../hive/bridge/HiveMetastoreBridgeIT.java      |    8 +-
 .../org/apache/atlas/hive/hook/HiveHookIT.java  |   26 +-
 addons/sqoop-bridge/pom.xml                     |   61 +-
 .../org/apache/atlas/sqoop/hook/SqoopHook.java  |    9 +-
 addons/storm-bridge/pom.xml                     |  115 +-
 .../apache/atlas/storm/hook/StormAtlasHook.java |    2 +-
 .../atlas/storm/hook/StormAtlasHookIT.java      |    2 +-
 authorization/pom.xml                           |    7 +
 client/client-v1/pom.xml                        |    9 +-
 .../main/java/org/apache/atlas/AtlasClient.java |   54 +-
 .../java/org/apache/atlas/EntityAuditEvent.java |   19 +-
 .../src/main/java/org/apache/atlas/SerDe.java   |   80 -
 .../java/org/apache/atlas/AtlasClientTest.java  |    6 +-
 client/pom.xml                                  |   12 +-
 common/pom.xml                                  |    1 +
 .../org/apache/atlas/AtlasConfiguration.java    |   83 --
 .../org/apache/atlas/repository/Constants.java  |    7 +
 graphdb/api/pom.xml                             |    6 +-
 .../atlas/repository/graphdb/AtlasGraph.java    |   12 +-
 graphdb/common/pom.xml                          |    6 +
 .../graphdb/janus/AtlasJanusGraph.java          |    6 +-
 .../repository/graphdb/titan0/Titan0Graph.java  |    6 +-
 .../repository/graphdb/titan1/Titan1Graph.java  |    6 +-
 intg/pom.xml                                    |   26 +-
 .../org/apache/atlas/AtlasConfiguration.java    |   83 ++
 .../AtlasNotificationBaseMessage.java           |  208 +++
 .../notification/AtlasNotificationMessage.java  |  101 ++
 .../AtlasNotificationStringMessage.java         |   82 ++
 .../model/notification/EntityNotification.java  |   86 ++
 .../model/notification/HookNotification.java    |  103 ++
 .../model/notification/MessageVersion.java      |  170 +++
 .../java/org/apache/atlas/type/AtlasType.java   |  167 ++-
 .../apache/atlas/type/AtlasTypeRegistry.java    |    4 +-
 .../org/apache/atlas/type/AtlasTypeUtil.java    |  157 +-
 .../atlas/typesystem/types/DataTypes.java       |   35 +
 .../model/instance/AtlasSystemAttributes.java   |  156 ++
 .../org/apache/atlas/v1/model/instance/Id.java  |  270 ++++
 .../atlas/v1/model/instance/Referenceable.java  |  252 ++++
 .../apache/atlas/v1/model/instance/Struct.java  |  211 +++
 .../model/lineage/DataSetLineageResponse.java   |   65 +
 .../atlas/v1/model/lineage/LineageResponse.java |   75 +
 .../atlas/v1/model/lineage/SchemaResponse.java  |  116 ++
 .../notification/EntityNotificationV1.java      |  231 +++
 .../model/notification/HookNotificationV1.java  |  357 +++++
 .../v1/model/typedef/AttributeDefinition.java   |  179 +++
 .../v1/model/typedef/ClassTypeDefinition.java   |   57 +
 .../v1/model/typedef/EnumTypeDefinition.java    |  174 +++
 .../typedef/HierarchicalTypeDefinition.java     |   96 ++
 .../atlas/v1/model/typedef/Multiplicity.java    |  167 +++
 .../v1/model/typedef/StructTypeDefinition.java  |  119 ++
 .../v1/model/typedef/TraitTypeDefinition.java   |   51 +
 .../apache/atlas/v1/model/typedef/TypesDef.java |  118 ++
 .../v1/typesystem/types/utils/TypesUtil.java    |  112 ++
 .../apache/atlas/TestRelationshipUtilsV2.java   |   26 +-
 .../test/java/org/apache/atlas/TestUtilsV2.java |  144 +-
 .../atlas/type/TestAtlasRelationshipType.java   |   14 +-
 .../test/resources/atlas-application.properties |  145 ++
 intg/src/test/resources/policy-store.txt        |    9 +
 intg/src/test/resources/sampleInstance.json     |   72 +
 intg/src/test/resources/sampleTypes.json        |  633 ++++++++
 .../test/resources/users-credentials.properties |    3 +
 notification/pom.xml                            |   33 +-
 .../java/org/apache/atlas/hook/AtlasHook.java   |   30 +-
 .../apache/atlas/kafka/AtlasKafkaConsumer.java  |   18 +-
 .../apache/atlas/kafka/KafkaNotification.java   |    5 +-
 .../AbstractMessageDeserializer.java            |  132 +-
 .../notification/AbstractNotification.java      |   40 +-
 .../AbstractNotificationConsumer.java           |   19 +-
 .../AtlasNotificationBaseMessage.java           |  194 ---
 .../notification/AtlasNotificationMessage.java  |   87 --
 .../AtlasNotificationMessageDeserializer.java   |   59 +-
 .../AtlasNotificationStringMessage.java         |   66 -
 .../atlas/notification/MessageVersion.java      |  141 --
 .../notification/NotificationInterface.java     |   49 +-
 .../notification/SplitMessageAggregator.java    |    2 +
 .../entity/EntityMessageDeserializer.java       |   41 +-
 .../notification/entity/EntityNotification.java |   65 -
 .../entity/EntityNotificationImpl.java          |  170 ---
 .../hook/HookMessageDeserializer.java           |   27 +-
 .../notification/hook/HookNotification.java     |  275 ----
 .../org/apache/atlas/hook/AtlasHookTest.java    |   53 +-
 .../apache/atlas/kafka/KafkaConsumerTest.java   |  130 +-
 .../atlas/kafka/KafkaNotificationMockTest.java  |    2 +-
 .../atlas/kafka/KafkaNotificationTest.java      |   37 +-
 .../AbstractNotificationConsumerTest.java       |  103 +-
 .../notification/AbstractNotificationTest.java  |   64 +-
 .../AtlasNotificationMessageTest.java           |    2 +
 .../atlas/notification/MessageVersionTest.java  |    1 +
 .../SplitMessageAggregatorTest.java             |    3 +-
 .../entity/EntityMessageDeserializerTest.java   |   73 -
 .../EntityNotificationDeserializerTest.java     |   71 +
 .../entity/EntityNotificationImplTest.java      |  149 --
 .../entity/EntityNotificationTest.java          |  128 ++
 .../hook/HookMessageDeserializerTest.java       |  170 ---
 .../hook/HookNotificationDeserializerTest.java  |  167 +++
 .../notification/hook/HookNotificationTest.java |   40 +-
 pom.xml                                         |  154 +-
 repository/pom.xml                              |   85 +-
 .../atlas/GraphTransactionInterceptor.java      |    2 +-
 .../atlas/discovery/AtlasLineageService.java    |   16 +
 .../atlas/discovery/DataSetLineageService.java  |  233 ---
 .../atlas/discovery/DiscoveryService.java       |   59 -
 .../atlas/discovery/EntityDiscoveryService.java |   22 +-
 .../atlas/discovery/EntityLineageService.java   |   86 +-
 .../apache/atlas/discovery/SearchIndexer.java   |    4 +-
 .../graph/DefaultGraphPersistenceStrategy.java  |  292 ----
 .../graph/GraphBackedDiscoveryService.java      |  269 ----
 .../gremlin/Gremlin2ExpressionFactory.java      |  379 -----
 .../gremlin/Gremlin3ExpressionFactory.java      |  485 ------
 .../atlas/gremlin/GremlinExpressionFactory.java |  658 ---------
 .../atlas/gremlin/optimizer/AliasFinder.java    |  103 --
 .../gremlin/optimizer/CallHierarchyVisitor.java |   62 -
 .../optimizer/ExpandAndsOptimization.java       |  127 --
 .../optimizer/ExpandOrsOptimization.java        |  588 --------
 .../gremlin/optimizer/ExpressionFinder.java     |   69 -
 .../gremlin/optimizer/FunctionGenerator.java    |  326 -----
 .../gremlin/optimizer/GremlinOptimization.java  |   48 -
 .../optimizer/GremlinQueryOptimizer.java        |  262 ----
 .../gremlin/optimizer/HasForbiddenType.java     |   52 -
 .../apache/atlas/gremlin/optimizer/IsOr.java    |   48 -
 .../atlas/gremlin/optimizer/IsOrParent.java     |   60 -
 .../gremlin/optimizer/OptimizationContext.java  |  116 --
 .../atlas/gremlin/optimizer/OrderFinder.java    |   68 -
 .../gremlin/optimizer/PathExpressionFinder.java |   61 -
 .../atlas/gremlin/optimizer/RangeFinder.java    |   68 -
 .../optimizer/RepeatExpressionFinder.java       |   65 -
 .../gremlin/optimizer/SplitPointFinder.java     |  161 --
 .../gremlin/optimizer/UpdatedExpressions.java   |   45 -
 .../org/apache/atlas/query/Expressions.java     |   45 +
 .../org/apache/atlas/query/GremlinQuery.java    |   42 +
 .../apache/atlas/query/GremlinTranslator.java   |   34 +
 .../org/apache/atlas/query/QueryParams.java     |   50 +
 .../org/apache/atlas/query/QueryParser.java     |   43 +
 .../org/apache/atlas/query/QueryProcessor.java  |   28 +
 .../atlas/query/SelectExpressionHelper.java     |   30 +
 .../atlas/repository/DiscoverInstances.java     |   77 -
 .../apache/atlas/repository/IRepository.java    |   51 -
 .../atlas/repository/MetadataRepository.java    |  198 ---
 .../repository/RepositoryConfiguration.java     |   37 -
 .../repository/audit/EntityAuditListener.java   |  115 +-
 .../AtlasClassificationFormatConverter.java     |   18 +-
 .../converters/AtlasEntityFormatConverter.java  |   87 +-
 .../converters/AtlasEnumFormatConverter.java    |    6 +-
 .../converters/AtlasInstanceConverter.java      |  218 ++-
 .../converters/AtlasObjectIdConverter.java      |   58 +-
 .../converters/AtlasStructFormatConverter.java  |  131 +-
 .../converters/TypeConverterUtil.java           |  259 ++--
 .../atlas/repository/graph/DeleteHandler.java   |  468 ------
 .../atlas/repository/graph/EntityProcessor.java |   82 --
 .../atlas/repository/graph/FullTextMapper.java  |  174 ---
 .../repository/graph/FullTextMapperV2.java      |    4 +-
 .../graph/GraphBackedMetadataRepository.java    |  505 -------
 .../graph/GraphBackedSearchIndexer.java         |  386 ++---
 .../atlas/repository/graph/GraphHelper.java     |  179 +--
 .../graph/GraphSchemaInitializer.java           |   50 -
 .../graph/GraphToTypedInstanceMapper.java       |  452 ------
 .../repository/graph/HardDeleteHandler.java     |   48 -
 .../repository/graph/SoftDeleteHandler.java     |   74 -
 .../graph/TypedInstanceToGraphMapper.java       |  941 ------------
 .../repository/graph/VertexLookupContext.java   |  166 ---
 .../repository/memory/AttributeStores.java      |  632 --------
 .../atlas/repository/memory/ClassStore.java     |   93 --
 .../memory/HierarchicalTypeStore.java           |  207 ---
 .../repository/memory/IAttributeStore.java      |   49 -
 .../atlas/repository/memory/MemRepository.java  |  299 ----
 .../memory/ReplaceIdWithInstance.java           |  132 --
 .../atlas/repository/memory/StructStore.java    |   87 --
 .../atlas/repository/memory/TraitStore.java     |   57 -
 .../store/graph/AtlasEntityStore.java           |    9 +
 .../graph/v1/AtlasEntityChangeNotifier.java     |   34 +-
 .../store/graph/v1/AtlasEntityStoreV1.java      |   20 +
 .../store/graph/v1/AtlasGraphUtilsV1.java       |   19 +
 .../store/graph/v1/AtlasStructDefStoreV1.java   |   12 +-
 .../typestore/GraphBackedTypeStore.java         |  394 -----
 .../atlas/repository/typestore/ITypeStore.java  |   53 -
 .../repository/typestore/StorageException.java  |   35 -
 .../typestore/StoreBackedTypeCache.java         |  239 ---
 .../typestore/TypePersistenceVisitor.java       |  116 --
 .../repository/typestore/TypeVertexFinder.java  |  103 --
 .../repository/typestore/TypeVertexInfo.java    |   94 --
 .../atlas/repository/typestore/TypeVisitor.java |   96 --
 .../atlas/services/DefaultMetadataService.java  |  821 -----------
 .../util/AtlasRepositoryConfiguration.java      |   28 -
 .../apache/atlas/util/AttributeValueMap.java    |    4 +-
 .../atlas/util/CompiledQueryCacheKey.java       |   87 --
 .../org/apache/atlas/util/IndexedInstance.java  |    8 +-
 .../org/apache/atlas/util/NoopGremlinQuery.java |   39 -
 .../org/apache/atlas/util/TypeDefSorter.java    |   83 --
 .../org/apache/atlas/query/ClosureQuery.scala   |  327 -----
 .../org/apache/atlas/query/Expressions.scala    |  923 ------------
 .../query/GraphPersistenceStrategies.scala      |  367 -----
 .../apache/atlas/query/GremlinEvaluator.scala   |  186 ---
 .../org/apache/atlas/query/GremlinQuery.scala   |  806 ----------
 .../org/apache/atlas/query/QueryParser.scala    |  557 -------
 .../org/apache/atlas/query/QueryProcessor.scala |  143 --
 .../scala/org/apache/atlas/query/Resolver.scala |  182 ---
 .../org/apache/atlas/query/TypeUtils.scala      |  279 ----
 .../org/apache/atlas/BaseRepositoryTest.java    |  428 ------
 .../atlas/RepositoryServiceLoadingTest.java     |   39 -
 .../test/java/org/apache/atlas/TestModules.java |   66 +-
 .../test/java/org/apache/atlas/TestUtils.java   |  778 ----------
 .../discovery/DataSetLineageServiceTest.java    |  497 -------
 .../discovery/EntityDiscoveryServiceTest.java   |  144 --
 .../GraphBackedDiscoveryServiceTest.java        | 1334 -----------------
 .../atlas/lineage/EntityLineageServiceTest.java |  356 -----
 .../apache/atlas/query/QueryProcessorTest.java  |  157 --
 .../org/apache/atlas/repository/BaseTest.java   |   30 -
 .../audit/AuditRepositoryTestBase.java          |   35 +-
 .../audit/HBaseBasedAuditRepositoryHATest.java  |   96 --
 .../audit/HBaseBasedAuditRepositoryTest.java    |   72 -
 .../atlas/repository/audit/HBaseTestUtils.java  |   53 -
 .../AbstractGremlinQueryOptimizerTest.java      |  708 ---------
 ...hBackedMetadataRepositoryDeleteTestBase.java | 1205 ---------------
 .../GraphBackedMetadataRepositoryTest.java      |  864 -----------
 .../GraphBackedRepositoryHardDeleteTest.java    |  212 ---
 .../GraphBackedRepositorySoftDeleteTest.java    |  239 ---
 .../graph/GraphBackedSearchIndexerMockTest.java |   91 --
 .../graph/GraphBackedSearchIndexerTest.java     |  177 ---
 .../repository/graph/GraphHelperMockTest.java   |  121 --
 .../atlas/repository/graph/GraphHelperTest.java |  218 ---
 .../graph/GraphRepoMapperScaleTest.java         |  241 ---
 .../graph/Gremlin2QueryOptimizerTest.java       |  364 -----
 .../graph/Gremlin3QueryOptimizerTest.java       |  367 -----
 .../ReverseReferenceUpdateHardDeleteTest.java   |   46 -
 .../ReverseReferenceUpdateSoftDeleteTest.java   |   79 -
 .../graph/ReverseReferenceUpdateTestBase.java   |  275 ----
 .../atlas/repository/graph/TestIntSequence.java |   35 -
 .../repository/impexp/ExportServiceTest.java    |    2 +-
 .../graph/v1/AtlasDeleteHandlerV1Test.java      | 1141 ---------------
 .../graph/v1/AtlasEntityDefStoreV1Test.java     |    5 +-
 .../store/graph/v1/AtlasEntityStoreV1Test.java  |   44 +-
 .../graph/v1/AtlasRelationshipStoreV1Test.java  |    2 +-
 .../store/graph/v1/HardDeleteHandlerV1Test.java |  177 ---
 .../graph/v1/InverseReferenceUpdateV1Test.java  |   42 +-
 .../store/graph/v1/SoftDeleteHandlerV1Test.java |  215 ---
 .../typestore/GraphBackedTypeStoreTest.java     |  256 ----
 .../typestore/StoreBackedTypeCacheTest.java     |  169 ---
 .../service/DefaultMetadataServiceTest.java     | 1381 ------------------
 ...StoreBackedTypeCacheMetadataServiceTest.java |  143 --
 .../atlas/util/CompiledQueryCacheKeyTest.java   |  104 --
 .../java/org/apache/atlas/utils/HiveModel.java  |  303 ----
 .../org/apache/atlas/query/ExpressionTest.scala |  172 ---
 .../org/apache/atlas/query/GremlinTest.scala    | 1068 --------------
 .../org/apache/atlas/query/GremlinTest2.scala   |  154 --
 .../apache/atlas/query/HiveTitanSample.scala    |  243 ---
 .../org/apache/atlas/query/LexerTest.scala      |   49 -
 .../apache/atlas/query/LineageQueryTest.scala   |  541 -------
 .../org/apache/atlas/query/ParserTest.scala     |  100 --
 .../apache/atlas/query/QueryTestsUtils.scala    |  206 ---
 server-api/pom.xml                              |    5 -
 .../java/org/apache/atlas/RequestContext.java   |  197 ---
 .../java/org/apache/atlas/RequestContextV1.java |   38 +-
 .../apache/atlas/discovery/LineageService.java  |   75 -
 .../exception/EntityNotFoundException.java      |   44 +
 .../atlas/exception/NotFoundException.java      |   46 +
 .../exception/SchemaNotFoundException.java      |   40 +
 .../atlas/exception/TraitNotFoundException.java |   45 +
 .../atlas/listener/EntityChangeListener.java    |   16 +-
 .../atlas/listener/TypesChangeListener.java     |   10 +-
 .../apache/atlas/services/MetadataService.java  |  317 ----
 .../exception/EntityExistsException.java        |   32 -
 .../exception/EntityNotFoundException.java      |   44 -
 .../typesystem/exception/NotFoundException.java |   46 -
 .../NullRequiredAttributeException.java         |   59 -
 .../exception/SchemaNotFoundException.java      |   40 -
 .../exception/TraitNotFoundException.java       |   45 -
 typesystem/.gitignore                           |   35 -
 typesystem/LICENSE.md                           |  201 ---
 typesystem/doc/IDataType.uml                    |  190 ---
 typesystem/doc/Instance.uml                     |  126 --
 typesystem/doc/QueryDSL.org                     |  266 ----
 typesystem/doc/notes.MD                         |   78 -
 typesystem/pom.xml                              |  165 ---
 .../atlas/classification/InterfaceAudience.java |   48 -
 .../org/apache/atlas/typesystem/IInstance.java  |   41 -
 .../typesystem/IReferenceableInstance.java      |   38 -
 .../org/apache/atlas/typesystem/IStruct.java    |   26 -
 .../apache/atlas/typesystem/ITypedInstance.java |   88 --
 .../typesystem/ITypedReferenceableInstance.java |   22 -
 .../apache/atlas/typesystem/ITypedStruct.java   |   22 -
 .../apache/atlas/typesystem/Referenceable.java  |  229 ---
 .../org/apache/atlas/typesystem/Struct.java     |  124 --
 .../exception/TypeExistsException.java          |   27 -
 .../exception/TypeNotFoundException.java        |   46 -
 .../persistence/AtlasSystemAttributes.java      |  115 --
 .../persistence/DownCastStructInstance.java     |   80 -
 .../apache/atlas/typesystem/persistence/Id.java |  307 ----
 .../atlas/typesystem/persistence/MapIds.java    |   70 -
 .../persistence/ReferenceableInstance.java      |  135 --
 .../typesystem/persistence/StructInstance.java  |  790 ----------
 .../typesystem/types/AbstractDataType.java      |  119 --
 .../typesystem/types/AttributeDefinition.java   |   81 -
 .../atlas/typesystem/types/AttributeInfo.java   |  134 --
 .../atlas/typesystem/types/ClassType.java       |  259 ----
 .../atlas/typesystem/types/DataTypes.java       |  655 ---------
 .../typesystem/types/DownCastFieldMapping.java  |   52 -
 .../apache/atlas/typesystem/types/EnumType.java |  121 --
 .../typesystem/types/EnumTypeDefinition.java    |   64 -
 .../atlas/typesystem/types/EnumValue.java       |   65 -
 .../atlas/typesystem/types/FieldMapping.java    |  162 --
 .../typesystem/types/HierarchicalType.java      |  545 -------
 .../types/HierarchicalTypeDefinition.java       |   74 -
 .../types/HierarchicalTypeDependencySorter.java |   75 -
 .../typesystem/types/IConstructableType.java    |   34 -
 .../atlas/typesystem/types/IDataType.java       |   61 -
 .../atlas/typesystem/types/Multiplicity.java    |   90 --
 .../typesystem/types/ObjectGraphTraversal.java  |  199 ---
 .../typesystem/types/ObjectGraphWalker.java     |  226 ---
 .../atlas/typesystem/types/StructType.java      |  280 ----
 .../typesystem/types/StructTypeDefinition.java  |   84 --
 .../atlas/typesystem/types/TraitType.java       |  104 --
 .../atlas/typesystem/types/TypeSystem.java      |  821 -----------
 .../typesystem/types/TypeUpdateException.java   |   39 -
 .../atlas/typesystem/types/TypeUtils.java       |  136 --
 .../typesystem/types/TypedStructHandler.java    |  115 --
 .../types/ValueConversionException.java         |   63 -
 .../types/cache/DefaultTypeCache.java           |  301 ----
 .../atlas/typesystem/types/cache/TypeCache.java |  153 --
 .../atlas/typesystem/types/package-info.java    |  125 --
 .../atlas/typesystem/types/utils/TypesUtil.java |  158 --
 typesystem/src/main/resources/atlas-log4j.xml   |  105 --
 .../org/apache/atlas/typesystem/TypesDef.scala  |   62 -
 .../typesystem/builders/InstanceBuilder.scala   |  217 ---
 .../typesystem/builders/TypesBuilder.scala      |  188 ---
 .../typesystem/json/InstanceSerialization.scala |  374 -----
 .../atlas/typesystem/json/Serialization.scala   |  348 -----
 .../typesystem/json/TypesSerialization.scala    |  270 ----
 .../apache/atlas/ApplicationPropertiesTest.java |   83 --
 .../typesystem/json/SerializationJavaTest.java  |  166 ---
 .../apache/atlas/typesystem/types/BaseTest.java |  190 ---
 .../atlas/typesystem/types/ClassTest.java       |  124 --
 .../apache/atlas/typesystem/types/EnumTest.java |  245 ----
 .../typesystem/types/FieldMappingTest.java      |  151 --
 .../HierarchicalTypeDependencySorterTest.java   |   81 -
 .../typesystem/types/HierarchicalTypeTest.java  |   92 --
 .../atlas/typesystem/types/StructTest.java      |  126 --
 .../atlas/typesystem/types/TraitTest.java       |  247 ----
 .../typesystem/types/TypeInheritanceTest.java   |  252 ----
 .../atlas/typesystem/types/TypeSystemTest.java  |  327 -----
 .../typesystem/types/TypeUpdateBaseTest.java    |   98 --
 .../atlas/typesystem/types/ValidationTest.java  |  102 --
 .../types/cache/DefaultTypeCacheTest.java       |  450 ------
 .../test/resources/atlas-application.properties |  145 --
 typesystem/src/test/resources/policy-store.txt  |    9 -
 .../src/test/resources/sampleInstance.json      |   72 -
 typesystem/src/test/resources/sampleTypes.json  |  633 --------
 .../test/resources/users-credentials.properties |    3 -
 .../atlas/typesystem/builders/BuilderTest.scala |   81 -
 .../builders/InstanceBuilderTest.scala          |  105 --
 .../typesystem/builders/MultiplicityTest.scala  |  124 --
 .../typesystem/builders/TypesBuilderTest.scala  |   33 -
 .../json/InstanceSerializationTest.scala        |  164 ---
 .../typesystem/json/SerializationTest.scala     |  263 ----
 .../json/TypesSerializationTest.scala           |  342 -----
 webapp/pom.xml                                  |   24 +-
 .../atlas/classification/InterfaceAudience.java |   48 +
 .../org/apache/atlas/examples/QuickStart.java   |  150 +-
 .../org/apache/atlas/examples/QuickStartV2.java |   66 +-
 .../NotificationEntityChangeListener.java       |  133 +-
 .../notification/NotificationHookConsumer.java  |  211 +--
 .../web/errors/NotFoundExceptionMapper.java     |    2 +-
 .../web/filters/AtlasAuthenticationFilter.java  |    4 +-
 .../apache/atlas/web/filters/AuditFilter.java   |    7 +-
 .../web/resources/DataSetLineageResource.java   |  133 +-
 .../atlas/web/resources/EntityResource.java     |  172 +--
 .../atlas/web/resources/LineageResource.java    |   67 +-
 .../resources/MetadataDiscoveryResource.java    |   24 +-
 .../atlas/web/resources/TypesResource.java      |    6 +-
 .../atlas/web/service/ActiveInstanceState.java  |    2 +-
 .../org/apache/atlas/web/util/LineageUtils.java |   32 +-
 .../org/apache/atlas/examples/QuickStartIT.java |    4 +-
 .../atlas/notification/AdaptiveWaiterTest.java  |   10 +-
 .../notification/EntityNotificationIT.java      |  130 +-
 .../NotificationEntityChangeListenerTest.java   |   35 +-
 .../NotificationHookConsumerIT.java             |   84 +-
 .../NotificationHookConsumerKafkaTest.java      |   68 +-
 .../NotificationHookConsumerTest.java           |  155 +-
 .../org/apache/atlas/util/RestUtilsTest.java    |  139 +-
 .../atlas/web/adapters/TestEntitiesREST.java    |    2 -
 .../atlas/web/adapters/TestEntityREST.java      |    2 -
 .../AtlasAuthenticationKerberosFilterTest.java  |    4 +-
 .../atlas/web/integration/BaseResourceIT.java   |  366 +++--
 .../atlas/web/integration/BasicSearchIT.java    |    4 +-
 .../DataSetLineageJerseyResourceIT.java         |   55 +-
 .../EntityDiscoveryJerseyResourceIT.java        |   34 +-
 .../web/integration/EntityJerseyResourceIT.java |  129 +-
 .../EntityLineageJerseyResourceIT.java          |   36 +-
 .../integration/EntityV2JerseyResourceIT.java   |   47 +-
 .../MetadataDiscoveryJerseyResourceIT.java      |   40 +-
 .../integration/TypedefsJerseyResourceIT.java   |   28 +-
 .../web/integration/TypesJerseyResourceIT.java  |  143 +-
 .../web/service/ActiveInstanceStateTest.java    |    2 +-
 407 files changed, 8457 insertions(+), 52459 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/falcon-bridge/pom.xml
----------------------------------------------------------------------
diff --git a/addons/falcon-bridge/pom.xml b/addons/falcon-bridge/pom.xml
index a732e5d..f5b0b45 100644
--- a/addons/falcon-bridge/pom.xml
+++ b/addons/falcon-bridge/pom.xml
@@ -48,11 +48,6 @@
 
         <dependency>
             <groupId>org.apache.atlas</groupId>
-            <artifactId>atlas-typesystem</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.atlas</groupId>
             <artifactId>atlas-client-v1</artifactId>
         </dependency>
 
@@ -100,13 +95,6 @@
             <type>pom</type>
             <scope>test</scope>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.atlas</groupId>
-            <artifactId>atlas-typesystem</artifactId>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <profiles>
@@ -141,21 +129,6 @@
                                             
<version>${project.version}</version>
                                         </artifactItem>
                                         <artifactItem>
-                                            <groupId>org.json4s</groupId>
-                                            
<artifactId>json4s-native_${scala.binary.version}</artifactId>
-                                            <version>${json.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.json4s</groupId>
-                                            
<artifactId>json4s-core_${scala.binary.version}</artifactId>
-                                            <version>${json.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.json4s</groupId>
-                                            
<artifactId>json4s-ast_${scala.binary.version}</artifactId>
-                                            <version>${json.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
                                             
<groupId>${project.groupId}</groupId>
                                             
<artifactId>atlas-client-common</artifactId>
                                             
<version>${project.version}</version>
@@ -172,11 +145,6 @@
                                         </artifactItem>
                                         <artifactItem>
                                             
<groupId>${project.groupId}</groupId>
-                                            
<artifactId>atlas-typesystem</artifactId>
-                                            
<version>${project.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            
<groupId>${project.groupId}</groupId>
                                             <artifactId>atlas-intg</artifactId>
                                             
<version>${project.version}</version>
                                         </artifactItem>
@@ -196,28 +164,8 @@
                                             
<version>${project.version}</version>
                                         </artifactItem>
                                         <artifactItem>
-                                            <groupId>org.scala-lang</groupId>
-                                            
<artifactId>scala-compiler</artifactId>
-                                            <version>${scala.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.scala-lang</groupId>
-                                            
<artifactId>scala-reflect</artifactId>
-                                            <version>${scala.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.scala-lang</groupId>
-                                            
<artifactId>scala-library</artifactId>
-                                            <version>${scala.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.scala-lang</groupId>
-                                            <artifactId>scalap</artifactId>
-                                            <version>${scala.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
                                             <groupId>org.apache.kafka</groupId>
-                                            
<artifactId>kafka_${scala.binary.version}</artifactId>
+                                            
<artifactId>kafka_${kafka.scala.binary.version}</artifactId>
                                             <version>${kafka.version}</version>
                                         </artifactItem>
                                         <artifactItem>
@@ -225,11 +173,6 @@
                                             
<artifactId>kafka-clients</artifactId>
                                             <version>${kafka.version}</version>
                                         </artifactItem>
-                                        <artifactItem>
-                                            
<groupId>com.google.code.gson</groupId>
-                                            <artifactId>gson</artifactId>
-                                            <version>${gson.version}</version>
-                                        </artifactItem>
                                     </artifactItems>
                                 </configuration>
                             </execution>
@@ -302,7 +245,7 @@
                         </systemProperty>
                         <systemProperty>
                             <key>atlas.conf</key>
-                            
<value>${project.build.directory}/../../../typesystem/target/test-classes</value>
+                            
<value>${project.build.directory}/../../../intg/target/test-classes</value>
                         </systemProperty>
                         <systemProperty>
                             <key>atlas.home</key>

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/bridge/FalconBridge.java
----------------------------------------------------------------------
diff --git 
a/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/bridge/FalconBridge.java
 
b/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/bridge/FalconBridge.java
index ff74559..11d13b3 100644
--- 
a/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/bridge/FalconBridge.java
+++ 
b/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/bridge/FalconBridge.java
@@ -24,7 +24,7 @@ import org.apache.atlas.falcon.Util.EventUtil;
 import org.apache.atlas.falcon.model.FalconDataTypes;
 import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
 import org.apache.atlas.hive.model.HiveDataTypes;
-import org.apache.atlas.typesystem.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.falcon.FalconException;
@@ -204,8 +204,6 @@ public class FalconBridge {
      * 
      * @param process process entity
      * @param falconStore config store
-     * @param user falcon user
-     * @param timestamp timestamp of entity
      * @return process instance reference
      *
      * @throws FalconException if retrieving from the configuration store fail

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/hook/FalconHook.java
----------------------------------------------------------------------
diff --git 
a/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/hook/FalconHook.java
 
b/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/hook/FalconHook.java
index 188b754..77177b4 100644
--- 
a/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/hook/FalconHook.java
+++ 
b/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/hook/FalconHook.java
@@ -25,8 +25,9 @@ import org.apache.atlas.falcon.event.FalconEvent;
 import org.apache.atlas.falcon.publisher.FalconEventPublisher;
 import org.apache.atlas.hook.AtlasHook;
 import org.apache.atlas.kafka.NotificationProvider;
-import org.apache.atlas.notification.hook.HookNotification;
-import org.apache.atlas.typesystem.Referenceable;
+import org.apache.atlas.model.notification.HookNotification;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import 
org.apache.atlas.v1.model.notification.HookNotificationV1.EntityCreateRequest;
 import org.apache.falcon.FalconException;
 import org.apache.falcon.entity.store.ConfigurationStore;
 import org.apache.falcon.entity.v0.feed.Feed;
@@ -151,14 +152,14 @@ public class FalconHook extends AtlasHook implements 
FalconEventPublisher {
 
     private void fireAndForget(FalconEvent event) throws FalconException, 
URISyntaxException {
         LOG.info("Entered Atlas hook for Falcon hook operation {}", 
event.getOperation());
-        List<HookNotification.HookNotificationMessage> messages = new 
ArrayList<>();
+        List<HookNotification> messages = new ArrayList<>();
 
         Operation op = getOperation(event.getOperation());
         String user = getUser(event.getUser());
         LOG.info("fireAndForget user:{}", user);
         switch (op) {
         case ADD:
-            messages.add(new HookNotification.EntityCreateRequest(user, 
createEntities(event, user)));
+            messages.add(new EntityCreateRequest(user, createEntities(event, 
user)));
             break;
 
         }

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/falcon-bridge/src/test/java/org/apache/atlas/falcon/hook/FalconHookIT.java
----------------------------------------------------------------------
diff --git 
a/addons/falcon-bridge/src/test/java/org/apache/atlas/falcon/hook/FalconHookIT.java
 
b/addons/falcon-bridge/src/test/java/org/apache/atlas/falcon/hook/FalconHookIT.java
index 7212921..c073b3e 100644
--- 
a/addons/falcon-bridge/src/test/java/org/apache/atlas/falcon/hook/FalconHookIT.java
+++ 
b/addons/falcon-bridge/src/test/java/org/apache/atlas/falcon/hook/FalconHookIT.java
@@ -26,9 +26,9 @@ import org.apache.atlas.falcon.bridge.FalconBridge;
 import org.apache.atlas.falcon.model.FalconDataTypes;
 import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
 import org.apache.atlas.hive.model.HiveDataTypes;
-import org.apache.atlas.typesystem.Referenceable;
-import org.apache.atlas.typesystem.persistence.Id;
-import org.apache.atlas.typesystem.types.TypeUtils;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
 import org.apache.atlas.utils.AuthenticationUtil;
 import org.apache.atlas.utils.ParamChecker;
 import org.apache.commons.configuration.Configuration;
@@ -162,7 +162,7 @@ public class FalconHookIT {
                 AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME, cluster.getName());
     }
 
-    private TypeUtils.Pair<String, Feed> getHDFSFeed(String feedResource, 
String clusterName) throws Exception {
+    private TypesUtil.Pair<String, Feed> getHDFSFeed(String feedResource, 
String clusterName) throws Exception {
         Feed feed = loadEntity(EntityType.FEED, feedResource, "feed" + 
random());
         org.apache.falcon.entity.v0.feed.Cluster feedCluster = 
feed.getClusters().getClusters().get(0);
         feedCluster.setName(clusterName);
@@ -174,9 +174,9 @@ public class FalconHookIT {
                 AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME,
                 FalconBridge.getFeedQualifiedName(feed.getName(), 
clusterName));
         Referenceable processEntity = atlasClient.getEntity(processId);
-        
assertEquals(((List<Id>)processEntity.get("outputs")).get(0).getId()._getId(), 
feedId);
+        assertEquals(((List<Id>)processEntity.get("outputs")).get(0).getId(), 
feedId);
 
-        String inputId = ((List<Id>) 
processEntity.get("inputs")).get(0).getId()._getId();
+        String inputId = ((List<Id>) 
processEntity.get("inputs")).get(0).getId();
         Referenceable pathEntity = atlasClient.getEntity(inputId);
         assertEquals(pathEntity.getTypeName(), HiveMetaStoreBridge.HDFS_PATH);
 
@@ -185,7 +185,7 @@ public class FalconHookIT {
         assertEquals(pathEntity.get(AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME),
                 FalconBridge.normalize(dataLocation.getPath()));
 
-        return TypeUtils.Pair.of(feedId, feed);
+        return TypesUtil.Pair.of(feedId, feed);
     }
 
     private Feed getTableFeed(String feedResource, String clusterName) throws 
Exception {
@@ -236,9 +236,9 @@ public class FalconHookIT {
                 AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME,
                 FalconBridge.getFeedQualifiedName(feedName, clusterName));
         Referenceable processEntity = atlasClient.getEntity(processId);
-        
assertEquals(((List<Id>)processEntity.get("outputs")).get(0).getId()._getId(), 
feedId);
+        assertEquals(((List<Id>)processEntity.get("outputs")).get(0).getId(), 
feedId);
 
-        String inputId = ((List<Id>) 
processEntity.get("inputs")).get(0).getId()._getId();
+        String inputId = ((List<Id>) 
processEntity.get("inputs")).get(0).getId();
         Referenceable tableEntity = atlasClient.getEntity(inputId);
         assertEquals(tableEntity.getTypeName(), 
HiveDataTypes.HIVE_TABLE.getName());
         assertEquals(tableEntity.get(AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME),
@@ -280,7 +280,7 @@ public class FalconHookIT {
         Cluster cluster = loadEntity(EntityType.CLUSTER, CLUSTER_RESOURCE, 
"cluster" + random());
         STORE.publish(EntityType.CLUSTER, cluster);
 
-        TypeUtils.Pair<String, Feed> result = getHDFSFeed(FEED_HDFS_RESOURCE, 
cluster.getName());
+        TypesUtil.Pair<String, Feed> result = getHDFSFeed(FEED_HDFS_RESOURCE, 
cluster.getName());
         Feed infeed = result.right;
         String infeedId = result.left;
 

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/hbase-bridge/pom.xml
----------------------------------------------------------------------
diff --git a/addons/hbase-bridge/pom.xml b/addons/hbase-bridge/pom.xml
index ebdb361..3dc4f1b 100644
--- a/addons/hbase-bridge/pom.xml
+++ b/addons/hbase-bridge/pom.xml
@@ -124,13 +124,6 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.atlas</groupId>
-            <artifactId>atlas-typesystem</artifactId>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
             <groupId>org.apache.hbase</groupId>
             <artifactId>hbase-server</artifactId>
             <version>${hbase.version}</version>
@@ -186,42 +179,6 @@
             <id>dist</id>
             <build>
                 <plugins>
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-                <version>3.2.0</version>
-                <executions>
-                    <execution>
-                        <id>scala-compile-first</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>scala-test-compile-first</id>
-                        <phase>process-test-resources</phase>
-                        <goals>
-                            <goal>testCompile</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <scalaVersion>${scala.version}</scalaVersion>
-                    <recompileMode>incremental</recompileMode>
-                    <useZincServer>true</useZincServer>
-                    <source>1.7</source>
-                    <target>1.7</target>
-                    <args>
-                        <arg>-unchecked</arg>
-                        <arg>-deprecation</arg>
-                        <arg>-feature</arg>
-                    </args>
-                    <jvmArgs>
-                        <jvmArg>-Xmx512m</jvmArg>
-                    </jvmArgs>
-                </configuration>
-            </plugin>
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-dependency-plugin</artifactId>
@@ -244,21 +201,6 @@
                                             
<version>${project.version}</version>
                                         </artifactItem>
                                         <artifactItem>
-                                            <groupId>org.json4s</groupId>
-                                            
<artifactId>json4s-native_${scala.binary.version}</artifactId>
-                                            <version>${json.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.json4s</groupId>
-                                            
<artifactId>json4s-core_${scala.binary.version}</artifactId>
-                                            <version>${json.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.json4s</groupId>
-                                            
<artifactId>json4s-ast_${scala.binary.version}</artifactId>
-                                            <version>${json.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
                                             
<groupId>${project.groupId}</groupId>
                                             
<artifactId>atlas-client-v1</artifactId>
                                             
<version>${project.version}</version>
@@ -275,11 +217,6 @@
                                         </artifactItem>
                                         <artifactItem>
                                             
<groupId>${project.groupId}</groupId>
-                                            
<artifactId>atlas-typesystem</artifactId>
-                                            
<version>${project.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            
<groupId>${project.groupId}</groupId>
                                             
<artifactId>atlas-notification</artifactId>
                                             
<version>${project.version}</version>
                                         </artifactItem>
@@ -294,33 +231,8 @@
                                             
<version>${project.version}</version>
                                         </artifactItem>
                                         <artifactItem>
-                                            <groupId>org.scala-lang</groupId>
-                                            
<artifactId>scala-compiler</artifactId>
-                                            <version>${scala.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.scala-lang</groupId>
-                                            
<artifactId>scala-reflect</artifactId>
-                                            <version>${scala.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.scala-lang</groupId>
-                                            
<artifactId>scala-library</artifactId>
-                                            <version>${scala.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.scala-lang</groupId>
-                                            <artifactId>scalap</artifactId>
-                                            <version>${scala.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            
<groupId>com.google.inject.extensions</groupId>
-                                            
<artifactId>guice-multibindings</artifactId>
-                                            <version>${guice.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
                                             <groupId>org.apache.kafka</groupId>
-                                            
<artifactId>kafka_${scala.binary.version}</artifactId>
+                                            
<artifactId>kafka_${kafka.scala.binary.version}</artifactId>
                                             <version>${kafka.version}</version>
                                         </artifactItem>
                                         <artifactItem>
@@ -328,11 +240,6 @@
                                             
<artifactId>kafka-clients</artifactId>
                                             <version>${kafka.version}</version>
                                         </artifactItem>
-                                        <artifactItem>
-                                            
<groupId>com.google.code.gson</groupId>
-                                            <artifactId>gson</artifactId>
-                                            <version>${gson.version}</version>
-                                        </artifactItem>
                                     </artifactItems>
                                 </configuration>
                             </execution>
@@ -406,7 +313,7 @@
                         </systemProperty>
                         <systemProperty>
                             <key>atlas.conf</key>
-                            
<value>${project.build.directory}/../../../typesystem/target/test-classes</value>
+                            
<value>${project.build.directory}/../../../intg/target/test-classes</value>
                         </systemProperty>
                         <systemProperty>
                             <key>atlas.home</key>

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/bridge/HBaseAtlasHook.java
----------------------------------------------------------------------
diff --git 
a/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/bridge/HBaseAtlasHook.java
 
b/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/bridge/HBaseAtlasHook.java
index 8c7481a..03e340c 100644
--- 
a/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/bridge/HBaseAtlasHook.java
+++ 
b/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/bridge/HBaseAtlasHook.java
@@ -23,8 +23,11 @@ import org.apache.atlas.AtlasConstants;
 import org.apache.atlas.hbase.model.HBaseOperationContext;
 import org.apache.atlas.hbase.model.HBaseDataTypes;
 import org.apache.atlas.hook.AtlasHook;
-import org.apache.atlas.notification.hook.HookNotification;
-import org.apache.atlas.typesystem.Referenceable;
+import org.apache.atlas.model.notification.HookNotification;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import 
org.apache.atlas.v1.model.notification.HookNotificationV1.EntityCreateRequest;
+import 
org.apache.atlas.v1.model.notification.HookNotificationV1.EntityDeleteRequest;
+import 
org.apache.atlas.v1.model.notification.HookNotificationV1.EntityUpdateRequest;
 import org.apache.commons.configuration.Configuration;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.HColumnDescriptor;
@@ -219,13 +222,13 @@ public class HBaseAtlasHook extends AtlasHook {
             case CREATE_NAMESPACE:
                 LOG.info("Create NameSpace {}", 
nameSpaceRef.get(REFERENCEABLE_ATTRIBUTE_NAME));
 
-                hbaseOperationContext.addMessage(new 
HookNotification.EntityCreateRequest(hbaseOperationContext.getUser(), 
nameSpaceRef));
+                hbaseOperationContext.addMessage(new 
EntityCreateRequest(hbaseOperationContext.getUser(), nameSpaceRef));
                 break;
 
             case ALTER_NAMESPACE:
                 LOG.info("Modify NameSpace {}", 
nameSpaceRef.get(REFERENCEABLE_ATTRIBUTE_NAME));
 
-                hbaseOperationContext.addMessage(new 
HookNotification.EntityUpdateRequest(hbaseOperationContext.getUser(), 
nameSpaceRef));
+                hbaseOperationContext.addMessage(new 
EntityUpdateRequest(hbaseOperationContext.getUser(), nameSpaceRef));
                 break;
         }
     }
@@ -235,10 +238,10 @@ public class HBaseAtlasHook extends AtlasHook {
 
         LOG.info("Delete NameSpace {}", nameSpaceQualifiedName);
 
-        hbaseOperationContext.addMessage(new 
HookNotification.EntityDeleteRequest(hbaseOperationContext.getUser(),
-                                                                               
   HBaseDataTypes.HBASE_NAMESPACE.getName(),
-                                                                               
   REFERENCEABLE_ATTRIBUTE_NAME,
-                                                                               
   nameSpaceQualifiedName));
+        hbaseOperationContext.addMessage(new 
EntityDeleteRequest(hbaseOperationContext.getUser(),
+                                                                 
HBaseDataTypes.HBASE_NAMESPACE.getName(),
+                                                                 
REFERENCEABLE_ATTRIBUTE_NAME,
+                                                                 
nameSpaceQualifiedName));
     }
 
     private void createOrUpdateTableInstance(HBaseOperationContext 
hbaseOperationContext) {
@@ -252,13 +255,13 @@ public class HBaseAtlasHook extends AtlasHook {
             case CREATE_TABLE:
                 LOG.info("Create Table {}", 
tableRef.get(REFERENCEABLE_ATTRIBUTE_NAME));
 
-                hbaseOperationContext.addMessage(new 
HookNotification.EntityCreateRequest(hbaseOperationContext.getUser(), 
nameSpaceRef, tableRef));
+                hbaseOperationContext.addMessage(new 
EntityCreateRequest(hbaseOperationContext.getUser(), nameSpaceRef, tableRef));
                 break;
 
             case ALTER_TABLE:
                 LOG.info("Modify Table {}", 
tableRef.get(REFERENCEABLE_ATTRIBUTE_NAME));
 
-                hbaseOperationContext.addMessage(new 
HookNotification.EntityUpdateRequest(hbaseOperationContext.getUser(), 
nameSpaceRef, tableRef));
+                hbaseOperationContext.addMessage(new 
EntityUpdateRequest(hbaseOperationContext.getUser(), nameSpaceRef, tableRef));
                 break;
         }
     }
@@ -276,10 +279,10 @@ public class HBaseAtlasHook extends AtlasHook {
 
         LOG.info("Delete Table {}", tableQualifiedName);
 
-        hbaseOperationContext.addMessage(new 
HookNotification.EntityDeleteRequest(hbaseOperationContext.getUser(),
-                                                                               
   HBaseDataTypes.HBASE_TABLE.getName(),
-                                                                               
   REFERENCEABLE_ATTRIBUTE_NAME,
-                                                                               
   tableQualifiedName));
+        hbaseOperationContext.addMessage(new 
EntityDeleteRequest(hbaseOperationContext.getUser(),
+                                                                 
HBaseDataTypes.HBASE_TABLE.getName(),
+                                                                 
REFERENCEABLE_ATTRIBUTE_NAME,
+                                                                 
tableQualifiedName));
     }
 
     private void createOrUpdateColumnFamilyInstance(HBaseOperationContext 
hbaseOperationContext) {
@@ -291,13 +294,13 @@ public class HBaseAtlasHook extends AtlasHook {
             case CREATE_COLUMN_FAMILY:
                 LOG.info("Create ColumnFamily {}", 
columnFamilyRef.get(REFERENCEABLE_ATTRIBUTE_NAME));
 
-                hbaseOperationContext.addMessage(new 
HookNotification.EntityCreateRequest(hbaseOperationContext.getUser(), 
nameSpaceRef, tableRef, columnFamilyRef));
+                hbaseOperationContext.addMessage(new 
EntityCreateRequest(hbaseOperationContext.getUser(), nameSpaceRef, tableRef, 
columnFamilyRef));
                 break;
 
             case ALTER_COLUMN_FAMILY:
                 LOG.info("Alter ColumnFamily {}", 
columnFamilyRef.get(REFERENCEABLE_ATTRIBUTE_NAME));
 
-                hbaseOperationContext.addMessage(new 
HookNotification.EntityUpdateRequest(hbaseOperationContext.getUser(), 
nameSpaceRef, tableRef, columnFamilyRef));
+                hbaseOperationContext.addMessage(new 
EntityUpdateRequest(hbaseOperationContext.getUser(), nameSpaceRef, tableRef, 
columnFamilyRef));
                 break;
         }
     }
@@ -316,10 +319,10 @@ public class HBaseAtlasHook extends AtlasHook {
 
         LOG.info("Delete ColumnFamily {}", columnFamilyQualifiedName);
 
-        hbaseOperationContext.addMessage(new 
HookNotification.EntityDeleteRequest(hbaseOperationContext.getUser(),
-                                                                               
   HBaseDataTypes.HBASE_COLUMN_FAMILY.getName(),
-                                                                               
   REFERENCEABLE_ATTRIBUTE_NAME,
-                                                                               
   columnFamilyQualifiedName));
+        hbaseOperationContext.addMessage(new 
EntityDeleteRequest(hbaseOperationContext.getUser(),
+                                                                 
HBaseDataTypes.HBASE_COLUMN_FAMILY.getName(),
+                                                                 
REFERENCEABLE_ATTRIBUTE_NAME,
+                                                                 
columnFamilyQualifiedName));
     }
 
 
@@ -491,7 +494,7 @@ public class HBaseAtlasHook extends AtlasHook {
             LOG.debug("==> HBaseAtlasHook.notifyAsPrivilegedAction({})", 
hbaseOperationContext);
         }
 
-        final List<HookNotification.HookNotificationMessage> messages = 
hbaseOperationContext.getMessages();
+        final List<HookNotification> messages = 
hbaseOperationContext.getMessages();
 
 
         try {
@@ -534,7 +537,7 @@ public class HBaseAtlasHook extends AtlasHook {
      *
      * @param messages hook notification messages
      */
-    protected void 
notifyEntities(List<HookNotification.HookNotificationMessage> messages) {
+    protected void notifyEntities(List<HookNotification> messages) {
         final int maxRetries = atlasProperties.getInt(HOOK_NUM_RETRIES, 3);
         notifyEntities(messages, maxRetries);
     }

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/model/HBaseOperationContext.java
----------------------------------------------------------------------
diff --git 
a/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/model/HBaseOperationContext.java
 
b/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/model/HBaseOperationContext.java
index ce0f212..bc8485b 100644
--- 
a/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/model/HBaseOperationContext.java
+++ 
b/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/model/HBaseOperationContext.java
@@ -19,7 +19,7 @@
 package org.apache.atlas.hbase.model;
 
 import org.apache.atlas.hbase.bridge.HBaseAtlasHook;
-import org.apache.atlas.notification.hook.HookNotification;
+import org.apache.atlas.model.notification.HookNotification;
 import org.apache.hadoop.hbase.NamespaceDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.HColumnDescriptor;
@@ -74,7 +74,7 @@ public class HBaseOperationContext {
         this(null, nameSpace, null, tableName, null, hColumnDescriptor, 
columnFamily, operation, ugi, user, owner, hbaseConf);
     }
 
-    private List<HookNotification.HookNotificationMessage> messages = new 
ArrayList<>();
+    private List<HookNotification> messages = new ArrayList<>();
 
     public UserGroupInformation getUgi() {
         return ugi;
@@ -120,7 +120,7 @@ public class HBaseOperationContext {
         return columnFamily;
     }
 
-    public void addMessage(HookNotification.HookNotificationMessage message) {
+    public void addMessage(HookNotification message) {
         messages.add(message);
     }
 
@@ -128,7 +128,7 @@ public class HBaseOperationContext {
         return owner;
     }
 
-    public List<HookNotification.HookNotificationMessage> getMessages() {
+    public List<HookNotification> getMessages() {
         return messages;
     }
 

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/hbase-bridge/src/test/java/org/apache/atlas/hbase/HBaseAtlasHookIT.java
----------------------------------------------------------------------
diff --git 
a/addons/hbase-bridge/src/test/java/org/apache/atlas/hbase/HBaseAtlasHookIT.java
 
b/addons/hbase-bridge/src/test/java/org/apache/atlas/hbase/HBaseAtlasHookIT.java
index 032cb51..0d2e8df 100644
--- 
a/addons/hbase-bridge/src/test/java/org/apache/atlas/hbase/HBaseAtlasHookIT.java
+++ 
b/addons/hbase-bridge/src/test/java/org/apache/atlas/hbase/HBaseAtlasHookIT.java
@@ -22,7 +22,7 @@ import org.apache.atlas.ApplicationProperties;
 import org.apache.atlas.AtlasClient;
 import org.apache.atlas.hbase.bridge.HBaseAtlasHook;
 import org.apache.atlas.hbase.model.HBaseDataTypes;
-import org.apache.atlas.typesystem.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
 import org.apache.atlas.utils.AuthenticationUtil;
 import org.apache.atlas.utils.ParamChecker;
 import org.apache.hadoop.conf.Configuration;

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/hdfs-model/pom.xml
----------------------------------------------------------------------
diff --git a/addons/hdfs-model/pom.xml b/addons/hdfs-model/pom.xml
index 4fd738a..b3f06b7 100644
--- a/addons/hdfs-model/pom.xml
+++ b/addons/hdfs-model/pom.xml
@@ -45,11 +45,6 @@
         <!-- apache atlas core dependencies -->
         <dependency>
             <groupId>org.apache.atlas</groupId>
-            <artifactId>atlas-typesystem</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.atlas</groupId>
             <artifactId>atlas-client-v1</artifactId>
         </dependency>
 
@@ -83,72 +78,11 @@
             <artifactId>atlas-repository</artifactId>
             <scope>test</scope>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.atlas</groupId>
-            <artifactId>atlas-typesystem</artifactId>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <build>
         <plugins>
             <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-                <version>3.2.0</version>
-                <executions>
-                    <execution>
-                        <id>scala-compile-first</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>scala-test-compile-first</id>
-                        <phase>process-test-resources</phase>
-                        <goals>
-                            <goal>testCompile</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <scalaVersion>${scala.version}</scalaVersion>
-                    <recompileMode>incremental</recompileMode>
-                    <useZincServer>true</useZincServer>
-                    <source>1.7</source>
-                    <target>1.7</target>
-                    <args>
-                        <arg>-unchecked</arg>
-                        <arg>-deprecation</arg>
-                        <arg>-feature</arg>
-                    </args>
-                    <jvmArgs>
-                        <jvmArg>-Xmx512m</jvmArg>
-                    </jvmArgs>
-                    <!--
-                    <javacArgs>
-                        <javacArg>-source</javacArg>
-                        <javacArg>${java.version}</javacArg>
-                        <javacArg>-target</javacArg>
-                        <javacArg>${java.version}</javacArg>
-                    </javacArgs>
-                    -->
-                    <!-- The following plugin is required to use quasiquotes 
in Scala 2.10 and is used
-                         by Spark SQL for code generation. -->
-                    <!--<compilerPlugins>
-                        <compilerPlugin>
-                            <groupId>org.scalamacros</groupId>
-                            <artifactId>paradise_${scala.version}</artifactId>
-                            <version>${scala.macros.version}</version>
-                        </compilerPlugin>
-                    </compilerPlugins>-->
-                </configuration>
-            </plugin>
-
-            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-site-plugin</artifactId>
                 <dependencies>

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/hive-bridge/pom.xml
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/pom.xml b/addons/hive-bridge/pom.xml
index faf14d3..b16d1c3 100755
--- a/addons/hive-bridge/pom.xml
+++ b/addons/hive-bridge/pom.xml
@@ -95,11 +95,6 @@
 
         <dependency>
             <groupId>org.apache.atlas</groupId>
-            <artifactId>atlas-typesystem</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.atlas</groupId>
             <artifactId>atlas-client-v1</artifactId>
         </dependency>
 
@@ -156,7 +151,7 @@
 
         <dependency>
             <groupId>org.apache.atlas</groupId>
-            <artifactId>atlas-typesystem</artifactId>
+            <artifactId>atlas-intg</artifactId>
             <classifier>tests</classifier>
             <scope>test</scope>
         </dependency>
@@ -189,21 +184,6 @@
                                             
<version>${project.version}</version>
                                         </artifactItem>
                                         <artifactItem>
-                                            <groupId>org.json4s</groupId>
-                                            
<artifactId>json4s-native_${scala.binary.version}</artifactId>
-                                            <version>${json.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.json4s</groupId>
-                                            
<artifactId>json4s-core_${scala.binary.version}</artifactId>
-                                            <version>${json.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.json4s</groupId>
-                                            
<artifactId>json4s-ast_${scala.binary.version}</artifactId>
-                                            <version>${json.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
                                             
<groupId>${project.groupId}</groupId>
                                             
<artifactId>atlas-client-common</artifactId>
                                             
<version>${project.version}</version>
@@ -220,11 +200,6 @@
                                         </artifactItem>
                                         <artifactItem>
                                             
<groupId>${project.groupId}</groupId>
-                                            
<artifactId>atlas-typesystem</artifactId>
-                                            
<version>${project.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            
<groupId>${project.groupId}</groupId>
                                             <artifactId>atlas-intg</artifactId>
                                             
<version>${project.version}</version>
                                         </artifactItem>
@@ -244,28 +219,8 @@
                                             
<version>${project.version}</version>
                                         </artifactItem>
                                         <artifactItem>
-                                            <groupId>org.scala-lang</groupId>
-                                            
<artifactId>scala-compiler</artifactId>
-                                            <version>${scala.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.scala-lang</groupId>
-                                            
<artifactId>scala-reflect</artifactId>
-                                            <version>${scala.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.scala-lang</groupId>
-                                            
<artifactId>scala-library</artifactId>
-                                            <version>${scala.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
-                                            <groupId>org.scala-lang</groupId>
-                                            <artifactId>scalap</artifactId>
-                                            <version>${scala.version}</version>
-                                        </artifactItem>
-                                        <artifactItem>
                                             <groupId>org.apache.kafka</groupId>
-                                            
<artifactId>kafka_${scala.binary.version}</artifactId>
+                                            
<artifactId>kafka_${kafka.scala.binary.version}</artifactId>
                                             <version>${kafka.version}</version>
                                         </artifactItem>
                                         <artifactItem>
@@ -273,11 +228,6 @@
                                             
<artifactId>kafka-clients</artifactId>
                                             <version>${kafka.version}</version>
                                         </artifactItem>
-                                        <artifactItem>
-                                            
<groupId>com.google.code.gson</groupId>
-                                            <artifactId>gson</artifactId>
-                                            <version>${gson.version}</version>
-                                        </artifactItem>
                                     </artifactItems>
                                 </configuration>
                             </execution>
@@ -351,7 +301,7 @@
                         </systemProperty>
                         <systemProperty>
                             <key>atlas.conf</key>
-                            
<value>${project.build.directory}/../../../typesystem/target/test-classes</value>
+                            
<value>${project.build.directory}/../../../intg/target/test-classes</value>
                         </systemProperty>
                         <systemProperty>
                             <key>atlas.home</key>

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/ColumnLineageUtils.java
----------------------------------------------------------------------
diff --git 
a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/ColumnLineageUtils.java
 
b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/ColumnLineageUtils.java
index 663fcdc..ba10008 100644
--- 
a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/ColumnLineageUtils.java
+++ 
b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/ColumnLineageUtils.java
@@ -20,7 +20,7 @@ package org.apache.atlas.hive.bridge;
 
 import org.apache.atlas.AtlasClient;
 import org.apache.atlas.hive.model.HiveDataTypes;
-import org.apache.atlas.typesystem.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
 import org.apache.hadoop.hive.ql.hooks.LineageInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
----------------------------------------------------------------------
diff --git 
a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
 
b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
index d2d2fb5..ab0094b 100755
--- 
a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
+++ 
b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
@@ -27,10 +27,10 @@ import org.apache.atlas.AtlasServiceException;
 import org.apache.atlas.hive.hook.HiveHook;
 import org.apache.atlas.hive.model.HiveDataTypes;
 import org.apache.atlas.hook.AtlasHookException;
-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.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
+import org.apache.atlas.type.AtlasType;
 import org.apache.atlas.utils.AuthenticationUtil;
 import org.apache.commons.cli.BasicParser;
 import org.apache.commons.cli.CommandLine;
@@ -170,7 +170,7 @@ public class HiveMetaStoreBridge {
                 dbRef = createDBInstance(db);
                 dbRef = registerInstance(dbRef);
             } else {
-                LOG.info("Database {} is already registered with id {}. 
Updating it.", databaseName, dbRef.getId().id);
+                LOG.info("Database {} is already registered with id {}. 
Updating it.", databaseName, dbRef.getId().getId());
                 dbRef = createOrUpdateDBInstance(db, dbRef);
                 updateInstance(dbRef);
             }
@@ -208,7 +208,7 @@ public class HiveMetaStoreBridge {
         String typeName = referenceable.getTypeName();
         LOG.debug("creating instance of type {}", typeName);
 
-        String entityJSON = InstanceSerialization.toJson(referenceable, true);
+        String entityJSON = AtlasType.toV1Json(referenceable);
         LOG.debug("Submitting new entity {} = {}", 
referenceable.getTypeName(), entityJSON);
         List<String> guids = getAtlasClient().createEntity(entityJSON);
         LOG.debug("created instance for type {}, guid: {}", typeName, guids);
@@ -506,7 +506,7 @@ public class HiveMetaStoreBridge {
                 tableReference = registerInstance(tableReference);
             } else {
                 LOG.info("Table {}.{} is already registered with id {}. 
Updating entity.", dbName, tableName,
-                        tableReference.getId().id);
+                        tableReference.getId().getId());
                 tableReference = createOrUpdateTableInstance(dbReference, 
tableReference, table);
                 updateInstance(tableReference);
             }
@@ -520,10 +520,10 @@ public class HiveMetaStoreBridge {
         String typeName = referenceable.getTypeName();
         LOG.debug("updating instance of type {}", typeName);
 
-        String entityJSON = InstanceSerialization.toJson(referenceable, true);
+        String entityJSON = AtlasType.toV1Json(referenceable);
         LOG.debug("Updating entity {} = {}", referenceable.getTypeName(), 
entityJSON);
 
-        atlasClient.updateEntity(referenceable.getId().id, referenceable);
+        atlasClient.updateEntity(referenceable.getId().getId(), referenceable);
     }
 
     public Referenceable fillStorageDesc(StorageDescriptor storageDesc, String 
tableQualifiedName,

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
----------------------------------------------------------------------
diff --git 
a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java 
b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
index 0e8284d..57f5efb 100755
--- a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
+++ b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
@@ -28,8 +28,11 @@ import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
 import org.apache.atlas.hive.model.HiveDataTypes;
 import org.apache.atlas.hook.AtlasHook;
 import org.apache.atlas.hook.AtlasHookException;
-import org.apache.atlas.notification.hook.HookNotification;
-import org.apache.atlas.typesystem.Referenceable;
+import org.apache.atlas.model.notification.HookNotification;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import 
org.apache.atlas.v1.model.notification.HookNotificationV1.EntityDeleteRequest;
+import 
org.apache.atlas.v1.model.notification.HookNotificationV1.EntityPartialUpdateRequest;
+import 
org.apache.atlas.v1.model.notification.HookNotificationV1.EntityUpdateRequest;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.hadoop.fs.Path;
@@ -331,7 +334,7 @@ public class HiveHook extends AtlasHook implements 
ExecuteWithHookContext {
         final String tblQualifiedName = 
HiveMetaStoreBridge.getTableQualifiedName(dgiBridge.getClusterName(), 
output.getTable());
         LOG.info("Deleting table {} ", tblQualifiedName);
         event.addMessage(
-            new HookNotification.EntityDeleteRequest(event.getUser(),
+            new EntityDeleteRequest(event.getUser(),
                 HiveDataTypes.HIVE_TABLE.getName(),
                 AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME,
                 tblQualifiedName));
@@ -350,7 +353,7 @@ public class HiveHook extends AtlasHook implements 
ExecuteWithHookContext {
             } else if (Type.DATABASE.equals(output.getType())) {
                 final String dbQualifiedName = 
HiveMetaStoreBridge.getDBQualifiedName(dgiBridge.getClusterName(), 
output.getDatabase().getName());
                 event.addMessage(
-                    new HookNotification.EntityDeleteRequest(event.getUser(),
+                    new EntityDeleteRequest(event.getUser(),
                         HiveDataTypes.HIVE_DB.getName(),
                         AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME,
                         dbQualifiedName));
@@ -412,7 +415,7 @@ public class HiveHook extends AtlasHook implements 
ExecuteWithHookContext {
                     Referenceable newColEntity = new 
Referenceable(HiveDataTypes.HIVE_COLUMN.getName());
                     newColEntity.set(AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME, 
newColumnQFName);
 
-                    event.addMessage(new 
HookNotification.EntityPartialUpdateRequest(event.getUser(),
+                    event.addMessage(new 
EntityPartialUpdateRequest(event.getUser(),
                             HiveDataTypes.HIVE_COLUMN.getName(), 
AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME,
                             oldColumnQFName, newColEntity));
                 }
@@ -481,7 +484,7 @@ public class HiveHook extends AtlasHook implements 
ExecuteWithHookContext {
         ArrayList<String> alias_list = new ArrayList<>();
         alias_list.add(oldTable.getTableName().toLowerCase());
         newEntity.set(HiveMetaStoreBridge.TABLE_ALIAS_LIST, alias_list);
-        event.addMessage(new 
HookNotification.EntityPartialUpdateRequest(event.getUser(),
+        event.addMessage(new EntityPartialUpdateRequest(event.getUser(),
             HiveDataTypes.HIVE_TABLE.getName(), 
AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME,
             oldTableQFName, newEntity));
 
@@ -499,7 +502,7 @@ public class HiveHook extends AtlasHook implements 
ExecuteWithHookContext {
             Referenceable newColEntity = new 
Referenceable(HiveDataTypes.HIVE_COLUMN.getName());
             ///Only QF Name changes
             newColEntity.set(AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME, 
newColumnQFName);
-            event.addMessage(new 
HookNotification.EntityPartialUpdateRequest(event.getUser(),
+            event.addMessage(new EntityPartialUpdateRequest(event.getUser(),
                 HiveDataTypes.HIVE_COLUMN.getName(), 
AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME,
                 oldColumnQFName, newColEntity));
             newColEntities.add(newColEntity);
@@ -518,7 +521,7 @@ public class HiveHook extends AtlasHook implements 
ExecuteWithHookContext {
 
         final Referenceable newSDEntity = new 
Referenceable(HiveDataTypes.HIVE_STORAGEDESC.getName());
         newSDEntity.set(AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME, newSDQFName);
-        event.addMessage(new 
HookNotification.EntityPartialUpdateRequest(event.getUser(),
+        event.addMessage(new EntityPartialUpdateRequest(event.getUser(),
             HiveDataTypes.HIVE_STORAGEDESC.getName(), 
AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME,
             oldSDQFName, newSDEntity));
 
@@ -593,7 +596,7 @@ public class HiveHook extends AtlasHook implements 
ExecuteWithHookContext {
             }
 
             if (!entities.isEmpty()) {
-                event.addMessage(new 
HookNotification.EntityUpdateRequest(event.getUser(), entities));
+                event.addMessage(new EntityUpdateRequest(event.getUser(), 
entities));
             }
 
             return result;
@@ -719,7 +722,7 @@ public class HiveHook extends AtlasHook implements 
ExecuteWithHookContext {
     private void addEntityUpdateNotificationMessagess(final HiveEventContext 
event, final Collection<Referenceable> entities) {
         // process each entity as separate message to avoid running into OOM 
errors
         for (Referenceable entity : entities) {
-            event.addMessage(new 
HookNotification.EntityUpdateRequest(event.getUser(), entity));
+            event.addMessage(new EntityUpdateRequest(event.getUser(), entity));
         }
     }
 
@@ -1089,7 +1092,7 @@ public class HiveHook extends AtlasHook implements 
ExecuteWithHookContext {
 
         public Map<String, List<ColumnLineageUtils.HiveColumnLineageInfo>> 
lineageInfo;
 
-        private List<HookNotification.HookNotificationMessage> messages = new 
ArrayList<>();
+        private List<HookNotification> messages = new ArrayList<>();
 
         public void setInputs(Set<ReadEntity> inputs) {
             this.inputs = inputs;
@@ -1172,11 +1175,11 @@ public class HiveHook extends AtlasHook implements 
ExecuteWithHookContext {
             return queryStartTime;
         }
 
-        public void addMessage(HookNotification.HookNotificationMessage 
message) {
+        public void addMessage(HookNotification message) {
             messages.add(message);
         }
 
-        public List<HookNotification.HookNotificationMessage> getMessages() {
+        public List<HookNotification> getMessages() {
             return messages;
         }
     }

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/hive-bridge/src/test/java/org/apache/atlas/hive/HiveITBase.java
----------------------------------------------------------------------
diff --git 
a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/HiveITBase.java 
b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/HiveITBase.java
index 0d163ee..d9fb46e 100644
--- a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/HiveITBase.java
+++ b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/HiveITBase.java
@@ -23,8 +23,8 @@ import org.apache.atlas.AtlasClient;
 import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
 import org.apache.atlas.hive.hook.HiveHookIT;
 import org.apache.atlas.hive.model.HiveDataTypes;
-import org.apache.atlas.typesystem.Referenceable;
-import org.apache.atlas.typesystem.persistence.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Id;
 import org.apache.atlas.utils.AuthenticationUtil;
 import org.apache.atlas.utils.ParamChecker;
 import org.apache.commons.configuration.Configuration;

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridgeTest.java
----------------------------------------------------------------------
diff --git 
a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridgeTest.java
 
b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridgeTest.java
index 0256cf3..819d734 100644
--- 
a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridgeTest.java
+++ 
b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridgeTest.java
@@ -21,7 +21,7 @@ package org.apache.atlas.hive.bridge;
 import org.apache.atlas.AtlasClient;
 import org.apache.atlas.AtlasServiceException;
 import org.apache.atlas.hive.model.HiveDataTypes;
-import org.apache.atlas.typesystem.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hive.metastore.TableType;
 import org.apache.hadoop.hive.metastore.api.Database;
@@ -38,8 +38,8 @@ import org.mockito.MockitoAnnotations;
 import org.testng.Assert;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
-import scala.actors.threadpool.Arrays;
 
+import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.List;
 

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetastoreBridgeIT.java
----------------------------------------------------------------------
diff --git 
a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetastoreBridgeIT.java
 
b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetastoreBridgeIT.java
index d09db1b..22d3c59 100644
--- 
a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetastoreBridgeIT.java
+++ 
b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetastoreBridgeIT.java
@@ -21,8 +21,8 @@ package org.apache.atlas.hive.bridge;
 import org.apache.atlas.AtlasClient;
 import org.apache.atlas.hive.HiveITBase;
 import org.apache.atlas.hive.model.HiveDataTypes;
-import org.apache.atlas.typesystem.Referenceable;
-import org.apache.atlas.typesystem.persistence.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Id;
 import org.testng.annotations.Test;
 
 import java.util.List;
@@ -50,7 +50,7 @@ public class HiveMetastoreBridgeIT extends HiveITBase {
 
         List<Id> outputs = (List<Id>) processReference.get(OUTPUTS);
         assertEquals(outputs.size(), 1);
-        assertEquals(outputs.get(0).getId()._getId(), tableId);
+        assertEquals(outputs.get(0).getId(), tableId);
 
         int tableCount = 
atlasClient.listEntities(HiveDataTypes.HIVE_TABLE.getName()).size();
 
@@ -84,6 +84,6 @@ public class HiveMetastoreBridgeIT extends HiveITBase {
                 getTableProcessQualifiedName(DEFAULT_DB, tableName), null);
         List<Id> outputs = (List<Id>) 
atlasClient.getEntity(processId).get(OUTPUTS);
         assertEquals(outputs.size(), 1);
-        assertEquals(outputs.get(0).getId()._getId(), tableId);
+        assertEquals(outputs.get(0).getId(), tableId);
     }
 }

Reply via email to