You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Sandor Molnar (Jira)" <ji...@apache.org> on 2020/01/21 14:24:00 UTC
[jira] [Commented] (KNOX-2187) Add metadata to service definitions
[ https://issues.apache.org/jira/browse/KNOX-2187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17020259#comment-17020259 ]
Sandor Molnar commented on KNOX-2187:
-------------------------------------
If we had metadata in the Knox service definitions ({{service.xml}} files) it would also be possible to know if a particular service fits into an "API" or a "UI" kind of topology. For instance: {{ATLAS-API}} is a good fit for an API-like topology whereas {{ATLAS}} is a good candidate for a topology that lists UI services.
The latter case is also a good sample of how service dependencies are useful: let's assume you have a topology with {{ATLAS}} but {{ATLAS-API}} is not added in this topology's service list. Dispatching certain {{ATLAS}} endpoints will result in an error due to the missing {{ATLAS_API}} service.
The first version of service definition metadata should contain the following information:
* api - a boolean flag indicating if the service is an API service in KNOX
* ui - a boolean flag indicating if the service is a UI service in KNOX
* dependsOn - a list of Knox services which the current service depends on
For instance:
{{- ATLAS}} would have the following metadata:
{code:java}
<metadata>
<api>false</api>
<ui>true</ui>
<dependsOn>ATLAS-API</ui>
</metadata> {code}
{{- ATLAS-API}} would have the following metadata:
{code:java}
<metadata>
<api>true</api>
<ui>false</ui>
<dependsOn />
</metadata> {code}
There are some services which are both API and UI like services. For instance, SOLR is one of them:
{code:java}
<service role="SOLR" name="solr" version="6.0.0">
<metadata>
<api>true</api>
<ui>true</ui>
<dependsOn />
</metadata>
...
</service>{code}
> Add metadata to service definitions
> -----------------------------------
>
> Key: KNOX-2187
> URL: https://issues.apache.org/jira/browse/KNOX-2187
> Project: Apache Knox
> Issue Type: New Feature
> Components: Server
> Affects Versions: 1.1.0, 1.2.0, 1.3.0, 1.4.0
> Reporter: Sandor Molnar
> Priority: Minor
> Fix For: 1.5.0
>
>
> There are some services - mainly UI services - that are not working without some more required services in place (mainly their API counterpart). For instance: {{RANGERUI}} won't work properly if {{RANGER}} is not available.
> To address this issue, some sort of metadata should be added in service definitions and a new strategy should be introduced when auto-discovery is enabled.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)