nathanmarz/dfs-datastores — pull request #17 by derrickburns (2013-02-27 00:34:38+00:00)
Title: Added support for parameterized PailStructures

1. Made PailTap#_pailRoot protected instead of private.
2. Added PailTap#getPaths() method to provide paths to all subPail roots.
3. Added Jackson 2.0 annotations to PailStructure to support Jackson serialization.
4. Retry rename() in AbstractPail#close() because failure is costly!
5. Serialize PailStructure into pail.meta files using Jackson 2.0. This allows PailStructures to be parameterized. This is done in a backward compatible way. Old meta files with PailStructures that take no arguments still work. However, new pail.meta files will be created by emitting not just the PailStructure class name, but a Jackson 2.0 serialization of the PailStructure. This is typically very compact, for example:

```
---
format: SequenceFile
structure: '{"@class":"com.rincaro.mapreduce.store.timeseriesstore.TemplateTimeSeriesPailStructure","template":"${type}"}'
args: {}
```

This declares a PailStructure that takes a single argument, "template", with value "${type}".

Here is the corresponding constructor with Jackson 2.0 annotations:
```
@JsonCreator
public TemplateTimeSeriesPailStructure( @JsonProperty("template") String template ) {
mTemplate = template;
}

public String getTemplate() {
return mTemplate;
}
```
6. Added pom.xml. If you don't want it, just ignore it. :)