1

The brew installed hive appears to be a bit shy on maturity. First I had to manually edit the derby initailization script:

Unable to initialize hive with Derby from Brew install

Having done so .. when starting the cli it just hangs:

 $hive
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/Cellar/hive/2.1.0/libexec/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/Cellar/hadoop/2.7.3/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]

Logging initialized using configuration in jar:file:/usr/local/Cellar/hive/2.1.0/libexec/lib/hive-common-2.1.0.jar!/hive-log4j2.properties Async: true

So having now run into two serious issues .. and not yet having seen hive actually work .. is there a known workaround or better alternative for brew [re]install hive ?

Update: I found another Q&A that solved the second portion of my question.

Configuring Hive to run in Local Mode

https://stackoverflow.com/a/33312359/1056563

Community
  • 1
  • 1
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560

1 Answers1

1

You can try to increase the log level to see what is going on. The logging configuration seems to be inside a jar file but based on the source in git you can change the root logger level with system property hive.log.level. The default is INFO, so try running with -Dhive.log.level=DEBUG or even TRACE.

You can probably ignore the warning about multiple SLF4J bindings, but in case this worries you, the Log4j2 FAQ explains how to exclude the dependency on the old log4j slf4j binding.

<dependencies>
  <dependency>
    <groupId>com.example</groupId>
    <artifactId>example-project</artifactId>
    <version>1.0</version>
    <exclusions>
      <exclusion>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
      </exclusion>
      <exclusion>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
      </exclusion>
    </exclusions>
  </dependency>
  <dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-core</artifactId>
    <version>2.8.2</version>
  </dependency>
  <dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-slf4j-impl</artifactId>
    <version>2.8.2</version>
  </dependency>
  <dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-1.2-api</artifactId>
    <version>2.8.2</version>
  </dependency>
</dependencies>
Remko Popma
  • 35,130
  • 11
  • 92
  • 114