[Gluster-devel] Proposal for 3.5: Make adding custom translators easy
Joe Julian
joe at julianfamily.org
Mon Aug 12 19:55:42 UTC 2013
On 08/12/2013 12:52 PM, Joe Julian wrote:
> On 08/12/2013 12:17 PM, Justin Clift wrote:
>> On 12/08/2013, at 7:44 PM, Jay Vyas wrote:
>>> i like the install file idea. packaging always seems easier and
>>> memorizing CLI magic seems like another feature which would lend
>>> itself more to forcing devs to read documentation to get it working
>>> correctly. The deployment via packaging is always easier to modify
>>> and learn on the fly
>> Yeah, it's appealing more to me as well, the more I think
>> about it. :)
>>
>> Not sure what the structure of the accompanying meta-data
>> file (likely XML) would need to be.
>>
>> Something like this might work, and also let the translator
>> be applied to several volumes (if needed), with options
>> set per volume:
>>
>> Might also need a <filename> tag in there, but I'm more
>> inclined to not have it, just using a convention of:
>>
>> * [filename].so/.py, matches [filename].xml
>>
>> How's that sounding?
>>
> I agree with name matching.
>
> I picture the definition looking more like:
Or as json:
{
"translator": {
"name": "features/marker",
"type": "server",
"graph": { "before": "debug/io-stats" },
"subvolume": { "count": 1 },
"cli": {
"target": "volume",
"options": {
"option": [
{
"name": "quota",
"type": "boolean",
"default": false
},
{
"name": "xtime",
"type": "boolean",
"default": false
},
{
"name": "timestamp-file",
"type": "string",
"default": "/var/lib/glusterd/vols/${vol}/marker.tstamp"
}
]
}
}
}
}
More information about the Gluster-devel
mailing list