[Backlogmanager] [FIWARE-JIRA] (HELP-12907) [fiware-askbot] Make Fiware-Cygnus storing to Apache-Phoenix database

Veronika Vlnkova (JIRA) jira-help-desk at jira.fiware.org
Tue Nov 7 13:12:00 CET 2017


     [ https://jira.fiware.org/browse/HELP-12907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Veronika Vlnkova reassigned HELP-12907:
---------------------------------------

    Assignee: Joaquín Salvachúa 

> [fiware-askbot] Make Fiware-Cygnus storing to Apache-Phoenix database
> ---------------------------------------------------------------------
>
>                 Key: HELP-12907
>                 URL: https://jira.fiware.org/browse/HELP-12907
>             Project: Help-Desk
>          Issue Type: Monitor
>            Reporter: Backlog Manager
>            Assignee: Joaquín Salvachúa 
>              Labels: agent, cygnus, fiware-cygnus, phoenix, sink
>
> Created question in FIWARE Q/A platform on 06-11-2017 at 17:11
> {color: red}Please, ANSWER this question AT{color} https://ask.fiware.org/question/900/make-fiware-cygnus-storing-to-apache-phoenix-database/
> +Question:+
> Make Fiware-Cygnus storing to Apache-Phoenix database
> +Description:+
> I just asked this question on Stackoverflow too.
> I'm new to Cygnus and to Phoenix db. I want Cygnus to store data in an Apache Phoenix db, so I have to configure the Phoenix Sink to work with Cygnus.          
> I know that Cygnus is an extension of Apache Flume, so any Flume agent can work with it by default (theoretically). I configured my Flume agent agent_phoenix.conf file for Cygnus like this:
> cygnus-ngsi.channels = memoryChannel
> cygnus-ngsi.sinks = phoenix-sink
> cygnus-ngsi.sources.http-source.type = org.apache.flume.source.http.HTTPSource
> cygnus-ngsi.sources.http-source.channels = memoryChannel
> cygnus-ngsi.sources.http-source.port = 5051
> cygnus-ngsi.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.NGSIRestHandler
> cygnus-ngsi.sources.http-source.handler.notification_target = /notify
> cygnus-ngsi.sources.http-source.handler.default_service = default
> cygnus-ngsi.sources.http-source.handler.default_service_path = /
> cygnus-ngsi.sources.http-source.interceptors = ts gi
> cygnus-ngsi.sources.http-source.interceptors.ts.type = timestamp
> cygnus-ngsi.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor$Builder
> cygnus-ngsi.sources.http-source.interceptors.gi.grouping_rules_conf_file = /opt/apache-flume/conf/grouping_rules.conf
> cygnus-ngsi.channels.memoryChannel.type=memory
> cygnus-ngsi.channels.memoryChannel.transactionCapacity=100
> cygnus-ngsi.channels.memoryChannel.byteCapacityBufferPercentage=20
> cygnus-ngsi.sinks.phoenix-sink.type=org.apache.phoenix.flume.sink.PhoenixSink
> cygnus-ngsi.sinks.phoenix-sink.channel=memoryChannel
> cygnus-ngsi.sinks.phoenix-sink.batchSize=100
> cygnus-ngsi.sinks.phoenix-sink.table=PROVA_PHOENIX
> c.sinks.phoenix-sink.ddl=CREATETABLEIFNOTEXISTSPROVA_PHOENIX(uidVARCHARNOTNULL,f_hostVARCHARCONSTRAINTpkPRIMARYKEY(uid),colonnaProvaVARCHAR)
> cygnus-ngsi.sinks.phoenix-sink.zookeeperQuorum=localhost
> cygnus-ngsi.sinks.phoenix-sink.serializer=REGEX
> cygnus-ngsi.sinks.phoenix-sink.serializer.rowkeyType=uuid
> cygnus-ngsi.sinks.phoenix-sink.serializer.columns=colonnaProva
> and launched it using this command on CentOS command line:
> /usr/cygnus/bin/cygnus-flume-ng agent --conf /usr/cygnus/conf/ -f /usr/cygnus/conf/agent_phoenix.conf -n cygnus-ngsi -Dflume.root.logger=INFO,console
> It starts doing some initializations but then I get this message:
> 76666 [lifecycleSupervisor-1-8] ERROR org.apache.phoenix.flume.serializer.BaseEventSerializer  - error No suitable driver found for jdbc:phoenix:localhost; occurred during initializing connection 
> 176667 [lifecycleSupervisor-1-8] ERROR org.apache.phoenix.flume.sink.PhoenixSink  - Error No suitable driver found for jdbc:phoenix:localhost; in initializing the serializer.
> 176667 [lifecycleSupervisor-1-8] ERROR org.apache.flume.lifecycle.LifecycleSupervisor  - Unable to start SinkRunner: { policy:org.apache.flume.sink.DefaultSinkProcessor at 29918f3 counterGroup:{ name:null counters:{} } } - Exception follows.
> java.lang.RuntimeException: java.sql.SQLException: No suitable driver found for jdbc:phoenix:localhost;
> at com.google.common.base.Throwables.propagate(Throwables.java:156)
> at org.apache.phoenix.flume.sink.PhoenixSink.start(PhoenixSink.java:124)
> at org.apache.flume.sink.DefaultSinkProcessor.start(DefaultSinkProcessor.java:46)
> at org.apache.flume.SinkRunner.start(SinkRunner.java:79)
> at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.sql.SQLException: No suitable driver found for jdbc:phoenix:localhost;
> at java.sql.DriverManager.getConnection(DriverManager.java:596)
> at ... (more)



--
This message was sent by Atlassian JIRA
(v6.4.1#64016)


More information about the Backlogmanager mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy