You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@crunch.apache.org by Jeremy Lewi <je...@lewi.us> on 2014/01/07 15:42:22 UTC

Documentation about counters is hard to find

Hi Crunch Users,

It took me a while to find the function to call in a DoFn to get a counter.
I only succeeded because of Eclipe's intellisense.

I started with the docs. http://crunch.apache.org/apidocs/0.8.0/
The doc seems incomplete. Intellisense is showing me a bunch of methods
(getCounter, getContext, getStatus, etc...) that aren't listed in DoFn. The
doc only lists Object as a base class and Serialiazible as the interface so
I'm not sure where DoFn gets these methods.

I also looked at some of the Crunch Examples but none of them are using
counters.

Thanks.
J

Re: Documentation about counters is hard to find

Posted by Jeremy Lewi <je...@lewi.us>.
Thanks.

J


On Tue, Jan 7, 2014 at 6:58 AM, Micah Whitacre <mk...@gmail.com> wrote:

> Thanks for the feedback. It looks like the scope of the javadoc is limited
> to public in the Maven pom.  I logged
> https://issues.apache.org/jira/browse/CRUNCH-319 to expand the scope.
>
> Also regarding the method to use, the documentation on the deprecation
> actually suggests you use the DoFn.increment(...) methods instead.
>
>
> On Tue, Jan 7, 2014 at 8:48 AM, Jeremy Lewi <je...@lewi.us> wrote:
>
>> Looks like DoFn.getCounter is deprecated.  DoFn.getContext().getCounter()
>> seems like the next obvious candidate.
>>
>> J
>>
>>
>> On Tue, Jan 7, 2014 at 6:42 AM, Jeremy Lewi <je...@lewi.us> wrote:
>>
>>> Hi Crunch Users,
>>>
>>> It took me a while to find the function to call in a DoFn to get a
>>> counter. I only succeeded because of Eclipe's intellisense.
>>>
>>> I started with the docs. http://crunch.apache.org/apidocs/0.8.0/
>>> The doc seems incomplete. Intellisense is showing me a bunch of methods
>>> (getCounter, getContext, getStatus, etc...) that aren't listed in DoFn. The
>>> doc only lists Object as a base class and Serialiazible as the interface so
>>> I'm not sure where DoFn gets these methods.
>>>
>>> I also looked at some of the Crunch Examples but none of them are using
>>> counters.
>>>
>>> Thanks.
>>> J
>>>
>>
>>
>

Re: Documentation about counters is hard to find

Posted by Micah Whitacre <mk...@gmail.com>.
Thanks for the feedback. It looks like the scope of the javadoc is limited
to public in the Maven pom.  I logged
https://issues.apache.org/jira/browse/CRUNCH-319 to expand the scope.

Also regarding the method to use, the documentation on the deprecation
actually suggests you use the DoFn.increment(...) methods instead.


On Tue, Jan 7, 2014 at 8:48 AM, Jeremy Lewi <je...@lewi.us> wrote:

> Looks like DoFn.getCounter is deprecated.  DoFn.getContext().getCounter()
> seems like the next obvious candidate.
>
> J
>
>
> On Tue, Jan 7, 2014 at 6:42 AM, Jeremy Lewi <je...@lewi.us> wrote:
>
>> Hi Crunch Users,
>>
>> It took me a while to find the function to call in a DoFn to get a
>> counter. I only succeeded because of Eclipe's intellisense.
>>
>> I started with the docs. http://crunch.apache.org/apidocs/0.8.0/
>> The doc seems incomplete. Intellisense is showing me a bunch of methods
>> (getCounter, getContext, getStatus, etc...) that aren't listed in DoFn. The
>> doc only lists Object as a base class and Serialiazible as the interface so
>> I'm not sure where DoFn gets these methods.
>>
>> I also looked at some of the Crunch Examples but none of them are using
>> counters.
>>
>> Thanks.
>> J
>>
>
>

Re: Documentation about counters is hard to find

Posted by Jeremy Lewi <je...@lewi.us>.
Looks like DoFn.getCounter is deprecated.  DoFn.getContext().getCounter()
seems like the next obvious candidate.

J


On Tue, Jan 7, 2014 at 6:42 AM, Jeremy Lewi <je...@lewi.us> wrote:

> Hi Crunch Users,
>
> It took me a while to find the function to call in a DoFn to get a
> counter. I only succeeded because of Eclipe's intellisense.
>
> I started with the docs. http://crunch.apache.org/apidocs/0.8.0/
> The doc seems incomplete. Intellisense is showing me a bunch of methods
> (getCounter, getContext, getStatus, etc...) that aren't listed in DoFn. The
> doc only lists Object as a base class and Serialiazible as the interface so
> I'm not sure where DoFn gets these methods.
>
> I also looked at some of the Crunch Examples but none of them are using
> counters.
>
> Thanks.
> J
>