title: Why there are many spark-warehouse folders got created?
body: <p>I have installed hadoop 2.8.1 on ubuntu and then installed spark-2.2.0-bin-hadoop2.7 on it. I used spark-shell and created the tables. Again I used beeline and created tables. I have observed that there are three different folders got created named spark-warehouse as :</p>
  
  <p>1- spark-2.2.0-bin-hadoop2.7/spark-warehouse</p>
  
  <p>2- spark-2.2.0-bin-hadoop2.7/bin/spark-warehouse</p>
  
  <p>3- spark-2.2.0-bin-hadoop2.7/sbin/spark-warehouse</p>
  
  <p>What is exactly spark-warehouse and why are these created many times?
  Sometimes my spark shell and beeline shows different databases and tables and sometimes it show same. I am not getting what is happening?</p>
  
  <p>Further, I did not installed hive but still I am able to use beeline and also I can access the databases though java program. How the hive came on my machine?
  Please help me. I am new to spark and installed it by online tutorials.</p>
  
  <p>Below is the java code I was using to connect apache spark though JDBC:</p>
  
  <pre><code> private static String driverName = "org.apache.hive.jdbc.HiveDriver";
  
  public static void main(String[] args) throws SQLException {
      try {
          Class.forName(driverName);
      } catch (ClassNotFoundException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
          System.exit(1);
      }
      Connection con = DriverManager.getConnection("jdbc:hive2://10.171.0.117:10000/default", "", "");
      Statement stmt = con.createStatement();
  </code></pre>