Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How can I connect SAM to Schema Registry in HDF 3.1.2

Highlighted

How can I connect SAM to Schema Registry in HDF 3.1.2

When I try to use the Kafka Consumer in SAM and chose the topic named "SHOWCASE", it says "Schema not Found" although a valid Schema named "SHOWCASE" exists within Schema Registry. It seems like SAM doesn't even connect to Schema Registry for some reason.

This is the ERROR-Message:

ERROR  [2018-09-04 08:40:02.058] [dw-1772 - GET /api/v1/schemas/SHOWCASE_IN_TEMP/MASTER/versions] c.h.s.s.s.GenericExceptionMapper -  Got exception: [NotFoundException] / message [HTTP 404 Not Found] 
javax.ws.rs.NotFoundException: HTTP 404 Not Found
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:323)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
	at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
	at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
	at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:34)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
	at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:50)
	at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:44)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240)
	at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
	at io.dropwizard.jetty.BiDiGzipHandler.handle(BiDiGzipHandler.java:68)
	at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:56)
	at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:169)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:524)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:748)

This is the Avro-Schema in SR:

{
  "type":"record",
  "name":"SHOWCASE",
  "fields":
  [
    {
      "name":"field1",
      "type":"string"
    }
  ]
}

This is the streamline.yaml (without annotations):

modules:
  - name: tag-registry
    className: com.hortonworks.streamline.registries.tag.service.TagRegistryModule
  - name: dashboard-registry
    className: com.hortonworks.streamline.registries.dashboard.service.DashboardRegistryModule
  - name: model-registry
    className: com.hortonworks.streamline.registries.model.service.MLModelRegistryModule
  - name: streams
    className: com.hortonworks.streamline.streams.service.StreamsModule
    config:
      stormHomeDir: "/usr/hdf/current/storm-client"
      schemaRegistryUrl: "http://hdfmetastore.devnet.local:7788/api/v1"
      mavenRepoUrl: "hwx-public^http://repo.hortonworks.com/content/groups/public/,hwx-private^http://nexus-private.hortonworks.com/nexus/content/groups/public/"
      topologyTestRunResultDir: "/hdf/streamline/topology_test_results"


catalogRootUrl: http://hdfsam.devnet.local:7777/api/v1/catalog


fileStorageConfiguration:
  className: com.hortonworks.registries.common.util.LocalFileSystemStorage
  properties:
    directory: /hdf/streamline/jars
  
dashboardConfiguration:
  url: "http://localhost:9088"


storageProviderConfiguration: 
  properties: 
    db.properties: 
      dataSource.password: "streamline"
      dataSource.url: "jdbc:postgresql://hdfmetastore.devnet.local:5432/streamline"
      dataSource.user: "streamline"
      dataSourceClassName: "org.postgresql.ds.PGSimpleDataSource"
    db.type: postgresql
    queryTimeoutInSecs: 30
  providerClass: "com.hortonworks.registries.storage.impl.jdbc.JdbcStorageManager"






server:
  rootPath: '/api/*'
  applicationConnectors:
    - type: http
      port: 7777
  adminConnectors:
    - type: http
      port: 7778




logging:
    
 level: INFO
 loggers:
  com.hortonworks.streamline: DEBUG
 appenders:
   - type: file
     threshold: INFO
     logFormat: "%-6level [%d{yyyy-MM-dd HH:mm:ss.SSS}] [%t] %logger{5} - %X{code} %msg %n"
     currentLogFilename: /var/log/streamline/streamline.log
     archivedLogFilenamePattern: /var/log/streamline/streamline-%d{yyyy-MM-dd}-%i.log.gz
     archivedFileCount: 2
     timeZone: UTC
     maxFileSize: 64MB

Schema Registry is installed on the hdfmetastore-node and listens on port 7788.

Thanks in advance!

1 REPLY 1

Re: How can I connect SAM to Schema Registry in HDF 3.1.2

I solved the problem. It was related to Browser Cache Data. Cleared the Browser Cache for the Browser that I use the SAM UI with, and now it works.

Don't have an account?
Coming from Hortonworks? Activate your account here