I would need more information because it's already possible to add some tags directly from chukwa-agent.xml or dynamically.
So let me know if you need something else.
<description>The cluster's name for this agent</description>
At the beginning the property name was chukwaAgent.cluster but I changed it to be able to define some additional tags, cluster is just one tag that is there by default.
So if you want to define a role for example you could do:
<description>The cluster's name for this agent and his role</description>
Also, there's a public API that you can use to set additional tags and the FileAdaptor is using it to add a timestamp. This is done by this line: chunk.addTag("time=\"" + fileTime + "\"");
- org.apache.hadoop.chukwa.Chunk#getTag(String) has not been implemented because we coudln't agree on a standard format for a tag.
So I would rather like to move that method to an helper class unless everybody agree on this format: tagname="val". Personally I'm ok with this format since I'm the one that put it in
That's being said, I'm currently working on something else that may impact the Chunk class. So here more information on what I'm doing.
I'm working on a streaming implementation for Chukwa and I need to manage the chunk routing dynamically using some rules.
The rules are simple string comparison against some specific fields like host, category, cluster and something similar to the role.
So I could either use the current Map or tags. The Map is not necessary the best option since I will add some fields that are more like dimensions/metadata (cluster,host,rack, role,etc) and are not part of the data. Tags will be the right place to do that but there's an overhead in using only text.
So my preference will be to add another Map for storing dimensions or metadata related to the list of records. This will simplify all the coding, speedup the code because we will no longer use regex to match some tags but will add some additional bytes.
And in between, we could decide to use the tag field but with a json string.