title: Difference between hive thrift server from hive and spark distributions
body: <p>What's the difference between running hive server using either of the following two commands :-</p>
  
  <ol>
  <li><code>hive --service hiveserver2</code></li>
  <li>Running hive thrift server from <code>spark/sbin$ ./start-thriftserver.sh</code></li>
  </ol>
  
  <p>Do they listen on separate ports? </p>
  
  <p>Which one should I use to establish a JDBC connection using Apache Hive JDBC driver in my Java class?</p>