Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Hisoka-X committed Sep 30, 2024
1 parent da87893 commit 4cce1a7
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ private String hadoopCosUrl() {
protected final ContainerExtendedFactory extendedFactory =
container -> {
container.execInContainer("sh", "-c", "chmod -R 777 /etc/hosts");
// To avoid get a canonical host from a docker DNS server
container.execInContainer("sh", "-c", "echo `getent hosts hivee2e` >> /etc/hosts");
// // To avoid get a canonical host from a docker DNS server
// container.execInContainer("sh", "-c", "echo `getent hosts hivee2e`
// >> /etc/hosts");
// The jar of hive-exec
Container.ExecResult downloadHiveExeCommands =
container.execInContainer(
Expand Down Expand Up @@ -191,8 +192,13 @@ public void tearDown() throws Exception {

private void initializeConnection()
throws ClassNotFoundException, InstantiationException, IllegalAccessException,
SQLException {
this.hiveConnection = this.hiveServerContainer.getConnection();
SQLException, IOException, InterruptedException {
try {
this.hiveConnection = this.hiveServerContainer.getConnection();
} catch (Exception e) {
log.info(hiveServerContainer.execInContainer("cat", "/tmp/hive/hive.log").getStdout());
throw e;
}
}

private void prepareTable() throws Exception {
Expand All @@ -204,7 +210,6 @@ private void prepareTable() throws Exception {
statement.execute(CREATE_SQL);
} catch (Exception exception) {
log.error(ExceptionUtils.getMessage(exception));
log.info(hiveServerContainer.execInContainer("cat", "/tmp/hive/hive.log").getStdout());
throw exception;
}
}
Expand Down

0 comments on commit 4cce1a7

Please sign in to comment.