Connecting to Phoenix via HS2 POC

1. setup HBase/Phoenix
2. load Phoenix STOCK_SYMBOL example, prove it works

    hw11397:phoenix-4.2.1-bin ndimiduk$ ./bin/sqlline.py localhost ./examples/STOCK_SYMBOL.sql
    ...
    hw11397:phoenix-4.2.1-bin ndimiduk$ ./bin/sqlline.py localhost                                                                                                                                                                      [0/1868]
    Setting property: [isolation, TRANSACTION_READ_COMMITTED]
    issuing: !connect jdbc:phoenix:localhost none none org.apache.phoenix.jdbc.PhoenixDriver
    Connecting to jdbc:phoenix:localhost
    14/12/05 12:46:34 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
    14/12/05 12:46:40 WARN impl.MetricsConfig: Cannot locate configuration: tried hadoop-metrics2-phoenix.properties,hadoop-metrics2.properties
    Connected to: Phoenix (version 4.2)
    Driver: PhoenixEmbeddedDriver (version 4.2)
    Autocommit status: true
    Transaction isolation: TRANSACTION_READ_COMMITTED
    Building list of tables and columns for tab-completion (set fastconnect to true to skip)...
    70/70 (100%) Done
    Done
    sqlline version 1.1.2
    0: jdbc:phoenix:localhost> select count(*) from STOCK_SYMBOL;
    +------------------------------------------+
    |                 COUNT(1)                 |
    +------------------------------------------+
    | 1                                        |
    +------------------------------------------+
    1 row selected (0.053 seconds)

3. build hive, launch HS2 from patch

    hw11397:hive ndimiduk$ mvn clean package -DskipTests -Phadoop-2,dist
    hw11397:hive ndimiduk$ cd packaging/target/apache-hive-0.15.0-SNAPSHOT-bin/apache-hive-0.15.0-SNAPSHOT-bin/
    hw11397:apache-hive-0.15.0-SNAPSHOT-bin ndimiduk$ ./bin/hive --service hiveserver2

4. connect from beeline

    hw11397:apache-hive-0.15.0-SNAPSHOT-bin ndimiduk$ HADOOP_USER_CLASSPATH_FIRST=true ./bin/beeline --hiveconf phoenix.quorum=localhost
    beeline> !verbose
    verbose: on
    beeline> !connect jdbc:hive2://localhost:10000/ ndimiduk pass org.apache.hive.jdbc.HiveDriver
    Connecting to jdbc:hive2://localhost:10000/
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/Users/ndimiduk/repos/hive/packaging/target/apache-hive-0.15.0-SNAPSHOT-bin/apache-hive-0.15.0-SNAPSHOT-bin/lib/hive-jdbc-0.15.0-SNAPSHOT-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/usr/local/Cellar/hadoop/2.5.2/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.5.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.slf4j.impl.Log4jLoggerFactory]
    Connected to: Apache Hive (version 0.15.0-SNAPSHOT)
    Driver: Hive JDBC (version 0.15.0-SNAPSHOT)
    Transaction isolation: TRANSACTION_REPEATABLE_READ
    0: jdbc:hive2://localhost:10000/> select count(*) from STOCK_SYMBOL;
    Getting log thread is interrupted, since query is done!
    +-----------+--+
    | COUNT(1)  |
    +-----------+--+
    | 1         |
    +-----------+--+
    1 row selected (0.074 seconds)
    0: jdbc:hive2://localhost:10000/> select * from STOCK_SYMBOL;
    Getting log thread is interrupted, since query is done!
    +---------+-----------------+--+
    | SYMBOL  |     COMPANY     |
    +---------+-----------------+--+
    | CRM     | SalesForce.com  |
    +---------+-----------------+--+
    1 row selected (0.013 seconds)