You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@chukwa.apache.org by Farrokh Shahriari <mo...@gmail.com> on 2013/02/04 10:24:13 UTC

writing custom agent in Chukwa

Hi
I've read in the Chukwa's site :
http://incubator.apache.org/chukwa/docs/r0.5.0/agent.html , that we can
develop our agent's code by defining new adaptors. As there is no example
for writing custom agent, I'd be glad if someone can help me.
My agent is so simpe,it should read a file or folder and send a line of
that to collector for inserting to HBase without doing any operation like
parsing.

Tnx

Re: writing custom agent in Chukwa

Posted by Farrokh Shahriari <mo...@gmail.com>.
Tnx for your help, let me check that.

On Mon, Feb 4, 2013 at 7:41 PM, Ariel Rabkin <as...@gmail.com> wrote:

> Hrm.
>
> In our terminology, what you'd be doing is "writing an adaptor", or
> "modifying the agent" -- you shouldn't need to change any significant
> part of the existing agent code.
>
> There are already adaptors for pulling data out of files, without
> parsing. They come in several flavors, depending on how you want the
> adaptor to behave if the file is modified and whether you want line
> buffering. Have a look at the FileTailingAdaptor and subclasses for
> examples and a place to start. See
>
> https://svn.apache.org/repos/asf/incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
>
> --Ari
>
> On Mon, Feb 4, 2013 at 4:24 AM, Farrokh Shahriari
> <mo...@gmail.com> wrote:
> > Hi
> > I've read in the Chukwa's site :
> > http://incubator.apache.org/chukwa/docs/r0.5.0/agent.html , that we can
> > develop our agent's code by defining new adaptors. As there is no example
> > for writing custom agent, I'd be glad if someone can help me.
> > My agent is so simpe,it should read a file or folder and send a line of
> that
> > to collector for inserting to HBase without doing any operation like
> > parsing.
> >
> > Tnx
>
>
>
> --
> Ari Rabkin asrabkin@gmail.com
> Princeton Computer Science Department
>

Re: writing custom agent in Chukwa

Posted by Ariel Rabkin <as...@gmail.com>.
Hrm.

In our terminology, what you'd be doing is "writing an adaptor", or
"modifying the agent" -- you shouldn't need to change any significant
part of the existing agent code.

There are already adaptors for pulling data out of files, without
parsing. They come in several flavors, depending on how you want the
adaptor to behave if the file is modified and whether you want line
buffering. Have a look at the FileTailingAdaptor and subclasses for
examples and a place to start. See
https://svn.apache.org/repos/asf/incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java

--Ari

On Mon, Feb 4, 2013 at 4:24 AM, Farrokh Shahriari
<mo...@gmail.com> wrote:
> Hi
> I've read in the Chukwa's site :
> http://incubator.apache.org/chukwa/docs/r0.5.0/agent.html , that we can
> develop our agent's code by defining new adaptors. As there is no example
> for writing custom agent, I'd be glad if someone can help me.
> My agent is so simpe,it should read a file or folder and send a line of that
> to collector for inserting to HBase without doing any operation like
> parsing.
>
> Tnx



-- 
Ari Rabkin asrabkin@gmail.com
Princeton Computer Science Department