title: Spark SQL: IllegalArgumentException: Wrong FS, expected: file:///
body: <p>I try to put data in Hive table via Spark SQL terminal.</p>
  
  <p>I created table based on Avro Schema .avsc :</p>
  
  <pre><code>CREATE TABLE test_table
    ROW FORMAT SERDE
    'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
    STORED AS INPUTFORMAT
    'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
    OUTPUTFORMAT
    'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
    TBLPROPERTIES (
      'avro.schema.url'='file:///C:/some_dir/table_schema.avsc');
  </code></pre>
  
  <p>Then I try to load data from Avro file which stored in HDFS:</p>
  
  <pre><code>LOAD DATA INPATH 'hdfs://localhost:9000/data/test_table.avro' OVERWRITE INTO TABLE test_table;
  </code></pre>
  
  <p>I get an error:</p>
  
  <pre><code>Error in query: java.lang.IllegalArgumentException: Wrong FS: hdfs://localhost:9000/data/test_table.avro, expected: file:///;
  </code></pre>
  
  <p>When I try to load from local file system it works.</p>
  
  <p>Also my <strong>core-site.xml</strong>:</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;property&gt;
          &lt;name&gt;fs.defaultFS&lt;/name&gt;
          &lt;value&gt;hdfs://localhost:9000&lt;/value&gt;
          &lt;final&gt;true&lt;/final&gt;
          &lt;description&gt;NameNode URI&lt;/description&gt;
      &lt;/property&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>How to load data from files which stored in HDFS?</p>