title: Pig: Load using AvroStorage throws "Cannot get schema from loadFunc" exception
body: <p>In hadoop, we got list of avro files stored under '/datasets/xyz/storm/information/'.</p>
  
  <pre><code> -rw-r-----   3 storm XYZ    5570959 2015-10-01 01:46 /datasets/xyz/storm/information/storm_1443681972122.avro
   -rw-r-----   3 storm XYZ    5571687 2015-10-01 01:46 /datasets/xyz/storm/information/storm_1443681973303.avro
   -rw-r-----   3 storm XYZ    5632194 2015-10-01 01:46 /datasets/xyz/storm/information/storm_1443681975019.avro
  </code></pre>
  
  <p>What works?:</p>
  
  <pre><code>a= LOAD '/datasets/xyz/storm/information/storm_1443681975019.avro' USING AvroStorage ();  
  </code></pre>
  
  <p>Avro Schema is defined in each avro file as the first record in below format:</p>
  
  <pre><code> {header: (metadata_uuid: chararray,publishDate: chararray,eventDate: chararray),raw_data: chararray}
  </code></pre>
  
  <p>I would like to load all the avro file data at once into alias 'a'. So, I tried the below code:</p>
  
  <pre><code>a= = LOAD '/datasets/xyz/storm/information/' using AvroStorage();
  </code></pre>
  
  <p>I am getting exception as below:</p>
  
  <pre><code>ERROR 2245: Cannot get schema from loadFunc org.apache.pig.builtin.AvroStorage
  </code></pre>
  
  <p>I also tried providing schema explicitly as below:</p>
  
  <pre><code> a= LOAD '/datasets/xyz/storm/information/' USING AvroStorage ('schema','{"header": ("metadata_uuid": "chararray","publishDate": "chararray","eventDate": "chararray"),"raw_data": "chararray"}');
  </code></pre>
  
  <p>Could you please tell me the right way to do it?</p>
  
  <p>Thanks!</p>