title: Getting an file exists error while import into Hive using sqoop
body: <p>I am trying to copy the retail_db database tables into hive database which I already created. When I execute the following code</p>
  
  <pre><code>sqoop import-all-tables \
  --num-mappers 1 \
  --connect "jdbc:mysql://quickstart.cloudera:3306/retail_db" \
  --username=retail_dba \
  --password=cloudera \
  --hive-import \
  --hive-overwrite \
  --create-hive-table \
  --outdir java_files \
  --hive-database retail_stage
  </code></pre>
  
  <p>My Map-reduce job stops with the following error:</p>
  
  <blockquote>
    <p>ERROR tool.ImportAllTablesTool: Encountered IOException running import
    job: org.apache.hadoop.mapred.FileAlreadyExistsException: Output
    directory hdfs://quickstart.cloudera:8020/user/cloudera/categories
    already exists</p>
  </blockquote>
  
  <p>I am trying to copy the tables to hive database,Then why an existing file in cloudera caused the problem. Is there a way to ignore this error or overwrite the existing file.</p>