public Meta create()

in phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/PhoenixMetaFactoryImpl.java [51:73]


  public Meta create(List<String> args) {
    Configuration conf = getConf();
    if (conf == null) {
      throw new NullPointerException(String.valueOf("Configuration must not be null."));
    }
    Properties info = new Properties();
    info.putAll(conf.getValByRegex("avatica.*"));
    try {
      final String url;
      if (args.size() == 0) {
        url = getConnectionUrl(info, conf);
      } else if (args.size() == 1) {
        url = args.get(0);
      } else {
        throw new RuntimeException(
            "0 or 1 argument expected. Received " + Arrays.toString(args.toArray()));
      }
      // TODO: what about -D configs passed in from cli? How do they get pushed down?
      return new JdbcMeta(url, info);
    } catch (SQLException | ClassNotFoundException e) {
      throw new RuntimeException(e);
    }
  }