Review Board 1.7.22


HIVE-2503: create per-session HiveConf instance

Review Request #2820 - Created Nov. 14, 2011 and updated

Navis Ryu
trunk
HIVE-2503
Reviewers
hive
carl
hive-git
We uses multiple HiveClient connected to single HiveServer. After configuring connections, we've found the environment variables are different from expected. 
Current hive server uses single instance of HiveConf and this seemed to make the problem.
If we use 'standAloneServer' in TestHiveServer.class, it is very simple to make the test case. But it seemed to be 'false' which makes it more complex.

Diff revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

1 2 3
1 2 3

  1. service/src/java/org/apache/hadoop/hive/service/HiveServer.java: Loading...
  2. service/src/test/org/apache/hadoop/hive/service/TestHiveServerSessions.java: Loading...
service/src/java/org/apache/hadoop/hive/service/HiveServer.java
Revision 854cc99 New Change
[20] 544 lines
[+20] [+] public static class ThriftHiveProcessorFactory extends TProcessorFactory {
545
    }
545
    }
546

    
   
546

   
547
    @Override
547
    @Override
548
    public TProcessor getProcessor(TTransport trans) {
548
    public TProcessor getProcessor(TTransport trans) {
549
      try {
549
      try {
550
        Iface handler = new HiveServerHandler(conf);
550
        Iface handler = new HiveServerHandler(new HiveConf(conf));
551
        return new ThriftHive.Processor(handler);
551
        return new ThriftHive.Processor(handler);
552
      } catch (Exception e) {
552
      } catch (Exception e) {
553
        throw new RuntimeException(e);
553
        throw new RuntimeException(e);
554
      }
554
      }
555
    }
555
    }
[+20] [20] 136 lines
service/src/test/org/apache/hadoop/hive/service/TestHiveServerSessions.java
New File
 
  1. service/src/java/org/apache/hadoop/hive/service/HiveServer.java: Loading...
  2. service/src/test/org/apache/hadoop/hive/service/TestHiveServerSessions.java: Loading...