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

(Updated Jan. 23, 2025, 1:16 p.m.)


Review request for ranger, Madhan Neethiraj and Ramesh Mani.


Bugs: RANGER-5111
    https://issues.apache.org/jira/browse/RANGER-5111


Repository: ranger


Description (updated)
-------

The Summary API should support distinct filtering capabilities that include all 
unique labels and keywords associated with the datashares returned in the 
response. Additionally, the API should provide the count of datashares linked 
to each specific label and keyword. This enhancement ensures that the data can 
be effectively utilized for advanced filtering on the UI.


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/plugin/model/RangerGds.java 
260ebc0a8 
  security-admin/src/main/java/org/apache/ranger/biz/GdsDBStore.java 7916f0818 
  security-admin/src/main/java/org/apache/ranger/rest/GdsREST.java 0d3ef3d76 


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


Testing
-------

Tested locally.

Summary view with filters(Labels & Keywords) of DataShares in GDS:
-----------------------------------------------------------------
Request:
-------
curl -X GET -u <username>:<pwd> '<ranger 
url>/service/gds/dataset/summarywithfilters?pageSize=1

Response: 
--------
Response consists of datasetSummary and filters
datasetSummary: list of all datasets
filters: map with relevant labels and keywords with dataset counts

{
    "datasetSummary": {
        "startIndex": 0,
        "pageSize": 1,
        "totalCount": 8,
        "resultSize": 1,
        "sortType": "asc",
        "sortBy": "datasetId",
        "queryTimeMS": 1737664148576,
        "list": [
            {
                "id": 1,
                "guid": "87662f8e-57af-40e3-8c92-45c108d474ac",
                "isEnabled": true,
                "createdBy": "Admin",
                "updatedBy": "Admin",
                "createTime": 1736362927000,
                "updateTime": 1736362927000,
                "version": 1,
                "name": "dataset-1",
                "permissionForCaller": "ADMIN",
                "principalsCount": {
                    "USER": 1,
                    "GROUP": 1,
                    "ROLE": 0
                },
                "aclPrincipalsCount": {
                    "USER": 1,
                    "GROUP": 0,
                    "ROLE": 0
                },
                "projectsCount": 0,
                "totalResourceCount": 4,
                "dataShares": [
                    {
                        "id": 1,
                        "guid": "d4596038-122d-476f-a5e5-55937e87e011",
                        "isEnabled": true,
                        "createdBy": "Admin",
                        "updatedBy": "Admin",
                        "createTime": 1736362834000,
                        "updateTime": 1736362834000,
                        "version": 1,
                        "dataShareId": 1,
                        "dataShareName": "datashare-1",
                        "serviceId": 6,
                        "serviceName": "cm_hive",
                        "zoneName": " ",
                        "resourceCount": 4,
                        "shareStatus": "ACTIVE",
                        "approver": "admin"
                    }
                ]
            }
        ],
        "listSize": 1
    },
    "filters": {
        "aggregatedKeywords": {
            "kw1": 2,
            "testKW1": 1,
            "kw2": 2,
            "kw21": 3,
            "kw11": 3
        },
        "aggregatedLabels": {
            "abc1": 2,
            "test2": 2,
            "test21": 3,
            "abc111": 3,
            "testLabel1": 1
        }
    }
}


Thanks,

Radhika Kundam

Reply via email to