Hello All,
I'm writing my own java source using JDBC to test my own scenario/

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));
    //System.out.format("got connection : %s \n", "test");
  }
}

The result of the source above...
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 : 3162 ms

It takes over 3 seconds to create the new connection. Is it normal?
Can it be handled through connection pool in application server?

Any advice would be appreciated. Thanks in advance.

Reply via email to