title: Can't create a Hive Table from an avro file
body: <p>I can create a table atop an avro file using the following syntax without any errors. It is an empty table at firs.  </p>
  
  <pre><code>CREATE EXTERNAL TABLE  tableName 
  PARTITIONED BY (ingestiondatetime BIGINT, recordtype STRING)
  ROW FORMAT SERDE
  'org.apache.hadoop.hive.serd2.avro.AvroSerDe'
  STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
  OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
  TABLEPROPERTIES ('avro.schema.url'='hdfs:///user/file.avsc');
  </code></pre>
  
  <p>When I add the LOCATION line to point to the actual avro file loctaion, I get a permission error</p>
  
  <pre><code>CREATE EXTERNAL TABLE  tableName 
  PARTITIONED BY (ingestiondatetime BIGINT, recordtype STRING)
  ROW FORMAT SERDE
  'org.apache.hadoop.hive.serd2.avro.AvroSerDe'
  STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
  OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
  LOCATION '/local/avro_dir/'
  TABLEPROPERTIES ('avro.schema.url'='hdfs:///user/file.avsc');
  </code></pre>
  
  <p>The error is</p>
  
  <pre><code>&gt; FAILED:  Error in metadata.....  
  &gt; org.apache.hadoop.security.AccessControlException: Permission denied: 
  &gt; user=hive, access=WRITE, inode="/" hdfs:supergroup:drwxr-xr-x
  </code></pre>
  
  <p>I am running hive as me.  My permissions on hdfs:/  are wide open (777).   Where is hive trying to write to that it thinks it does not have permission?</p>