Hi.

You overrode the wrong abstract method in builder(). You should override

    public EventSource build(Context arg0, String... arg1) {

instead of

    public EventSource build(String... argv) {

The latter has been deprecated.

Please refer to the HelloWorldSource sample.

  public static SourceBuilder builder() {
    // construct a new parameterized source
    return new SourceBuilder() {
      @Override
      public EventSource build(Context ctx,String... argv) {
        Preconditions.checkArgument(argv.length == 0,
            "usage: helloWorldSource");

        return new HelloWorldSource();
      }
    };
  }


On 11/17/2011 06:21 AM, s ravi wrote:
Hi Mingjie,

Please find the attached code with this mail.I haven't added my
business logic here, i downloaded this from online.

And regarding Mikes concern about
  "tcp://<ipaddress>:61616:61616",
i am passing correct ip its typo in the mail. p am using
tcp://<ipaddress>:61616 only.



Thanks,
Saritha.

On Thu, Nov 17, 2011 at 3:13 AM, Mingjie Lai<mjla...@gmail.com>  wrote:
I think the error message is straightforward:

Attempted to write an
invalid sink/source: Invalid source: activeMQEventSource(
"tcp://<ipaddress>:61616:61616",
"VirtualTopic.consumer.asc.answerSent" )
java.lang.IllegalArgumentException: Attempted to write an invalid
sink/source: Invalid source: activeMQEventSource(
"tcp://<ipaddress>:61616:61616",

your activemq source threw java.lang.IllegalArgumentException.

However there is no way for us to help if you don't post your code here. In
addition, you may want to go to activemq community to ask activemq related
questions since they're the best resources you can refer to.

-mingjie

On 11/15/2011 01:55 PM, s ravi wrote:

Hi All,

I am trying to run below activemq source command on agent(it is in
cloud lab) node and getting error. i tried both internal and expernal
IP's...

Could anyone please help me when will this error comes. i can see my
source/sink in extn page

command:

config [agent,
activeMQEventSource("tcp://<ipaddress>:61616:61616","VirtualTopic.consumer.asc.answerSent"),
text("/var/log/flume/testactivemq.log")]

error:


2011-11-15 21:50:19,819 ERROR
com.cloudera.flume.master.CommandManager: Unexpected exception during
cmdid:0 config [agent,

activeMQEventSource("tcp://<ipaddress>:61616:61616","VirtualTopic.consumer.asc.answerSent"),
text("/var/log/flume/testactivemq.log")] : Attempted to write an
invalid sink/source: Invalid source: activeMQEventSource(
"tcp://<ipaddress>:61616:61616",
"VirtualTopic.consumer.asc.answerSent" )
java.lang.IllegalArgumentException: Attempted to write an invalid
sink/source: Invalid source: activeMQEventSource(
"tcp://<ipaddress>:61616:61616",
"VirtualTopic.consumer.asc.answerSent" )
         at
com.cloudera.flume.master.ConfigManager.setConfig(ConfigManager.java:96)
         at
com.cloudera.flume.master.flows.FlowConfigManager.setConfig(FlowConfigManager.java:285)
         at
com.cloudera.flume.master.TranslatingConfigurationManager.setConfig(TranslatingConfigurationManager.java:101)
         at
com.cloudera.flume.master.ConfigCommand$1.exec(ConfigCommand.java:87)
         at
com.cloudera.flume.master.CommandManager.exec(CommandManager.java:266)
         at
com.cloudera.flume.master.CommandManager.handleCommand(CommandManager.java:205)
         at
com.cloudera.flume.master.CommandManager$ExecThread.run(CommandManager.java:236)
Caused by: com.cloudera.flume.conf.FlumeIdException: Invalid source:
activeMQEventSource( "tcp://<ipaddress>:61616:61616",
"VirtualTopic.consumer.asc.answerSent" )
         at
com.cloudera.flume.conf.FlumeBuilder.buildEventSource(FlumeBuilder.java:477)
         at
com.cloudera.flume.conf.FlumeBuilder.buildSource(FlumeBuilder.java:275)
         at
com.cloudera.flume.master.ConfigManager.setConfig(ConfigManager.java:94)
         ... 6 more


                                           842,2-9       Bot
Thanks,
Ravi


Reply via email to