You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by Tony Burton <TB...@SportingIndex.com> on 2013/03/22 16:17:06 UTC
Group names for custom Counters
Hi list,
I'm using Hadoop 1.0.3 and creating some custom Counters in my Mapper. I've got an enum that defines the list of counters, and I'm incrementing in the map function using context.getCounter(<counter name>).increment(1).
I see that there's another implementation of context.getCounter() that takes arguments String groupName and String counterName. I think I'd find it useful to be able to group my Counters - can anyone give me an example of how to collect my Counters in groups?
Thanks,
Tony
**********************************************************************
Please consider the environment before printing this email or attachments
This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued
and approved by Sporting Index Ltd.
Outbound email has been scanned for viruses and SPAM
RE: Group names for custom Counters
Posted by Tony Burton <TB...@SportingIndex.com>.
Thanks Michel! Looks like that’ll do the trick.
It wasn’t clear originally from the docs that context.getCounter(groupName, counterName) will create the group and counter if they don’t exist.
From: Michel Segel [mailto:michael_segel@hotmail.com]
Sent: 22 March 2013 18:27
To: user@hadoop.apache.org
Subject: Re: Group names for custom Counters
Just a suggestion, look at dynamic counters...
For the group, just create a group name and you are done.
Sent from a remote device. Please excuse any typos...
Mike Segel
On Mar 22, 2013, at 11:17 AM, Tony Burton <TB...@SportingIndex.com>> wrote:
Hi list,
I'm using Hadoop 1.0.3 and creating some custom Counters in my Mapper. I've got an enum that defines the list of counters, and I'm incrementing in the map function using context.getCounter(<counter name>).increment(1).
I see that there's another implementation of context.getCounter() that takes arguments String groupName and String counterName. I think I'd find it useful to be able to group my Counters - can anyone give me an example of how to collect my Counters in groups?
Thanks,
Tony
*****************************************************************************
P Please consider the environment before printing this email or attachments
This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued and approved by Sporting Index Ltd.
Outbound email has been scanned for viruses and SPAM
*****************************************************************************
P Pleaseconsider the environment before printing this email
Inbound email has been scanned for viruses & spam
**********************************************************************
Please consider the environment before printing this email or attachments
This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued
and approved by Sporting Index Ltd.
Outbound email has been scanned for viruses and SPAM
RE: Group names for custom Counters
Posted by Tony Burton <TB...@SportingIndex.com>.
Thanks Michel! Looks like that’ll do the trick.
It wasn’t clear originally from the docs that context.getCounter(groupName, counterName) will create the group and counter if they don’t exist.
From: Michel Segel [mailto:michael_segel@hotmail.com]
Sent: 22 March 2013 18:27
To: user@hadoop.apache.org
Subject: Re: Group names for custom Counters
Just a suggestion, look at dynamic counters...
For the group, just create a group name and you are done.
Sent from a remote device. Please excuse any typos...
Mike Segel
On Mar 22, 2013, at 11:17 AM, Tony Burton <TB...@SportingIndex.com>> wrote:
Hi list,
I'm using Hadoop 1.0.3 and creating some custom Counters in my Mapper. I've got an enum that defines the list of counters, and I'm incrementing in the map function using context.getCounter(<counter name>).increment(1).
I see that there's another implementation of context.getCounter() that takes arguments String groupName and String counterName. I think I'd find it useful to be able to group my Counters - can anyone give me an example of how to collect my Counters in groups?
Thanks,
Tony
*****************************************************************************
P Please consider the environment before printing this email or attachments
This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued and approved by Sporting Index Ltd.
Outbound email has been scanned for viruses and SPAM
*****************************************************************************
P Pleaseconsider the environment before printing this email
Inbound email has been scanned for viruses & spam
**********************************************************************
Please consider the environment before printing this email or attachments
This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued
and approved by Sporting Index Ltd.
Outbound email has been scanned for viruses and SPAM
RE: Group names for custom Counters
Posted by Tony Burton <TB...@SportingIndex.com>.
Thanks Michel! Looks like that’ll do the trick.
It wasn’t clear originally from the docs that context.getCounter(groupName, counterName) will create the group and counter if they don’t exist.
From: Michel Segel [mailto:michael_segel@hotmail.com]
Sent: 22 March 2013 18:27
To: user@hadoop.apache.org
Subject: Re: Group names for custom Counters
Just a suggestion, look at dynamic counters...
For the group, just create a group name and you are done.
Sent from a remote device. Please excuse any typos...
Mike Segel
On Mar 22, 2013, at 11:17 AM, Tony Burton <TB...@SportingIndex.com>> wrote:
Hi list,
I'm using Hadoop 1.0.3 and creating some custom Counters in my Mapper. I've got an enum that defines the list of counters, and I'm incrementing in the map function using context.getCounter(<counter name>).increment(1).
I see that there's another implementation of context.getCounter() that takes arguments String groupName and String counterName. I think I'd find it useful to be able to group my Counters - can anyone give me an example of how to collect my Counters in groups?
Thanks,
Tony
*****************************************************************************
P Please consider the environment before printing this email or attachments
This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued and approved by Sporting Index Ltd.
Outbound email has been scanned for viruses and SPAM
*****************************************************************************
P Pleaseconsider the environment before printing this email
Inbound email has been scanned for viruses & spam
**********************************************************************
Please consider the environment before printing this email or attachments
This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued
and approved by Sporting Index Ltd.
Outbound email has been scanned for viruses and SPAM
RE: Group names for custom Counters
Posted by Tony Burton <TB...@SportingIndex.com>.
Thanks Michel! Looks like that’ll do the trick.
It wasn’t clear originally from the docs that context.getCounter(groupName, counterName) will create the group and counter if they don’t exist.
From: Michel Segel [mailto:michael_segel@hotmail.com]
Sent: 22 March 2013 18:27
To: user@hadoop.apache.org
Subject: Re: Group names for custom Counters
Just a suggestion, look at dynamic counters...
For the group, just create a group name and you are done.
Sent from a remote device. Please excuse any typos...
Mike Segel
On Mar 22, 2013, at 11:17 AM, Tony Burton <TB...@SportingIndex.com>> wrote:
Hi list,
I'm using Hadoop 1.0.3 and creating some custom Counters in my Mapper. I've got an enum that defines the list of counters, and I'm incrementing in the map function using context.getCounter(<counter name>).increment(1).
I see that there's another implementation of context.getCounter() that takes arguments String groupName and String counterName. I think I'd find it useful to be able to group my Counters - can anyone give me an example of how to collect my Counters in groups?
Thanks,
Tony
*****************************************************************************
P Please consider the environment before printing this email or attachments
This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued and approved by Sporting Index Ltd.
Outbound email has been scanned for viruses and SPAM
*****************************************************************************
P Pleaseconsider the environment before printing this email
Inbound email has been scanned for viruses & spam
**********************************************************************
Please consider the environment before printing this email or attachments
This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued
and approved by Sporting Index Ltd.
Outbound email has been scanned for viruses and SPAM
Re: Group names for custom Counters
Posted by Michel Segel <mi...@hotmail.com>.
Just a suggestion, look at dynamic counters...
For the group, just create a group name and you are done.
Sent from a remote device. Please excuse any typos...
Mike Segel
On Mar 22, 2013, at 11:17 AM, Tony Burton <TB...@SportingIndex.com> wrote:
> Hi list,
>
> I'm using Hadoop 1.0.3 and creating some custom Counters in my Mapper. I've got an enum that defines the list of counters, and I'm incrementing in the map function using context.getCounter(<counter name>).increment(1).
>
> I see that there's another implementation of context.getCounter() that takes arguments String groupName and String counterName. I think I'd find it useful to be able to group my Counters - can anyone give me an example of how to collect my Counters in groups?
>
> Thanks,
>
> Tony
>
>
>
> *****************************************************************************
> P Please consider the environment before printing this email or attachments
>
>
> This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued and approved by Sporting Index Ltd.
>
>
> Outbound email has been scanned for viruses and SPAM
Re: Group names for custom Counters
Posted by Michel Segel <mi...@hotmail.com>.
Just a suggestion, look at dynamic counters...
For the group, just create a group name and you are done.
Sent from a remote device. Please excuse any typos...
Mike Segel
On Mar 22, 2013, at 11:17 AM, Tony Burton <TB...@SportingIndex.com> wrote:
> Hi list,
>
> I'm using Hadoop 1.0.3 and creating some custom Counters in my Mapper. I've got an enum that defines the list of counters, and I'm incrementing in the map function using context.getCounter(<counter name>).increment(1).
>
> I see that there's another implementation of context.getCounter() that takes arguments String groupName and String counterName. I think I'd find it useful to be able to group my Counters - can anyone give me an example of how to collect my Counters in groups?
>
> Thanks,
>
> Tony
>
>
>
> *****************************************************************************
> P Please consider the environment before printing this email or attachments
>
>
> This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued and approved by Sporting Index Ltd.
>
>
> Outbound email has been scanned for viruses and SPAM
Re: Group names for custom Counters
Posted by Michel Segel <mi...@hotmail.com>.
Just a suggestion, look at dynamic counters...
For the group, just create a group name and you are done.
Sent from a remote device. Please excuse any typos...
Mike Segel
On Mar 22, 2013, at 11:17 AM, Tony Burton <TB...@SportingIndex.com> wrote:
> Hi list,
>
> I'm using Hadoop 1.0.3 and creating some custom Counters in my Mapper. I've got an enum that defines the list of counters, and I'm incrementing in the map function using context.getCounter(<counter name>).increment(1).
>
> I see that there's another implementation of context.getCounter() that takes arguments String groupName and String counterName. I think I'd find it useful to be able to group my Counters - can anyone give me an example of how to collect my Counters in groups?
>
> Thanks,
>
> Tony
>
>
>
> *****************************************************************************
> P Please consider the environment before printing this email or attachments
>
>
> This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued and approved by Sporting Index Ltd.
>
>
> Outbound email has been scanned for viruses and SPAM
Re: Group names for custom Counters
Posted by Michel Segel <mi...@hotmail.com>.
Just a suggestion, look at dynamic counters...
For the group, just create a group name and you are done.
Sent from a remote device. Please excuse any typos...
Mike Segel
On Mar 22, 2013, at 11:17 AM, Tony Burton <TB...@SportingIndex.com> wrote:
> Hi list,
>
> I'm using Hadoop 1.0.3 and creating some custom Counters in my Mapper. I've got an enum that defines the list of counters, and I'm incrementing in the map function using context.getCounter(<counter name>).increment(1).
>
> I see that there's another implementation of context.getCounter() that takes arguments String groupName and String counterName. I think I'd find it useful to be able to group my Counters - can anyone give me an example of how to collect my Counters in groups?
>
> Thanks,
>
> Tony
>
>
>
> *****************************************************************************
> P Please consider the environment before printing this email or attachments
>
>
> This email and any attachments are confidential, protected by copyright and may be legally privileged. If you are not the intended recipient, then the dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Neither Sporting Index nor the sender accepts responsibility for any virus, or any other defect which might affect any computer or IT system into which the email is received and/or opened. It is the responsibility of the recipient to scan the email and no responsibility is accepted for any loss or damage arising in any way from receipt or use of this email. Sporting Index Ltd is a company registered in England and Wales with company number 2636842, whose registered office is at Gateway House, Milverton Street, London, SE11 4AP. Sporting Index Ltd is authorised and regulated by the UK Financial Services Authority (reg. no. 150404) and Gambling Commission (reg. no. 000-027343-R-308898-001). Any financial promotion contained herein has been issued and approved by Sporting Index Ltd.
>
>
> Outbound email has been scanned for viruses and SPAM