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

Ramachandran Krishnan resolved RANGER-5656.
-------------------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

> TagSync Atlas REST sync fails with AbstractMethodError after RANGER-4076 
> Jersey 2 migration
> -------------------------------------------------------------------------------------------
>
>                 Key: RANGER-5656
>                 URL: https://issues.apache.org/jira/browse/RANGER-5656
>             Project: Ranger
>          Issue Type: Task
>          Components: Ranger
>    Affects Versions: 3.0.0
>            Reporter: Ramachandran Krishnan
>            Assignee: Ramachandran Krishnan
>            Priority: Major
>             Fix For: 3.0.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> h2. Summary
> When {{{}TAG_SOURCE_ATLASREST_ENABLED=true{}}}, TagSync fails to sync Atlas 
> classifications into Ranger because {{AtlasRESTTagSource}} still uses 
> {{AtlasClientV2}} (Jersey 1.x via {{{}atlas-client-v2{}}}) while TagSync's 
> Ranger REST sink uses Jersey 2.x (introduced by RANGER-4076). Both JAX-RS 
> stacks load on the same JVM, causing {{AbstractMethodError}} in 
> {{UriBuilderImpl}} and the Atlas REST sync thread to exit on the first poll.
> h2. Environment
>  * Component: {{tagsync}} — {{AtlasRESTTagSource}}
>  * Config: {{TAG_SOURCE_ATLASREST_ENABLED=true}}
>  * Affected since: *RANGER-4076* (May 2026) — Jersey 1.x → Glassfish Jersey 
> 2.x migration
>  * Prior behavior: Worked before RANGER-4076 when TagSync also used Jersey 
> 1.x ({{{}com.sun.jersey{}}})
> h2. Steps to reproduce
>  # Enable Atlas REST tag source in {{{}ranger-tagsync-install.properties{}}}:
>  ** {{TAG_SOURCE_ATLASREST_ENABLED=true}}
>  ** {{TAG_SOURCE_ATLASREST_ENDPOINT=http://<atlas-host>:21000}}
>  # Start TagSync
>  # Classify a Hive column as PII (or any classification) in Atlas
>  # Wait for TagSync poll interval (~60s)
>  # Check Ranger Admin → Tag → resource mappings
> h2. Expected result
>  * TagSync polls Atlas REST without error
>  * Classifications appear in Ranger as tag resource mappings ({{{}createdBy: 
> rangertagsync{}}})
>  * Tag-based Hive policies (deny/mask) can enforce on synced tags
> h2. Actual result
>  * TagSync process may remain up, but Atlas REST sync thread dies
>  * Log shows {{AbstractMethodError}} in {{javax.ws.rs.core.UriBuilder}} / 
> {{UriBuilderImpl}}
>  * No automatic Atlas → Ranger tag push; Ranger tag mappings missing unless 
> manually imported via REST/file
> h2. Root cause
> ||Before RANGER-4076||After RANGER-4076 (broken)||
> |{{AtlasClientV2}} (Jersey 1) + TagSync sink (Jersey 1)|{{AtlasClientV2}} 
> (Jersey 1) + {{TagAdminRESTSink}} (Jersey 2)|
> Classloader isolation was attempted; it caused {{LinkageError}} / 
> {{ClassCastException}} on {{{}RuntimeDelegate{}}}.
> h2. Proposed fix
>  # Add {{AtlasRESTHttpClient}} — minimal Atlas REST client using 
> {{HttpURLConnection}} + Atlas {{AtlasType}} JSON (no Jersey, no 
> {{{}AtlasClientV2{}}})
>  ** {{POST api/atlas/v2/search/basic}} — classified entity search
>  ** {{GET api/atlas/v2/types/typedefs/}} — typedef load
>  # Update {{AtlasRESTTagSource}} to use {{AtlasRESTHttpClient}} instead of 
> {{AtlasClientV2}}
>  # Remove {{atlas-client-v1}} / {{atlas-client-v2}} from {{tagsync/pom.xml}}
>  # Remove {{atlas-client-*}} from {{distro/src/main/assembly/tagsync.xml}} 
> runtime {{lib/}}
> *Not changed:* {{{}TagSynchronizer{}}}, {{{}TagAdminRESTSink{}}}, Atlas Kafka 
> tag source, Hive plugin.
> Related issues
>  * *RANGER-4076* — Jersey 1 → 2 migration



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

Reply via email to