Repository: incubator-atlas Updated Branches: refs/heads/master a2c3faad1 -> f54325f1c
ATLAS-772 Ordering of columns is not maintained in schema query response, where as hive table entity response maintains the ordering ([email protected] via kevalbhatt) Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/e817b214 Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/e817b214 Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/e817b214 Branch: refs/heads/master Commit: e817b214387525def94930a7375b297157037155 Parents: a2c3faa Author: Keval Bhatt <[email protected]> Authored: Thu Sep 1 12:36:30 2016 +0530 Committer: Keval Bhatt <[email protected]> Committed: Thu Sep 1 12:36:30 2016 +0530 ---------------------------------------------------------------------- .../java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java | 4 +++- .../java/org/apache/atlas/hive/model/HiveDataModelGenerator.java | 4 +++- release-log.txt | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/e817b214/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 1f13d74..ad7a4a5 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 @@ -576,7 +576,7 @@ public class HiveMetaStoreBridge { public List<Referenceable> getColumns(List<FieldSchema> schemaList, Referenceable tableReference) throws Exception { List<Referenceable> colList = new ArrayList<>(); - + int columnPosition = 0; for (FieldSchema fs : schemaList) { LOG.debug("Processing field " + fs); Referenceable colReferenceable = new Referenceable(HiveDataTypes.HIVE_COLUMN.getName()); @@ -585,9 +585,11 @@ public class HiveMetaStoreBridge { colReferenceable.set(AtlasClient.NAME, fs.getName()); colReferenceable.set(AtlasClient.OWNER, tableReference.get(AtlasClient.OWNER)); colReferenceable.set("type", fs.getType()); + colReferenceable.set(HiveDataModelGenerator.POSITION, columnPosition++); colReferenceable.set(HiveDataModelGenerator.COMMENT, fs.getComment()); colReferenceable.set(HiveDataModelGenerator.TABLE, tableReference.getId()); + colList.add(colReferenceable); } return colList; http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/e817b214/addons/hive-bridge/src/main/java/org/apache/atlas/hive/model/HiveDataModelGenerator.java ---------------------------------------------------------------------- diff --git a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/model/HiveDataModelGenerator.java b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/model/HiveDataModelGenerator.java index b308cc9..45f0bc9 100755 --- a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/model/HiveDataModelGenerator.java +++ b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/model/HiveDataModelGenerator.java @@ -64,6 +64,7 @@ public class HiveDataModelGenerator { public static final String COMMENT = "comment"; public static final String PARAMETERS = "parameters"; public static final String COLUMNS = "columns"; + public static final String POSITION = "position"; public static final String PART_COLS = "partitionKeys"; public static final String TABLE_ALIAS_LIST = "aliases"; @@ -224,7 +225,8 @@ public class HiveDataModelGenerator { new AttributeDefinition(COMMENT, DataTypes.STRING_TYPE.getName(), Multiplicity.OPTIONAL, false, null), //Making this optional since this is an incompatible change //Reverse attribute to 'columns' in Table - new AttributeDefinition(TABLE, HiveDataTypes.HIVE_TABLE.getName(), Multiplicity.OPTIONAL, false, COLUMNS),}; + new AttributeDefinition(TABLE, HiveDataTypes.HIVE_TABLE.getName(), Multiplicity.OPTIONAL, false, COLUMNS), + new AttributeDefinition(POSITION, DataTypes.INT_TYPE.getName(), Multiplicity.OPTIONAL, false, false, false, null)}; HierarchicalTypeDefinition<ClassType> definition = new HierarchicalTypeDefinition<>(ClassType.class, HiveDataTypes.HIVE_COLUMN.getName(), null, http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/e817b214/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index 137acba..1a1e0ca 100644 --- a/release-log.txt +++ b/release-log.txt @@ -10,6 +10,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai) ALL CHANGES: +ATLAS-772 Ordering of columns is not maintained in schema query response, where as hive table entity response maintains the ordering ([email protected] via kevalbhatt) ATLAS-1140 All the tag's attributes are not seen while applying a tag to entity (kevalbhatt) ATLAS-1141 UI-Issue - Tag with spaces, when searched, then it is wrongly set in search textbox. (Kalyanikashikar via kevalbhatt) ATLAS-1129 Remove notification failed logs on retry and add sleep between retries (svimal2106 via sumasai)
