On 03/18/2011 09:54 AM, Harsh J wrote:
> Would it help if the provided JSON schemae were added to the JobConf
> with the given path(s) as a prefix to the key used to retrieve them?
> This would help use with MultipleInputs and such (but it may get
> complicated to do if globs were involved?).

Not sure what you mean by "provided".  The user must specify a reader
schema for the job, and map tasks will be passed instances of this
schema.  That reader schema is available as AvroJob.getInputSchema(job).

If you wanted to know the writer's schema of each file read, then I
suppose we could have AvroRecordReader set that to a job property, or
simply expose this by adding a method like:

Schema AvroRecordReader.getSchema() { return reader.getSchema(); }

Is that what you're after?  Why would you need this?

Doug

Reply via email to