yanxinyi commented on a change in pull request #950: URL: https://github.com/apache/phoenix/pull/950#discussion_r519063248
########## File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/BackwardCompatibilityTestUtil.java ########## @@ -0,0 +1,301 @@ +/* + * 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.phoenix.end2end; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.curator.shaded.com.google.common.collect.Lists; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.ConnectionFactory; +import org.apache.hadoop.hbase.regionserver.ScanInfoUtil; +import org.apache.hadoop.hbase.util.VersionInfo; +import org.apache.phoenix.coprocessor.MetaDataProtocol; +import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData; +import org.apache.phoenix.query.QueryConstants; +import org.apache.phoenix.query.QueryServices; +import org.apache.phoenix.util.PropertiesUtil; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URL; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.util.List; +import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assume.assumeFalse; + +public class BackwardCompatibilityTestUtil { + public static final String SQL_DIR = "sql_files/"; + public static final String RESULTS_AND_GOLD_FILES_DIR = "gold_files/"; + public static final String COMPATIBLE_CLIENTS_JSON = + "compatible_client_versions.json"; + public static final String BASH = "/bin/bash"; + public static final String EXECUTE_QUERY_SH = "scripts/execute_query.sh"; + public static final String QUERY_PREFIX = "query_"; + public static final String RESULT_PREFIX = "result_"; + public static final String GOLD_PREFIX = "gold_"; + public static final String SQL_EXTENSION = ".sql"; + public static final String TEXT_EXTENSION = ".txt"; + public static final String CREATE_ADD = "create_add"; + public static final String CREATE_DIVERGED_VIEW = "create_diverged_view"; + public static final String ADD_DATA = "add_data"; + public static final String ADD_DELETE = "add_delete"; + public static final String QUERY_CREATE_ADD = QUERY_PREFIX + CREATE_ADD; + public static final String QUERY_ADD_DATA = QUERY_PREFIX + ADD_DATA; + public static final String QUERY_ADD_DELETE = QUERY_PREFIX + ADD_DELETE; + public static final String QUERY_CREATE_DIVERGED_VIEW = QUERY_PREFIX + CREATE_DIVERGED_VIEW; + public static final String MVN_HOME = "maven.home"; + public static final String JAVA_TMP_DIR = "java.io.tmpdir"; + Review comment: added ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
