Re: Review Request 74061: ATLAS-4637: Import/Export Feature for MetricsStat

2022-07-15 Thread Beakal Lemeneh

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74061/
---

(Updated July 15, 2022, 7:34 p.m.)


Review request for atlas, Disha Talreja, Radhika Kundam, and Sidharth Mishra.


Bugs: ATLAS-4637
https://issues.apache.org/jira/browse/ATLAS-4637


Repository: atlas


Description
---

1. Add new attribute - importLabel - to MetricsStat. It contains the 
name/identity of the user who is importing MetricsStat file from one machine to 
another machine. For some Machine A, importLabel is set to "self" for the 
already existing MetricsStat that collects the metrics info in Machine A, and 
has not been imported from another machine.

2. Update metricsId to contain both importLabel and collectionTime to continue 
holding its property of being a unique attribute.

3. Update MetricsService to implement REST APIs in AdminResource to realize api 
calls of:
  1. Post MetricsStat with a specific importLabel obtained from a another 
machine.
  2. Get MetricsStat with a specific importLabel found in some machine with 
a boolean flag that returns metrics with specific details, or with minimal 
information.
  3. Delete all existing MetricsStats entities in a given machine.
  4. Delete all existing MetricsStats entities in a given machine with a 
specific importLabel.
  5. Get all importLabels.

6. Update MetricsService to include helper methods of:
  1. Get a persisted metricsStat by importLabel.
  2. Get a persisted metricsStat by collectionTime and importLabel.


Diffs
-

  intg/src/main/java/org/apache/atlas/model/metrics/AtlasMetricsStat.java 
5a30cad06a8616184e09bd48fe99975b6750adc8 
  
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
 9924b2e4ce2c7b2d44b64657b300e1592b2bd394 
  
repository/src/main/java/org/apache/atlas/repository/ogm/metrics/AtlasMetricsStatDTO.java
 6af935ebbb1f3b5e03589d19ea16d51ba675d5db 
  repository/src/main/java/org/apache/atlas/services/MetricsService.java 
9ec2cd2cb249b1f881f01261e7ae7e10f0adbe67 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 
d55ada77edd9d006d6ef31720c427e08984097ba 


Diff: https://reviews.apache.org/r/74061/diff/1/


Testing
---


Thanks,

Beakal Lemeneh



[jira] [Resolved] (ATLAS-4638) Column inconsistent in Hive and Atlas

2022-07-15 Thread Paresh Devalia (Jira)


 [ 
https://issues.apache.org/jira/browse/ATLAS-4638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paresh Devalia resolved ATLAS-4638.
---
  Assignee: Paresh Devalia
Resolution: Cannot Reproduce

> Column inconsistent in Hive and Atlas
> -
>
> Key: ATLAS-4638
> URL: https://issues.apache.org/jira/browse/ATLAS-4638
> Project: Atlas
>  Issue Type: Bug
>  Components:  atlas-core
>Reporter: Paresh Devalia
>Assignee: Paresh Devalia
>Priority: Major
>
> PROBLEM STATEMENT
> Created a DB_1 in Hive and disable the Atlas hook from hive and hive_tez.
> Created 1 tables with 2 column in DB_1.
> In Atlas UI we checked it has no entity created, so we ran import-hive.sh
> bash import-hive.sh -d DB_1 -t table_1, so this command will only create one 
> entity with 2 column in atlas.
> Add 3rd column on that table from hive -> ALTER TABLE tableName ADD COLUMNS 
> (columnName int);
> Than we ran import-hive.sh -d DB_1 -t table_1.
> In Atlas UI we checked entity already created, but 3rd column is not added.
> 3 column in hive and in atlas only 2 column present.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)