0
votes

I'm working on phoenix-4.7.0 on HBase-0.98 and trying to write java source to decide whether I can use phoenix as a SQL-SKIN or not.

I set phoenix-4.7.0-HBase-0.98-client.jar as $CLASSPATH and It works fine but It takes a few seconds to finish establishing the new connection.

phoenixTest.java

import java.sql.*;
import java.util.*;
public class phoenixTest {
  public static void main(String args[]) throws Exception {
    Connection conn;
    Properties prop = new Properties();
    Class.forName("org.apache.phoenix.jdbc.PhoenixDriver");
    long startTime = System.currentTimeMillis();
    conn =  DriverManager.getConnection("jdbc:phoenix:localhost:2181:/hbase");
    long estimatedTime = System.currentTimeMillis() - startTime;
    System.out.format("got connection : %s ms\n", Long.toString(estimatedTime));
  }
}

Result

log4j:WARN No appenders could be found for logger(org.apache.hadoop.conf.Configuration.deprecation).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
got connection : 3218 ms

Is this normal?

If it's not, Is there any way to make it faster?

1

1 Answers

0
votes

We see this as well when we benchmark against Phoenix. I think this is because their jdbc client is a heavy client. I believe they are working on a lighter weight client (https://phoenix.apache.org/server.html). If you need low latency access, maybe try Splice Machine.

https://github.com/splicemachine/spliceengine

It is open source as well.