Review Board 1.7.22


HIVE-4292 - adding support for -hiveconf arg

Review Request #10280 - Created April 4, 2013 and updated

Thejas Nair
Reviewers
hive
hive-git
HIVE-4292 - adding support for -hiveconf arg
Unit test added.
service/src/java/org/apache/hive/service/server/HiveServer2.java
Revision d28890b New Change
[20] 78 lines
[+20] [+] public static void main(String[] args) {
79
      LOG.warn(e.getMessage());
79
      LOG.warn(e.getMessage());
80
    }
80
    }
81

    
   
81

   
82
    HiveStringUtils.startupShutdownMessage(HiveServer2.class, args, LOG);
82
    HiveStringUtils.startupShutdownMessage(HiveServer2.class, args, LOG);
83
    try {
83
    try {

    
   
84
      ServerOptionsProcessor oproc = new ServerOptionsProcessor("hiveserver2");

    
   
85
      if (!oproc.process(args)) {

    
   
86
        LOG.fatal("Error starting HiveServer2 with given arguments");

    
   
87
        System.exit(-1);

    
   
88
      }
84
      HiveConf hiveConf = new HiveConf();
89
      HiveConf hiveConf = new HiveConf();
85
      HiveServer2 server = new HiveServer2();
90
      HiveServer2 server = new HiveServer2();
86
      server.init(hiveConf);
91
      server.init(hiveConf);
87
      server.start();
92
      server.start();
88
    } catch (Throwable t) {
93
    } catch (Throwable t) {
89
      LOG.fatal("Error starting HiveServer2", t);
94
      LOG.fatal("Error starting HiveServer2", t);
90
      System.exit(-1);
95
      System.exit(-1);
91
    }
96
    }
92
  }
97
  }
93

    
   
98

   
94
}
99
}
service/src/java/org/apache/hive/service/server/ServerOptionsProcessor.java
New File
 
service/src/test/org/apache/hive/service/server/TestServerOptionsProcessor.java
New File
 
  1. service/src/java/org/apache/hive/service/server/HiveServer2.java: Loading...
  2. service/src/java/org/apache/hive/service/server/ServerOptionsProcessor.java: Loading...
  3. service/src/test/org/apache/hive/service/server/TestServerOptionsProcessor.java: Loading...