Commit 543a85d7 by apoorvnaik Committed by Madhan Neethiraj

ATLAS-1637: Deprecate V1 APIs and related classes

parent e54fe04d
...@@ -65,6 +65,7 @@ import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONL ...@@ -65,6 +65,7 @@ import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONL
/** /**
* Client for metadata. * Client for metadata.
*/ */
@Deprecated
public class AtlasClient extends AtlasBaseClient { public class AtlasClient extends AtlasBaseClient {
private static final Logger LOG = LoggerFactory.getLogger(AtlasClient.class); private static final Logger LOG = LoggerFactory.getLogger(AtlasClient.class);
......
...@@ -27,6 +27,7 @@ import org.apache.atlas.type.AtlasType; ...@@ -27,6 +27,7 @@ import org.apache.atlas.type.AtlasType;
/** /**
* Result from creating or updating entities. * Result from creating or updating entities.
*/ */
@Deprecated
public class CreateUpdateEntitiesResult { public class CreateUpdateEntitiesResult {
/** /**
......
...@@ -23,6 +23,7 @@ import com.sun.jersey.api.client.WebResource; ...@@ -23,6 +23,7 @@ import com.sun.jersey.api.client.WebResource;
/** /**
* An interface to capture the closure of how a WebResource is created. * An interface to capture the closure of how a WebResource is created.
*/ */
@Deprecated
public interface ResourceCreator { public interface ResourceCreator {
WebResource createResource(); WebResource createResource();
} }
...@@ -34,6 +34,7 @@ import org.apache.atlas.typesystem.json.InstanceSerialization; ...@@ -34,6 +34,7 @@ import org.apache.atlas.typesystem.json.InstanceSerialization;
import java.lang.reflect.Type; import java.lang.reflect.Type;
@Deprecated
public class SerDe { public class SerDe {
public static final Gson GSON = new GsonBuilder(). public static final Gson GSON = new GsonBuilder().
registerTypeAdapter(IStruct.class, new StructDeserializer()). registerTypeAdapter(IStruct.class, new StructDeserializer()).
......
...@@ -19,6 +19,7 @@ package org.apache.atlas.listener; ...@@ -19,6 +19,7 @@ package org.apache.atlas.listener;
import org.apache.atlas.exception.AtlasBaseException; import org.apache.atlas.exception.AtlasBaseException;
@Deprecated
public interface TypeDefChangeListener { public interface TypeDefChangeListener {
void onChange(ChangedTypeDefs changedTypeDefs) throws AtlasBaseException; void onChange(ChangedTypeDefs changedTypeDefs) throws AtlasBaseException;
} }
...@@ -30,6 +30,7 @@ import java.util.Map; ...@@ -30,6 +30,7 @@ import java.util.Map;
/** /**
* Graph walker implementation for discovering instances. * Graph walker implementation for discovering instances.
*/ */
@Deprecated
public class DiscoverInstances implements ObjectGraphWalker.NodeProcessor { public class DiscoverInstances implements ObjectGraphWalker.NodeProcessor {
public final Map<Id, Id> idToNewIdMap; public final Map<Id, Id> idToNewIdMap;
......
...@@ -30,6 +30,7 @@ import java.util.List; ...@@ -30,6 +30,7 @@ import java.util.List;
/** /**
* Metadata Repository interface. * Metadata Repository interface.
*/ */
@Deprecated
public interface IRepository { public interface IRepository {
ITypedReferenceableInstance create(IReferenceableInstance i) throws RepositoryException; ITypedReferenceableInstance create(IReferenceableInstance i) throws RepositoryException;
......
...@@ -34,6 +34,7 @@ import java.util.List; ...@@ -34,6 +34,7 @@ import java.util.List;
/** /**
* An interface for persisting metadata into a blueprints enabled graph db. * An interface for persisting metadata into a blueprints enabled graph db.
*/ */
@Deprecated
public interface MetadataRepository { public interface MetadataRepository {
/** /**
......
...@@ -31,6 +31,7 @@ import java.util.Collections; ...@@ -31,6 +31,7 @@ import java.util.Collections;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
@Deprecated
public final class EntityProcessor implements ObjectGraphWalker.NodeProcessor { public final class EntityProcessor implements ObjectGraphWalker.NodeProcessor {
private final Map<Id, IReferenceableInstance> idToInstanceMap; private final Map<Id, IReferenceableInstance> idToInstanceMap;
......
...@@ -34,6 +34,7 @@ import org.slf4j.LoggerFactory; ...@@ -34,6 +34,7 @@ import org.slf4j.LoggerFactory;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@Deprecated
public class FullTextMapper { public class FullTextMapper {
private static final Logger LOG = LoggerFactory.getLogger(FullTextMapper.class); private static final Logger LOG = LoggerFactory.getLogger(FullTextMapper.class);
......
...@@ -65,6 +65,7 @@ import com.google.inject.Singleton; ...@@ -65,6 +65,7 @@ import com.google.inject.Singleton;
* as a Graph Service. * as a Graph Service.
*/ */
@Singleton @Singleton
@Deprecated
public class GraphBackedMetadataRepository implements MetadataRepository { public class GraphBackedMetadataRepository implements MetadataRepository {
private static final Logger LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class); private static final Logger LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class);
......
...@@ -54,6 +54,7 @@ import org.slf4j.LoggerFactory; ...@@ -54,6 +54,7 @@ import org.slf4j.LoggerFactory;
import com.google.inject.Singleton; import com.google.inject.Singleton;
@Singleton @Singleton
@Deprecated
public final class GraphToTypedInstanceMapper { public final class GraphToTypedInstanceMapper {
private static final Logger LOG = LoggerFactory.getLogger(GraphToTypedInstanceMapper.class); private static final Logger LOG = LoggerFactory.getLogger(GraphToTypedInstanceMapper.class);
......
...@@ -67,6 +67,7 @@ import com.google.common.base.Function; ...@@ -67,6 +67,7 @@ import com.google.common.base.Function;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.inject.Inject; import com.google.inject.Inject;
@Deprecated
public final class TypedInstanceToGraphMapper { public final class TypedInstanceToGraphMapper {
private static final Logger LOG = LoggerFactory.getLogger(TypedInstanceToGraphMapper.class); private static final Logger LOG = LoggerFactory.getLogger(TypedInstanceToGraphMapper.class);
......
...@@ -43,6 +43,7 @@ import java.util.HashMap; ...@@ -43,6 +43,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@Deprecated
public class AttributeStores { public class AttributeStores {
private static final Object NULL_VAL = new Object(); private static final Object NULL_VAL = new Object();
......
...@@ -28,6 +28,7 @@ import org.apache.atlas.typesystem.types.ClassType; ...@@ -28,6 +28,7 @@ import org.apache.atlas.typesystem.types.ClassType;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Objects; import java.util.Objects;
@Deprecated
public class ClassStore extends HierarchicalTypeStore { public class ClassStore extends HierarchicalTypeStore {
final ArrayList<ImmutableList<String>> traitNamesStore; final ArrayList<ImmutableList<String>> traitNamesStore;
......
...@@ -37,6 +37,7 @@ import java.util.Map; ...@@ -37,6 +37,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock;
@Deprecated
public abstract class HierarchicalTypeStore { public abstract class HierarchicalTypeStore {
final MemRepository repository; final MemRepository repository;
......
...@@ -22,6 +22,7 @@ import org.apache.atlas.repository.RepositoryException; ...@@ -22,6 +22,7 @@ import org.apache.atlas.repository.RepositoryException;
import org.apache.atlas.typesystem.persistence.StructInstance; import org.apache.atlas.typesystem.persistence.StructInstance;
import org.apache.atlas.typesystem.types.IConstructableType; import org.apache.atlas.typesystem.types.IConstructableType;
@Deprecated
public interface IAttributeStore { public interface IAttributeStore {
/** /**
* Store the attribute's value from the 'instance' into this store. * Store the attribute's value from the 'instance' into this store.
......
...@@ -44,6 +44,7 @@ import java.util.Set; ...@@ -44,6 +44,7 @@ import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
@Deprecated
public class MemRepository implements IRepository { public class MemRepository implements IRepository {
final TypeSystem typeSystem; final TypeSystem typeSystem;
......
...@@ -28,6 +28,7 @@ import org.apache.atlas.typesystem.types.StructType; ...@@ -28,6 +28,7 @@ import org.apache.atlas.typesystem.types.StructType;
import java.util.Collection; import java.util.Collection;
import java.util.Map; import java.util.Map;
@Deprecated
public class StructStore extends AttributeStores.AbstractAttributeStore implements IAttributeStore { public class StructStore extends AttributeStores.AbstractAttributeStore implements IAttributeStore {
final StructType structType; final StructType structType;
......
...@@ -25,6 +25,7 @@ import org.apache.atlas.typesystem.types.TraitType; ...@@ -25,6 +25,7 @@ import org.apache.atlas.typesystem.types.TraitType;
import java.util.ArrayList; import java.util.ArrayList;
@Deprecated
public class TraitStore extends HierarchicalTypeStore { public class TraitStore extends HierarchicalTypeStore {
final ArrayList<String> classNameStore; final ArrayList<String> classNameStore;
......
...@@ -68,6 +68,7 @@ import com.google.inject.Inject; ...@@ -68,6 +68,7 @@ import com.google.inject.Inject;
import com.google.inject.Singleton; import com.google.inject.Singleton;
@Singleton @Singleton
@Deprecated
public class GraphBackedTypeStore implements ITypeStore { public class GraphBackedTypeStore implements ITypeStore {
public static final String VERTEX_TYPE = "typeSystem"; public static final String VERTEX_TYPE = "typeSystem";
private static final String PROPERTY_PREFIX = Constants.INTERNAL_PROPERTY_KEY_PREFIX + "type."; private static final String PROPERTY_PREFIX = Constants.INTERNAL_PROPERTY_KEY_PREFIX + "type.";
......
...@@ -23,6 +23,7 @@ import org.apache.atlas.AtlasException; ...@@ -23,6 +23,7 @@ import org.apache.atlas.AtlasException;
import org.apache.atlas.typesystem.TypesDef; import org.apache.atlas.typesystem.TypesDef;
import org.apache.atlas.typesystem.types.TypeSystem; import org.apache.atlas.typesystem.types.TypeSystem;
@Deprecated
public interface ITypeStore { public interface ITypeStore {
/** /**
......
...@@ -52,6 +52,7 @@ import com.google.inject.Singleton; ...@@ -52,6 +52,7 @@ import com.google.inject.Singleton;
* are also loaded from the store if they are not already in the cache. * are also loaded from the store if they are not already in the cache.
*/ */
@Singleton @Singleton
@Deprecated
public class StoreBackedTypeCache extends DefaultTypeCache { public class StoreBackedTypeCache extends DefaultTypeCache {
private ITypeStore typeStore; private ITypeStore typeStore;
......
...@@ -85,6 +85,7 @@ import javax.inject.Singleton; ...@@ -85,6 +85,7 @@ import javax.inject.Singleton;
* for listening to changes to the repository. * for listening to changes to the repository.
*/ */
@Singleton @Singleton
@Deprecated
public class DefaultMetadataService implements MetadataService, ActiveStateChangeHandler, TypeDefChangeListener { public class DefaultMetadataService implements MetadataService, ActiveStateChangeHandler, TypeDefChangeListener {
private enum OperationType { private enum OperationType {
CREATE, UPDATE, DELETE CREATE, UPDATE, DELETE
......
...@@ -35,6 +35,7 @@ import org.apache.atlas.typesystem.types.TypeSystem; ...@@ -35,6 +35,7 @@ import org.apache.atlas.typesystem.types.TypeSystem;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@Deprecated
public class RequestContext { public class RequestContext {
private static final Logger LOG = LoggerFactory.getLogger(RequestContext.class); private static final Logger LOG = LoggerFactory.getLogger(RequestContext.class);
......
...@@ -38,6 +38,7 @@ import java.util.Map; ...@@ -38,6 +38,7 @@ import java.util.Map;
/** /**
* Metadata service. * Metadata service.
*/ */
@Deprecated
public interface MetadataService { public interface MetadataService {
/** /**
......
...@@ -45,6 +45,7 @@ import javax.inject.Singleton; ...@@ -45,6 +45,7 @@ import javax.inject.Singleton;
@Singleton @Singleton
@InterfaceAudience.Private @InterfaceAudience.Private
@Deprecated
public class TypeSystem { public class TypeSystem {
private static final Logger LOG = LoggerFactory.getLogger(TypeSystem.class); private static final Logger LOG = LoggerFactory.getLogger(TypeSystem.class);
......
...@@ -45,6 +45,7 @@ import javax.ws.rs.core.Response; ...@@ -45,6 +45,7 @@ import javax.ws.rs.core.Response;
*/ */
@Path("lineage/hive") @Path("lineage/hive")
@Singleton @Singleton
@Deprecated
public class DataSetLineageResource { public class DataSetLineageResource {
private static final Logger LOG = LoggerFactory.getLogger(DataSetLineageResource.class); private static final Logger LOG = LoggerFactory.getLogger(DataSetLineageResource.class);
......
...@@ -88,6 +88,7 @@ import java.util.Map; ...@@ -88,6 +88,7 @@ import java.util.Map;
*/ */
@Path("entities") @Path("entities")
@Singleton @Singleton
@Deprecated
public class EntityResource { public class EntityResource {
private static final Logger LOG = LoggerFactory.getLogger(EntityResource.class); private static final Logger LOG = LoggerFactory.getLogger(EntityResource.class);
......
...@@ -48,6 +48,7 @@ import javax.ws.rs.core.Response; ...@@ -48,6 +48,7 @@ import javax.ws.rs.core.Response;
@Path("lineage") @Path("lineage")
@Singleton @Singleton
@Deprecated
public class LineageResource { public class LineageResource {
private static final Logger LOG = LoggerFactory.getLogger(DataSetLineageResource.class); private static final Logger LOG = LoggerFactory.getLogger(DataSetLineageResource.class);
private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.LineageResource"); private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.LineageResource");
......
...@@ -52,6 +52,7 @@ import java.util.Map; ...@@ -52,6 +52,7 @@ import java.util.Map;
*/ */
@Path("discovery") @Path("discovery")
@Singleton @Singleton
@Deprecated
public class MetadataDiscoveryResource { public class MetadataDiscoveryResource {
private static final Logger LOG = LoggerFactory.getLogger(MetadataDiscoveryResource.class); private static final Logger LOG = LoggerFactory.getLogger(MetadataDiscoveryResource.class);
......
...@@ -63,6 +63,7 @@ import java.util.List; ...@@ -63,6 +63,7 @@ import java.util.List;
*/ */
@Path("types") @Path("types")
@Singleton @Singleton
@Deprecated
public class TypesResource { public class TypesResource {
private static final Logger LOG = LoggerFactory.getLogger(TypesResource.class); private static final Logger LOG = LoggerFactory.getLogger(TypesResource.class);
private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.TypesResource"); private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.TypesResource");
......
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