Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-1646

V1 and V2 GET entity response show different values for date attribute of a tag which has no value set.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8-incubating
    • 0.8-incubating
    • atlas-core
    • None

    Description

      Created a tag with date as attribute and POSTed to /api/atlas/types. Associated the tag to an entity with no value for date through REST API. Association is successful .V1 GET Entity API shows 1970-01-01T00:00:00.000Z as value for date and V2 GET Entity API shows 0 as value for date.

      V1 API :

      /api/atlas/entities/b10e3c49-af76-4585-893e-c7de6a97ad9b
      
      {
      	requestId: "pool-2-thread-9 - 2c83885c-166b-418c-a7ac-441e1b68d3f2",
      	definition: {
      		jsonClass: "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
      		id: {
      			jsonClass: "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
      			id: "b10e3c49-af76-4585-893e-c7de6a97ad9b",
      			version: 0,
      			typeName: "EntityTraitTestClasshqorbbnkkx",
      			state: "ACTIVE"
      		},
      		typeName: "EntityTraitTestClasshqorbbnkkx",
      		values: {
      			name: "EntityTraitTestEntity9psmssjmyp"
      		},
      		traitNames: [
      			"addTraitOptionalAttrNotSet9psmssjmyp"
      		],
      		traits: {
      			addTraitOptionalAttrNotSet9psmssjmyp: {
      				jsonClass: "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
      				typeName: "addTraitOptionalAttrNotSet9psmssjmyp",
      				values: {
      					date: "1970-01-01T00:00:00.000Z",
      					name: "addTraitOptionalAttrName"
      				}
      			}
      		},
      		systemAttributes: {
      			createdBy: "admin",
      			modifiedBy: "admin",
      			createdTime: "2017-03-06T13:08:37.666Z",
      			modifiedTime: "2017-03-06T13:08:37.666Z"
      		}
      	}
      }
      

      V2 API response

      /api/atlas/v2/entity/guid/b10e3c49-af76-4585-893e-c7de6a97ad9b
      
      {
      	referredEntities: {},
      	entity: {
      		typeName: "EntityTraitTestClasshqorbbnkkx",
      		attributes: {
      			name: "EntityTraitTestEntity9psmssjmyp"
      		},
      		guid: "b10e3c49-af76-4585-893e-c7de6a97ad9b",
      		status: "ACTIVE",
      		createdBy: "admin",
      		updatedBy: "admin",
      		createTime: 1488805717666,
      		updateTime: 1488805717666,
      		version: 0,
      		classifications: [{
      			typeName: "addTraitOptionalAttrNotSet9psmssjmyp",
      			attributes: {
      				date: 0,
      				name: "addTraitOptionalAttrName"
      			}
      		}]
      	}
      }
      

      Attachments

        1. ATLAS-1646.2.patch
          6 kB
          Ashutosh Mestry

        Issue Links

          Activity

            People

              amestry Ashutosh Mestry
              sharmadhas Sharmadha S
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: