public static void main(String[] args)
      throws StatementExecutionException, IoTDBConnectionException, InterruptedException {
    // Choose the SessionPool you going to use
    constructRedirectSessionPool();

    service = Executors.newFixedThreadPool(10);
    insertRecord();
    queryByRowRecord();
    Thread.sleep(1000);
    queryByIterator();
    sessionPool.close();
    service.shutdown();
  }
Build a redirect-able SessionPool for this example
example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java