title: java.lang.OutOfMemoryError: Java heap space with hive
body: <p>I used hadoop hive 0.9.0 and 1.1.2 and netbeans,
  but I got this error and I can not solve this problem
  please help me
  code :</p>
  
  <pre><code>public class Hive_test {
  
  private static String driverName = "org.apache.hadoop.hive.jdbc.HiveDriver";
  
     @SuppressWarnings("CallToThreadDumpStack")
  public static void main(String[] args) throws SQLException {
      try {
          Class.forName(driverName);
      } catch (ClassNotFoundException e){
          e.printStackTrace();
          System.exit(1);
      }
              System.out.println("commencer la connexion");
      Connection con = DriverManager.getConnection("jdbc:hive://localhost:10000/default",""," ");
      Statement stmt = con.createStatement();
      ResultSet res = stmt.executeQuery("select * from STATE");
      while (res.next()){
          System.out.println(String.valueOf(res.getInt(1)) + "\t" + res.getString(2));
                      System.out.println("sql terminer");
      }
  }
  </code></pre>
  
  <p>Error below;</p>
  
  <pre><code>error :
  commencer la connexion
  Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
      at org.apache.thrift.protocol.TBinaryProtocol.readStringBody(TBinaryProtocol.java:353)
      at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:215)
      at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
      at org.apache.hadoop.hive.service.ThriftHive$Client.recv_execute(ThriftHive.java:116)
      at org.apache.hadoop.hive.service.ThriftHive$Client.execute(ThriftHive.java:103)
      at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:192)
      at org.apache.hadoop.hive.jdbc.HiveStatement.execute(HiveStatement.java:132)
      at org.apache.hadoop.hive.jdbc.HiveConnection.configureConnection(HiveConnection.java:132)
      at org.apache.hadoop.hive.jdbc.HiveConnection.&lt;init&gt;(HiveConnection.java:122)
      at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:106)
      at java.sql.DriverManager.getConnection(DriverManager.java:571)
      at java.sql.DriverManager.getConnection(DriverManager.java:215)
      at hive.Hive_test.main(Hive_test.java:22)
  </code></pre>