> On Sept. 13, 2016, 2:52 a.m., Vihang Karajgaonkar wrote: > > jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java, line 211 > > <https://reviews.apache.org/r/51695/diff/3/?file=1497541#file1497541line211> > > > > Will it work when we redirect the beeline output to a file? > > Jianguo Tian wrote: > I have write one Test class which will execute building JDBC connection > and initial SQL procedure, then I used "java -Djava.ext.dirs=/* Test > *.txt" > to redirect its output. All the content we can see in ".txt" file is initial > SQL result, namely output of System.out.pint. It means that we can redirect > output to a file.
And I used another way to verify my conclusion: I packaged my project into a jar with maven tool, then I write a test class which play the part of JDBC client(refer to https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients, sample code of JDBC section). After runnig this test class, the output if initial SQL can be seen on the console. - Jianguo ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51695/#review148639 ----------------------------------------------------------- On Sept. 21, 2016, 3:47 a.m., Jianguo Tian wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51695/ > ----------------------------------------------------------- > > (Updated Sept. 21, 2016, 3:47 a.m.) > > > Review request for hive and cheng xu. > > > Bugs: HIVE-5867 > https://issues.apache.org/jira/browse/HIVE-5867 > > > Repository: hive-git > > > Description > ------- > > HIVE-5867: JDBC driver and beeline should support executing an initial SQL > script > > > Diffs > ----- > > jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java > ad96a6466dd1aadab71fc261f55be4639dcbe2bf > jdbc/src/java/org/apache/hive/jdbc/Utils.java > 3161566994d6c6e01de9d88a6e87295684619ffa > jdbc/src/test/org/apache/hive/jdbc/TestInitSQL.java PRE-CREATION > > Diff: https://reviews.apache.org/r/51695/diff/ > > > Testing > ------- > > TestInitSQL.java is JUnit test class which will test method initSql() in > HiveConnection.java. > > > Thanks, > > Jianguo Tian > >