Github user sudheeshkatkam commented on a diff in the pull request:

    https://github.com/apache/drill/pull/578#discussion_r85848714
  
    --- Diff: 
common/src/main/java/org/apache/drill/common/config/ConnectionParameters.java 
---
    @@ -0,0 +1,153 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.drill.common.config;
    +
    +import com.google.common.collect.ImmutableSet;
    +import org.apache.drill.exec.proto.UserProtos.Property;
    +import org.apache.drill.exec.proto.UserProtos.UserProperties;
    +
    +import java.util.Properties;
    +
    +public final class ConnectionParameters {
    +  private static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(ConnectionParameters.class);
    +
    +  // PROPERTY KEYS
    +  // definitions should be in lowercase
    +
    +  public static final String ZOOKEEPER_CONNECTION = "zk";
    +
    +  public static final String DRILLBIT_CONNECTION = "drillbit";
    +
    +  public static final String SCHEMA = "schema";
    +
    +  public static final String USER = "user";
    +
    +  public static final String PASSWORD = "password";
    +
    +  public static final String IMPERSONATION_TARGET = "impersonation_target";
    +
    +  public static final String AUTH_MECHANISM = "auth";
    +
    +  public static final String SERVICE_PRINCIPAL = "principal";
    +
    +  public static final String SERVICE_NAME = "service_name";
    +
    +  public static final String SERVICE_HOST = "service_host";
    +
    +  public static final String REALM = "realm";
    +
    +  public static final String KEYTAB = "keytab";
    +
    +  // CONVENIENCE SETS OF PROPERTIES
    +
    +  public static final ImmutableSet<String> ALLOWED_BY_CLIENT =
    +      ImmutableSet.of(ZOOKEEPER_CONNECTION, DRILLBIT_CONNECTION, SCHEMA, 
USER, PASSWORD, IMPERSONATION_TARGET,
    +          AUTH_MECHANISM, SERVICE_PRINCIPAL, SERVICE_NAME, SERVICE_HOST, 
REALM, KEYTAB);
    +
    +  public static final ImmutableSet<String> ACCEPTED_BY_SERVER = 
ImmutableSet.of(SCHEMA, IMPERSONATION_TARGET);
    +
    +  private final Properties properties; // keys must be lower case
    +
    +  private ConnectionParameters(Properties properties) {
    +    this.properties = properties;
    --- End diff --
    
    Constructor is already private. Static factory methods below.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to