This is an automated email from the ASF dual-hosted git repository. richardantal pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/5.1 by this push: new 11d329e PHOENIX-6480 Move phoenix-tool and add support with generating default properties (#1245) 11d329e is described below commit 11d329e9ff13e0570134d101d090ba8dbcd8e61c Author: Gokcen Iskender <47044859+gokc...@users.noreply.github.com> AuthorDate: Tue Jun 15 11:41:07 2021 -0700 PHOENIX-6480 Move phoenix-tool and add support with generating default properties (#1245) Change-Id: I17241f3f93dbdab08be3c151404d19dd6bd78626 --- phoenix-assembly/pom.xml | 24 ----- .../schema/tool}/SchemaToolExtractionIT.java | 34 ++++++- .../schema/tool}/SchemaToolSynthesisIT.java | 8 +- .../it/resources/synthesis/alter_add_property.sql | 0 .../resources/synthesis/alter_change_property.sql | 0 .../synthesis/alter_index_add_property.sql | 0 .../synthesis/alter_index_change_property.sql | 0 .../src/it/resources/synthesis/alter_table_add.sql | 0 .../it/resources/synthesis/alter_table_add_pk.sql | 0 .../it/resources/synthesis/alter_table_drop.sql | 0 .../resources/synthesis/alter_table_multiple.sql | 0 .../src/it/resources/synthesis/alter_view_add.sql | 0 .../src/it/resources/synthesis/alter_view_drop.sql | 0 .../src/it/resources/synthesis/create_function.sql | 0 .../it/resources/synthesis/drop_create_table.sql | 0 .../src/it/resources/synthesis/drop_index.sql | 0 .../src/it/resources/synthesis/drop_table.sql | 0 .../resources/synthesis/mismatched_entity_name.sql | 0 .../tool}/SchemaExtractionProcessor.java | 30 ++++-- .../tool}/SchemaProcessor.java | 2 +- .../{schematool => schema/tool}/SchemaSQLUtil.java | 6 +- .../tool}/SchemaSynthesisProcessor.java | 12 +-- .../apache/phoenix/schema/tool}/SchemaTool.java | 5 +- .../java/org/apache/phoenix/util/QueryUtil.java | 4 +- phoenix-tools/pom.xml | 108 --------------------- pom.xml | 6 -- 26 files changed, 74 insertions(+), 165 deletions(-) diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml index 0d1123d..4de74a3 100644 --- a/phoenix-assembly/pom.xml +++ b/phoenix-assembly/pom.xml @@ -123,26 +123,6 @@ </arguments> </configuration> </execution> - <execution> - <id>tools without version</id> - <phase>compile</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <executable>ln</executable> - <workingDirectory>${project.basedir}/../phoenix-tools/target</workingDirectory> - <arguments> - <argument>-fnsv</argument> - <argument> - phoenix-tools-${project.version}.jar - </argument> - <argument> - phoenix-tools.jar - </argument> - </arguments> - </configuration> - </execution> </executions> </plugin> <!-- No jars created for this module --> @@ -204,10 +184,6 @@ <groupId>org.apache.phoenix</groupId> <artifactId>phoenix-tracing-webapp</artifactId> </dependency> - <dependency> - <groupId>org.apache.phoenix</groupId> - <artifactId>phoenix-tools</artifactId> - </dependency> <dependency> <groupId>com.fasterxml.woodstox</groupId> diff --git a/phoenix-tools/src/it/java/org/apache/phoenix/schema/SchemaToolExtractionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java similarity index 93% rename from phoenix-tools/src/it/java/org/apache/phoenix/schema/SchemaToolExtractionIT.java rename to phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java index 782352f..0fd1603 100644 --- a/phoenix-tools/src/it/java/org/apache/phoenix/schema/SchemaToolExtractionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolExtractionIT.java @@ -15,12 +15,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.phoenix.schema; +package org.apache.phoenix.schema.tool; import org.apache.phoenix.end2end.ParallelStatsEnabledIT; import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.parse.ParseException; import org.apache.phoenix.parse.SQLParser; +import org.apache.phoenix.schema.PTable; import org.apache.phoenix.util.PhoenixRuntime; import org.apache.phoenix.util.PropertiesUtil; import org.apache.phoenix.util.ReadOnlyProps; @@ -43,6 +44,8 @@ import java.util.HashSet; import java.util.Arrays; import java.util.Properties; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertTrue; import static junit.framework.TestCase.fail; import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES; @@ -105,6 +108,35 @@ public class SchemaToolExtractionIT extends ParallelStatsEnabledIT { } @Test + public void testDDLsWithDefaults() throws Exception { + Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); + String tableName = generateUniqueName(); + String schemaName = generateUniqueName(); + String indexName = generateUniqueName(); + String properties = "COLUMN_ENCODED_BYTES=4"; + String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, tableName); + String pIndexFullName = SchemaUtil.getQualifiedTableName(schemaName, indexName); + String createTableStatement = "CREATE TABLE "+pTableFullName + "(k VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR)"; + String createIndexStatement = "CREATE INDEX "+indexName + " ON "+pTableFullName+"(v1 DESC) INCLUDE (v2)" + properties; + + List<String> queries = new ArrayList<String>(){}; + queries.add(createTableStatement); + queries.add(createIndexStatement); + try (Connection conn = DriverManager.getConnection(getUrl(), props)) { + executeCreateStatements(conn, queries); + PTable pData = PhoenixRuntime.getTable(conn, pTableFullName); + PTable pIndex = PhoenixRuntime.getTable(conn, pIndexFullName); + SchemaExtractionProcessor schemaExtractionProcessor = new SchemaExtractionProcessor(null, config, pData, true); + String tableDDL = schemaExtractionProcessor.process(); + assertTrue(tableDDL.contains("IMMUTABLE_STORAGE_SCHEME")); + SchemaExtractionProcessor schemaExtractionProcessorIndex = new SchemaExtractionProcessor(null, config, pIndex, true); + String indexDDL = schemaExtractionProcessorIndex.process(); + assertTrue(indexDDL.contains("IMMUTABLE_STORAGE_SCHEME")); + assertTrue(indexDDL.contains("ENCODING_SCHEME='FOUR_BYTE_QUALIFIERS'")); + } + } + + @Test public void testCreateLocalIndexStatement() throws Exception { String tableName = generateUniqueName(); String schemaName = generateUniqueName(); diff --git a/phoenix-tools/src/it/java/org/apache/phoenix/schema/SchemaToolSynthesisIT.java b/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolSynthesisIT.java similarity index 96% rename from phoenix-tools/src/it/java/org/apache/phoenix/schema/SchemaToolSynthesisIT.java rename to phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolSynthesisIT.java index 4d0ed43..76df637 100644 --- a/phoenix-tools/src/it/java/org/apache/phoenix/schema/SchemaToolSynthesisIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/schema/tool/SchemaToolSynthesisIT.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.phoenix.schema; +package org.apache.phoenix.schema.tool; import org.junit.Assert; import org.junit.Test; @@ -23,9 +23,9 @@ import org.junit.Test; import java.io.File; import java.net.URL; -import static org.apache.phoenix.schematool.SchemaSynthesisProcessor.ENTITY_NAME_IN_BASE_AND_ALTER_DDL_DON_T_MATCH; -import static org.apache.phoenix.schematool.SchemaSynthesisProcessor.UNSUPPORTED_DDL_EXCEPTION; -import static org.apache.phoenix.schema.SchemaToolExtractionIT.runSchemaTool; +import static org.apache.phoenix.schema.tool.SchemaSynthesisProcessor.ENTITY_NAME_IN_BASE_AND_ALTER_DDL_DON_T_MATCH; +import static org.apache.phoenix.schema.tool.SchemaSynthesisProcessor.UNSUPPORTED_DDL_EXCEPTION; +import static org.apache.phoenix.schema.tool.SchemaToolExtractionIT.runSchemaTool; public class SchemaToolSynthesisIT { diff --git a/phoenix-tools/src/it/resources/synthesis/alter_add_property.sql b/phoenix-core/src/it/resources/synthesis/alter_add_property.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/alter_add_property.sql rename to phoenix-core/src/it/resources/synthesis/alter_add_property.sql diff --git a/phoenix-tools/src/it/resources/synthesis/alter_change_property.sql b/phoenix-core/src/it/resources/synthesis/alter_change_property.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/alter_change_property.sql rename to phoenix-core/src/it/resources/synthesis/alter_change_property.sql diff --git a/phoenix-tools/src/it/resources/synthesis/alter_index_add_property.sql b/phoenix-core/src/it/resources/synthesis/alter_index_add_property.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/alter_index_add_property.sql rename to phoenix-core/src/it/resources/synthesis/alter_index_add_property.sql diff --git a/phoenix-tools/src/it/resources/synthesis/alter_index_change_property.sql b/phoenix-core/src/it/resources/synthesis/alter_index_change_property.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/alter_index_change_property.sql rename to phoenix-core/src/it/resources/synthesis/alter_index_change_property.sql diff --git a/phoenix-tools/src/it/resources/synthesis/alter_table_add.sql b/phoenix-core/src/it/resources/synthesis/alter_table_add.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/alter_table_add.sql rename to phoenix-core/src/it/resources/synthesis/alter_table_add.sql diff --git a/phoenix-tools/src/it/resources/synthesis/alter_table_add_pk.sql b/phoenix-core/src/it/resources/synthesis/alter_table_add_pk.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/alter_table_add_pk.sql rename to phoenix-core/src/it/resources/synthesis/alter_table_add_pk.sql diff --git a/phoenix-tools/src/it/resources/synthesis/alter_table_drop.sql b/phoenix-core/src/it/resources/synthesis/alter_table_drop.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/alter_table_drop.sql rename to phoenix-core/src/it/resources/synthesis/alter_table_drop.sql diff --git a/phoenix-tools/src/it/resources/synthesis/alter_table_multiple.sql b/phoenix-core/src/it/resources/synthesis/alter_table_multiple.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/alter_table_multiple.sql rename to phoenix-core/src/it/resources/synthesis/alter_table_multiple.sql diff --git a/phoenix-tools/src/it/resources/synthesis/alter_view_add.sql b/phoenix-core/src/it/resources/synthesis/alter_view_add.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/alter_view_add.sql rename to phoenix-core/src/it/resources/synthesis/alter_view_add.sql diff --git a/phoenix-tools/src/it/resources/synthesis/alter_view_drop.sql b/phoenix-core/src/it/resources/synthesis/alter_view_drop.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/alter_view_drop.sql rename to phoenix-core/src/it/resources/synthesis/alter_view_drop.sql diff --git a/phoenix-tools/src/it/resources/synthesis/create_function.sql b/phoenix-core/src/it/resources/synthesis/create_function.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/create_function.sql rename to phoenix-core/src/it/resources/synthesis/create_function.sql diff --git a/phoenix-tools/src/it/resources/synthesis/drop_create_table.sql b/phoenix-core/src/it/resources/synthesis/drop_create_table.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/drop_create_table.sql rename to phoenix-core/src/it/resources/synthesis/drop_create_table.sql diff --git a/phoenix-tools/src/it/resources/synthesis/drop_index.sql b/phoenix-core/src/it/resources/synthesis/drop_index.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/drop_index.sql rename to phoenix-core/src/it/resources/synthesis/drop_index.sql diff --git a/phoenix-tools/src/it/resources/synthesis/drop_table.sql b/phoenix-core/src/it/resources/synthesis/drop_table.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/drop_table.sql rename to phoenix-core/src/it/resources/synthesis/drop_table.sql diff --git a/phoenix-tools/src/it/resources/synthesis/mismatched_entity_name.sql b/phoenix-core/src/it/resources/synthesis/mismatched_entity_name.sql similarity index 100% rename from phoenix-tools/src/it/resources/synthesis/mismatched_entity_name.sql rename to phoenix-core/src/it/resources/synthesis/mismatched_entity_name.sql diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schematool/SchemaExtractionProcessor.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaExtractionProcessor.java similarity index 95% rename from phoenix-core/src/main/java/org/apache/phoenix/schematool/SchemaExtractionProcessor.java rename to phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaExtractionProcessor.java index 765068a..ffeedca 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/schematool/SchemaExtractionProcessor.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaExtractionProcessor.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.phoenix.schematool; +package org.apache.phoenix.schema.tool; import org.apache.commons.lang3.math.NumberUtils; import org.apache.hadoop.conf.Configuration; @@ -62,6 +62,7 @@ public class SchemaExtractionProcessor implements SchemaProcessor { private Configuration conf; private String ddl = null; private String tenantId; + private boolean shouldGenerateWithDefaults = false; public SchemaExtractionProcessor(String tenantId, Configuration conf, String pSchemaName, String pTableName) @@ -71,6 +72,15 @@ public class SchemaExtractionProcessor implements SchemaProcessor { this.table = getPTable(pSchemaName, pTableName); } + public SchemaExtractionProcessor(String tenantId, Configuration conf, + PTable pTable, boolean shouldGenerateWithDefaults) + throws SQLException { + this.tenantId = tenantId; + this.conf = conf; + this.table = pTable; + this.shouldGenerateWithDefaults = shouldGenerateWithDefaults; + } + @Override public String process() throws Exception { if (ddl != null) { @@ -87,7 +97,7 @@ public class SchemaExtractionProcessor implements SchemaProcessor { } protected String extractCreateIndexDDL(PTable indexPTable) - throws SQLException { + throws SQLException, IOException { String quotedIndexTableName = SchemaUtil .getFullTableNameWithQuotes(null, indexPTable.getTableName().getString()); @@ -101,9 +111,16 @@ public class SchemaExtractionProcessor implements SchemaProcessor { String defaultCF = SchemaUtil.getEmptyColumnFamilyAsString(indexPTable); String indexedColumnsString = getIndexedColumnsString(indexPTable, dataPTable, defaultCF); String coveredColumnsString = getCoveredColumnsString(indexPTable, defaultCF); - + if (shouldGenerateWithDefaults) { + populateDefaultProperties(indexPTable); + setPTableProperties(indexPTable); + ConnectionQueryServices cqsi = getCQSIObject(); + HTableDescriptor htd = getTableDescriptor(cqsi, table); + setHTableProperties(htd); + } + String propertiesString = convertPropertiesToString(); return generateIndexDDLString(quotedBaseTableFullName, indexedColumnsString, coveredColumnsString, - indexPTable.getIndexType().equals(PTable.IndexType.LOCAL), quotedIndexTableName); + indexPTable.getIndexType().equals(PTable.IndexType.LOCAL), quotedIndexTableName, propertiesString); } //TODO: Indexed on an expression @@ -198,7 +215,7 @@ public class SchemaExtractionProcessor implements SchemaProcessor { } protected String generateIndexDDLString(String quotedBaseTableFullName, String indexedColumnString, - String coveredColumnString, boolean local, String quotedIndexTableName) { + String coveredColumnString, boolean local, String quotedIndexTableName, String properties) { StringBuilder outputBuilder = new StringBuilder(String.format(CREATE_INDEX, local ? "LOCAL " : "", quotedIndexTableName, quotedBaseTableFullName)); outputBuilder.append("("); @@ -209,6 +226,7 @@ public class SchemaExtractionProcessor implements SchemaProcessor { outputBuilder.append(coveredColumnString); outputBuilder.append(")"); } + outputBuilder.append(properties); return outputBuilder.toString(); } @@ -363,7 +381,7 @@ public class SchemaExtractionProcessor implements SchemaProcessor { key = colPropKey[1]; } - if(value!=null && defaultProps.get(key) != null && !value.equals(defaultProps.get(key))) { + if(value!=null && (shouldGenerateWithDefaults || (defaultProps.get(key) != null && !value.equals(defaultProps.get(key))))) { if (optionBuilder.length() != 0) { optionBuilder.append(", "); } diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schematool/SchemaProcessor.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaProcessor.java similarity index 95% rename from phoenix-core/src/main/java/org/apache/phoenix/schematool/SchemaProcessor.java rename to phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaProcessor.java index 9bf9a3c..babd952 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/schematool/SchemaProcessor.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaProcessor.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.phoenix.schematool; +package org.apache.phoenix.schema.tool; public interface SchemaProcessor { String process() throws Exception; diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schematool/SchemaSQLUtil.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaSQLUtil.java similarity index 99% rename from phoenix-core/src/main/java/org/apache/phoenix/schematool/SchemaSQLUtil.java rename to phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaSQLUtil.java index f09df2d..b89ae0a 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/schematool/SchemaSQLUtil.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaSQLUtil.java @@ -15,16 +15,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.phoenix.schematool; +package org.apache.phoenix.schema.tool; -import org.apache.phoenix.schema.PTable; -import org.apache.phoenix.schema.PTableType; import org.apache.phoenix.thirdparty.com.google.common.collect.ListMultimap; import org.apache.hadoop.hbase.util.Pair; import org.apache.phoenix.parse.ColumnDef; import org.apache.phoenix.parse.ColumnName; import org.apache.phoenix.parse.CreateIndexStatement; import org.apache.phoenix.parse.CreateTableStatement; +import org.apache.phoenix.schema.PTable; +import org.apache.phoenix.schema.PTableType; import java.util.List; import java.util.Map; diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schematool/SchemaSynthesisProcessor.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaSynthesisProcessor.java similarity index 98% rename from phoenix-core/src/main/java/org/apache/phoenix/schematool/SchemaSynthesisProcessor.java rename to phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaSynthesisProcessor.java index 1d0bddad..7fe13bb 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/schematool/SchemaSynthesisProcessor.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaSynthesisProcessor.java @@ -15,24 +15,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.phoenix.schematool; +package org.apache.phoenix.schema.tool; -import org.apache.phoenix.parse.ColumnDefInPkConstraint; -import org.apache.phoenix.parse.PrimaryKeyConstraint; -import org.apache.phoenix.schema.SortOrder; import org.apache.phoenix.thirdparty.com.google.common.collect.ArrayListMultimap; import org.apache.phoenix.thirdparty.com.google.common.collect.ListMultimap; import org.apache.hadoop.hbase.util.Pair; import org.apache.phoenix.parse.AddColumnStatement; import org.apache.phoenix.parse.BindableStatement; import org.apache.phoenix.parse.ColumnDef; +import org.apache.phoenix.parse.ColumnDefInPkConstraint; import org.apache.phoenix.parse.ColumnName; import org.apache.phoenix.parse.CreateIndexStatement; import org.apache.phoenix.parse.CreateTableStatement; import org.apache.phoenix.parse.DropColumnStatement; import org.apache.phoenix.parse.DropIndexStatement; import org.apache.phoenix.parse.DropTableStatement; +import org.apache.phoenix.parse.PrimaryKeyConstraint; import org.apache.phoenix.parse.SQLParser; +import org.apache.phoenix.schema.SortOrder; import java.io.BufferedReader; import java.io.File; @@ -43,8 +43,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import static org.apache.phoenix.schematool.SchemaSQLUtil.getCreateIndexSQL; -import static org.apache.phoenix.schematool.SchemaSQLUtil.getCreateTableSQL; +import static org.apache.phoenix.schema.tool.SchemaSQLUtil.getCreateIndexSQL; +import static org.apache.phoenix.schema.tool.SchemaSQLUtil.getCreateTableSQL; public class SchemaSynthesisProcessor implements SchemaProcessor { public static final String diff --git a/phoenix-tools/src/main/java/org/apache/phoenix/schema/SchemaTool.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaTool.java similarity index 96% rename from phoenix-tools/src/main/java/org/apache/phoenix/schema/SchemaTool.java rename to phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaTool.java index 47b6c48..c0e29e2 100644 --- a/phoenix-tools/src/main/java/org/apache/phoenix/schema/SchemaTool.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaTool.java @@ -15,12 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.phoenix.schema; +package org.apache.phoenix.schema.tool; import org.apache.hadoop.yarn.webapp.hamlet.HamletSpec; -import org.apache.phoenix.schematool.SchemaExtractionProcessor; -import org.apache.phoenix.schematool.SchemaProcessor; -import org.apache.phoenix.schematool.SchemaSynthesisProcessor; import org.apache.phoenix.thirdparty.org.apache.commons.cli.CommandLine; import org.apache.phoenix.thirdparty.org.apache.commons.cli.CommandLineParser; import org.apache.phoenix.thirdparty.org.apache.commons.cli.DefaultParser; diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java b/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java index fe79ef0..5f9f13b 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java @@ -100,8 +100,8 @@ import org.apache.phoenix.schema.PTableType; import org.apache.phoenix.schema.SortOrder; import org.apache.phoenix.schema.tuple.Tuple; import org.apache.phoenix.schema.types.PInteger; -import org.apache.phoenix.schematool.SchemaExtractionProcessor; -import org.apache.phoenix.schematool.SchemaProcessor; +import org.apache.phoenix.schema.tool.SchemaExtractionProcessor; +import org.apache.phoenix.schema.tool.SchemaProcessor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/phoenix-tools/pom.xml b/phoenix-tools/pom.xml deleted file mode 100644 index 95e0f7c..0000000 --- a/phoenix-tools/pom.xml +++ /dev/null @@ -1,108 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <parent> - <artifactId>phoenix</artifactId> - <groupId>org.apache.phoenix</groupId> - <version>5.1.3-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - - <artifactId>phoenix-tools</artifactId> - - <dependencies> - <dependency> - <groupId>org.apache.phoenix</groupId> - <artifactId>phoenix-core</artifactId> - </dependency> - - <dependency> - <groupId>org.apache.hbase</groupId> - <artifactId>hbase-common</artifactId> - </dependency> - <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-common</artifactId> - </dependency> - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - </dependency> - <dependency> - <groupId>org.apache.phoenix.thirdparty</groupId> - <artifactId>phoenix-shaded-commons-cli</artifactId> - </dependency> - <dependency> - <groupId>org.apache.phoenix</groupId> - <artifactId>phoenix-core</artifactId> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.phoenix</groupId> - <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId> - <optional>false</optional> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.hbase</groupId> - <artifactId>hbase-it</artifactId> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - </plugin> - <plugin> - <artifactId>maven-dependency-plugin</artifactId> - <configuration> - <ignoredUnusedDeclaredDependencies> - <ignoredUnusedDeclaredDependency> - org.apache.hbase:hbase-it - </ignoredUnusedDeclaredDependency> - <ignoredUnusedDeclaredDependency> - org.apache.phoenix:phoenix-hbase-compat-${hbase.compat.version} - </ignoredUnusedDeclaredDependency> - </ignoredUnusedDeclaredDependencies> - </configuration> - </plugin> - </plugins> - </build> - -</project> \ No newline at end of file diff --git a/pom.xml b/pom.xml index 25db2a6..1ec915e 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,6 @@ <module>phoenix-client-parent/phoenix-client-embedded</module> <module>phoenix-server</module> <module>phoenix-assembly</module> - <module>phoenix-tools</module> <module>phoenix-tracing-webapp</module> </modules> @@ -704,11 +703,6 @@ </dependency> <dependency> <groupId>org.apache.phoenix</groupId> - <artifactId>phoenix-tools</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.phoenix</groupId> <artifactId>phoenix-tracing-webapp</artifactId> <version>${project.version}</version> </dependency>