cloudera / navigator-sdk

Navigator SDK
Apache License 2.0
22 stars 23 forks source link

Failed to run code example on Cloudera Navigator 2.11.0 #87

Closed zafkirTalend closed 6 years ago

zafkirTalend commented 6 years ago

Hello,

We use Cloudera Navigator SDK build from master (includes v2.0 branch) to run this example below:

https://github.com/cloudera/navigator-sdk/blob/master/examples/src/main/java/com/cloudera/nav/sdk/examples/lineage/CustomLineageCreator.java

We use CDH 5.12 and Cloudera Navigator 2.11.0 (git: b6e15e848b225792530d116207d2e5a4a5e15179; build: jenkins-CM5.12.0-Navigator-nav-2.11.0-56).

See the sample configuration used on our side:

## this is the URL of the client application
application_url=http://localhost

## Replace localhost:7187 with actual navigator URL
navigator_url=http://localhost:7187

## Minimum is version 7 for publishing metadata to Navigator
## Version 9 is minimum for typed custom property support
navigator_api_version=11

## Designator for client application
## This will be used as the meta class package and custom property namespace
namespace=cloudera

## Navigator username and password
username=admin
password=admin

See detailed log below when running the code example:

2017-10-06 11:52:06,048 DEBUG [main:reflections.Reflections@185] going to scan these urls:
file:/C:/sources/navigator-sdk/examples/target/classes/
2017-10-06 11:52:06,124  INFO [main:reflections.Reflections@228] Reflections took 69 ms to scan 1 urls, producing 2 keys and 4 values 
2017-10-06 11:52:06,144  INFO [main:client.NavigatorPlugin@120] Registering models: [class com.cloudera.nav.sdk.examples.lineage.StetsonExecution, class com.cloudera.nav.sdk.examples.lineage.StetsonScript]
2017-10-06 11:52:06,405 DEBUG [main:client.RestTemplate@78] Created POST request for "http://localhost:7187/api/v11/models"
2017-10-06 11:52:06,453 DEBUG [main:client.RestTemplate@679] Setting request Accept header to [application/json, application/*+json]
2017-10-06 11:52:06,462 DEBUG [main:client.RestTemplate@756] Writing [com.cloudera.nav.sdk.model.MetadataModel@a514af7] using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@6b927fb]
2017-10-06 11:52:06,520 DEBUG [main:client.RestTemplate@579] POST request for "http://localhost:7187/api/v11/models" resulted in 200 (OK)
2017-10-06 11:52:06,520 DEBUG [main:client.RestTemplate@92] Reading [class com.cloudera.nav.sdk.model.MetadataModel] as "application/json" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@6b927fb]
Exception in thread "main" java.lang.RuntimeException: Error writing metadata (code 400): EndPoint2 must not be null or empty <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/><title>Error 400 EndPoint2 must not be null or empty</title></head><body><h2>HTTP ERROR 400</h2><p>Problem accessing /api/v11/metadata/plugin. Reason:<pre>    EndPoint2 must not be null or empty</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                <br/>                                                </body></html>
    at com.cloudera.nav.sdk.client.writer.JsonMetadataWriter.flush(JsonMetadataWriter.java:96)
    at com.cloudera.nav.sdk.client.NavigatorPlugin.write(NavigatorPlugin.java:165)
    at com.cloudera.nav.sdk.client.NavigatorPlugin.write(NavigatorPlugin.java:154)
    at com.cloudera.nav.sdk.examples.lineage.CustomLineageCreator.run(CustomLineageCreator.java:90)
    at com.cloudera.nav.sdk.examples.lineage.CustomLineageCreator.main(CustomLineageCreator.java:59)

Is the Cloudera Navigator SDK from master supposed to be compatible with Cloudera Navigator 2.11.0 ?

Thanks

aadarshjajodia commented 6 years ago

@zafkirTalend the SDK v2.0 and master will be compatible with all future releases of Navigator. It is not compatible with Navigator 2.11.0 as it has already been released. Also version.MD was not up to date. I have just updated it. https://github.com/cloudera/navigator-sdk/blob/master/VERSION.md

zafkirTalend commented 6 years ago

@aadarshjajodia So as mentionned on version.md file, is the SDK v2.0 or master compatible with 2.11.0? And if not, do you know when you will officially support it? Thanks

aadarshjajodia commented 6 years ago

@zafkirTalend v2.0 is not supported with 2.11.0. It is supported with 2.12.0 which has just been released. For 2.11 it will be compatible with 2.11.2 and above (We don't know dates of this release yet)

zafkirTalend commented 6 years ago

I success to run the example below on Cloudera Navigator 2.12.0 using Cloudera Navigator SDK build from master:

https://github.com/cloudera/navigator-sdk/blob/master/examples/src/main/java/com/cloudera/nav/sdk/examples/lineage/CustomLineageCreator.java

Thanks

aadarshjajodia commented 6 years ago

@zafkirTalend thats great. Thank you 👍