[01/50] [abbrv] ambari git commit: AMBARI-21728. Service and Patch Upgrade Catalog Changes for 2.6 - additional fixes (dlysnichenko) [Forced Update!]
Repository: ambari Updated Branches: refs/heads/feature-branch-AMBARI-21307 1c0658f74 -> 73ba1463a (forced update) AMBARI-21728. Service and Patch Upgrade Catalog Changes for 2.6 - additional fixes (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dee7317e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dee7317e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dee7317e Branch: refs/heads/feature-branch-AMBARI-21307 Commit: dee7317e000879313da9d7a08614331daae57e3a Parents: d2e0c42 Author: Lisnichenko DmitroAuthored: Tue Aug 22 19:26:30 2017 +0300 Committer: Lisnichenko Dmitro Committed: Tue Aug 22 19:26:30 2017 +0300 -- .../apache/ambari/server/orm/DBAccessor.java| 55 +++ .../ambari/server/orm/DBAccessorImpl.java | 119 + .../server/orm/helpers/dbms/DbmsHelper.java | 27 ++ .../orm/helpers/dbms/GenericDbmsHelper.java | 14 + .../server/orm/helpers/dbms/H2Helper.java | 16 + .../server/orm/helpers/dbms/MySqlHelper.java| 16 + .../server/orm/helpers/dbms/OracleHelper.java | 16 + .../server/orm/helpers/dbms/PostgresHelper.java | 15 + .../server/upgrade/SchemaUpgradeHelper.java | 1 + .../server/upgrade/UpgradeCatalog252.java | 51 ++ .../server/upgrade/UpgradeCatalog260.java | 325 + .../server/upgrade/UpgradeCatalog300.java | 97 +--- .../ambari/server/orm/DBAccessorImplTest.java | 88 .../server/upgrade/UpgradeCatalog260Test.java | 468 +++ .../server/upgrade/UpgradeCatalog300Test.java | 74 --- 15 files changed, 1212 insertions(+), 170 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dee7317e/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java index ef343d5..549c0fd 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java @@ -367,6 +367,21 @@ public interface DBAccessor { void executePreparedUpdate(String query, boolean ignoreFailure, Object...arguments) throws SQLException; /** + * Execute select {@code columnName} from {@code tableName} + * where {@code columnNames} values = {@code values} + * + * @param tableName + * @param columnName + * @param columnNames + * @param values + * @param ignoreFailure + * @return + * @throws SQLException + */ + List getIntColumnValues(String tableName, String columnName, String[] columnNames, + String[] values, boolean ignoreFailure) throws SQLException; + + /** * Drop table from schema * @param tableName * @throws SQLException @@ -689,6 +704,46 @@ public interface DBAccessor { void moveColumnToAnotherTable(String sourceTableName, DBColumnInfo sourceColumn, String sourceIDFieldName, String targetTableName, DBColumnInfo targetColumn, String targetIDFieldName, Object initialValue) throws SQLException; + /** + * Copy column from {@code targetTable} by matching + * table keys {@code sourceIDColumnName} and {@code targetIDColumnName} + * and condition {@code sourceConditionFieldName} = {@code condition} + * + * @param sourceTableName the source table name + * @param sourceColumn the source column name + * @param sourceIDFieldName1 the source id key filed name matched with {@code targetIDFieldName1} + * @param sourceIDFieldName2 the source id key filed name matched with {@code targetIDFieldName2} + * @param sourceIDFieldName3 the source id key filed name matched with {@code targetIDFieldName3} + * @param targetTableName the target table name + * @param targetColumn the target column name + * @param targetIDFieldName1 the target id key name matched with {@code sourceIDFieldName1} + * @param targetIDFieldName2 the target id key name matched with {@code sourceIDFieldName2} + * @param targetIDFieldName3 the target id key name matched with {@code sourceIDFieldName3} + * @param sourceConditionFieldName source key column name which should match {@code condition} + * @param conditionvalue which should match {@code sourceConditionFieldName} + * @param initialValue initial value for null-contained cells + * @throws SQLException + */ + void copyColumnToAnotherTable(String sourceTableName, DBColumnInfo sourceColumn, String sourceIDFieldName1, String
[31/35] ambari git commit: AMBARI-21728. Service and Patch Upgrade Catalog Changes for 2.6 - additional fixes (dlysnichenko)
AMBARI-21728. Service and Patch Upgrade Catalog Changes for 2.6 - additional fixes (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dee7317e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dee7317e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dee7317e Branch: refs/heads/branch-feature-logsearch-ui Commit: dee7317e000879313da9d7a08614331daae57e3a Parents: d2e0c42 Author: Lisnichenko DmitroAuthored: Tue Aug 22 19:26:30 2017 +0300 Committer: Lisnichenko Dmitro Committed: Tue Aug 22 19:26:30 2017 +0300 -- .../apache/ambari/server/orm/DBAccessor.java| 55 +++ .../ambari/server/orm/DBAccessorImpl.java | 119 + .../server/orm/helpers/dbms/DbmsHelper.java | 27 ++ .../orm/helpers/dbms/GenericDbmsHelper.java | 14 + .../server/orm/helpers/dbms/H2Helper.java | 16 + .../server/orm/helpers/dbms/MySqlHelper.java| 16 + .../server/orm/helpers/dbms/OracleHelper.java | 16 + .../server/orm/helpers/dbms/PostgresHelper.java | 15 + .../server/upgrade/SchemaUpgradeHelper.java | 1 + .../server/upgrade/UpgradeCatalog252.java | 51 ++ .../server/upgrade/UpgradeCatalog260.java | 325 + .../server/upgrade/UpgradeCatalog300.java | 97 +--- .../ambari/server/orm/DBAccessorImplTest.java | 88 .../server/upgrade/UpgradeCatalog260Test.java | 468 +++ .../server/upgrade/UpgradeCatalog300Test.java | 74 --- 15 files changed, 1212 insertions(+), 170 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dee7317e/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java index ef343d5..549c0fd 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java @@ -367,6 +367,21 @@ public interface DBAccessor { void executePreparedUpdate(String query, boolean ignoreFailure, Object...arguments) throws SQLException; /** + * Execute select {@code columnName} from {@code tableName} + * where {@code columnNames} values = {@code values} + * + * @param tableName + * @param columnName + * @param columnNames + * @param values + * @param ignoreFailure + * @return + * @throws SQLException + */ + List getIntColumnValues(String tableName, String columnName, String[] columnNames, + String[] values, boolean ignoreFailure) throws SQLException; + + /** * Drop table from schema * @param tableName * @throws SQLException @@ -689,6 +704,46 @@ public interface DBAccessor { void moveColumnToAnotherTable(String sourceTableName, DBColumnInfo sourceColumn, String sourceIDFieldName, String targetTableName, DBColumnInfo targetColumn, String targetIDFieldName, Object initialValue) throws SQLException; + /** + * Copy column from {@code targetTable} by matching + * table keys {@code sourceIDColumnName} and {@code targetIDColumnName} + * and condition {@code sourceConditionFieldName} = {@code condition} + * + * @param sourceTableName the source table name + * @param sourceColumn the source column name + * @param sourceIDFieldName1 the source id key filed name matched with {@code targetIDFieldName1} + * @param sourceIDFieldName2 the source id key filed name matched with {@code targetIDFieldName2} + * @param sourceIDFieldName3 the source id key filed name matched with {@code targetIDFieldName3} + * @param targetTableName the target table name + * @param targetColumn the target column name + * @param targetIDFieldName1 the target id key name matched with {@code sourceIDFieldName1} + * @param targetIDFieldName2 the target id key name matched with {@code sourceIDFieldName2} + * @param targetIDFieldName3 the target id key name matched with {@code sourceIDFieldName3} + * @param sourceConditionFieldName source key column name which should match {@code condition} + * @param conditionvalue which should match {@code sourceConditionFieldName} + * @param initialValue initial value for null-contained cells + * @throws SQLException + */ + void copyColumnToAnotherTable(String sourceTableName, DBColumnInfo sourceColumn, String sourceIDFieldName1, String sourceIDFieldName2, String sourceIDFieldName3, +String targetTableName, DBColumnInfo
ambari git commit: AMBARI-21728. Service and Patch Upgrade Catalog Changes for 2.6 - additional fixes (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/trunk d2e0c42a1 -> dee7317e0 AMBARI-21728. Service and Patch Upgrade Catalog Changes for 2.6 - additional fixes (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dee7317e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dee7317e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dee7317e Branch: refs/heads/trunk Commit: dee7317e000879313da9d7a08614331daae57e3a Parents: d2e0c42 Author: Lisnichenko DmitroAuthored: Tue Aug 22 19:26:30 2017 +0300 Committer: Lisnichenko Dmitro Committed: Tue Aug 22 19:26:30 2017 +0300 -- .../apache/ambari/server/orm/DBAccessor.java| 55 +++ .../ambari/server/orm/DBAccessorImpl.java | 119 + .../server/orm/helpers/dbms/DbmsHelper.java | 27 ++ .../orm/helpers/dbms/GenericDbmsHelper.java | 14 + .../server/orm/helpers/dbms/H2Helper.java | 16 + .../server/orm/helpers/dbms/MySqlHelper.java| 16 + .../server/orm/helpers/dbms/OracleHelper.java | 16 + .../server/orm/helpers/dbms/PostgresHelper.java | 15 + .../server/upgrade/SchemaUpgradeHelper.java | 1 + .../server/upgrade/UpgradeCatalog252.java | 51 ++ .../server/upgrade/UpgradeCatalog260.java | 325 + .../server/upgrade/UpgradeCatalog300.java | 97 +--- .../ambari/server/orm/DBAccessorImplTest.java | 88 .../server/upgrade/UpgradeCatalog260Test.java | 468 +++ .../server/upgrade/UpgradeCatalog300Test.java | 74 --- 15 files changed, 1212 insertions(+), 170 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dee7317e/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java index ef343d5..549c0fd 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java @@ -367,6 +367,21 @@ public interface DBAccessor { void executePreparedUpdate(String query, boolean ignoreFailure, Object...arguments) throws SQLException; /** + * Execute select {@code columnName} from {@code tableName} + * where {@code columnNames} values = {@code values} + * + * @param tableName + * @param columnName + * @param columnNames + * @param values + * @param ignoreFailure + * @return + * @throws SQLException + */ + List getIntColumnValues(String tableName, String columnName, String[] columnNames, + String[] values, boolean ignoreFailure) throws SQLException; + + /** * Drop table from schema * @param tableName * @throws SQLException @@ -689,6 +704,46 @@ public interface DBAccessor { void moveColumnToAnotherTable(String sourceTableName, DBColumnInfo sourceColumn, String sourceIDFieldName, String targetTableName, DBColumnInfo targetColumn, String targetIDFieldName, Object initialValue) throws SQLException; + /** + * Copy column from {@code targetTable} by matching + * table keys {@code sourceIDColumnName} and {@code targetIDColumnName} + * and condition {@code sourceConditionFieldName} = {@code condition} + * + * @param sourceTableName the source table name + * @param sourceColumn the source column name + * @param sourceIDFieldName1 the source id key filed name matched with {@code targetIDFieldName1} + * @param sourceIDFieldName2 the source id key filed name matched with {@code targetIDFieldName2} + * @param sourceIDFieldName3 the source id key filed name matched with {@code targetIDFieldName3} + * @param targetTableName the target table name + * @param targetColumn the target column name + * @param targetIDFieldName1 the target id key name matched with {@code sourceIDFieldName1} + * @param targetIDFieldName2 the target id key name matched with {@code sourceIDFieldName2} + * @param targetIDFieldName3 the target id key name matched with {@code sourceIDFieldName3} + * @param sourceConditionFieldName source key column name which should match {@code condition} + * @param conditionvalue which should match {@code sourceConditionFieldName} + * @param initialValue initial value for null-contained cells + * @throws SQLException + */ + void copyColumnToAnotherTable(String sourceTableName, DBColumnInfo sourceColumn, String sourceIDFieldName1, String sourceIDFieldName2, String sourceIDFieldName3, +
[17/18] ambari git commit: AMBARI-21728. Service and Patch Upgrade Catalog Changes for 2.6 - additional fixes (dlysnichenko)
AMBARI-21728. Service and Patch Upgrade Catalog Changes for 2.6 - additional fixes (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4cc8976c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4cc8976c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4cc8976c Branch: refs/heads/branch-feature-AMBARI-21450 Commit: 4cc8976ce500fae4d6d311b813fe0d4ec0367795 Parents: 6424b5f Author: Lisnichenko DmitroAuthored: Thu Aug 17 19:37:18 2017 +0300 Committer: Lisnichenko Dmitro Committed: Thu Aug 17 19:37:18 2017 +0300 -- .../apache/ambari/server/orm/DBAccessor.java| 36 +- .../ambari/server/orm/DBAccessorImpl.java | 90 ++-- .../server/orm/helpers/dbms/DbmsHelper.java | 20 - .../orm/helpers/dbms/GenericDbmsHelper.java | 11 - .../server/orm/helpers/dbms/H2Helper.java | 13 - .../server/orm/helpers/dbms/MySqlHelper.java| 13 - .../server/orm/helpers/dbms/OracleHelper.java | 12 - .../server/orm/helpers/dbms/PostgresHelper.java | 12 - .../server/upgrade/UpgradeCatalog260.java | 169 --- .../ambari/server/orm/DBAccessorImplTest.java | 88 .../server/upgrade/UpgradeCatalog260Test.java | 468 +++ 11 files changed, 719 insertions(+), 213 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4cc8976c/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java index 01bec59..8b22d5a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java @@ -367,6 +367,21 @@ public interface DBAccessor { void executePreparedUpdate(String query, boolean ignoreFailure, Object...arguments) throws SQLException; /** + * Execute select {@code columnName} from {@code tableName} + * where {@code columnNames} values = {@code values} + * + * @param tableName + * @param columnName + * @param columnNames + * @param values + * @param ignoreFailure + * @return + * @throws SQLException + */ + List getIntColumnValues(String tableName, String columnName, String[] columnNames, + String[] values, boolean ignoreFailure) throws SQLException; + + /** * Drop table from schema * @param tableName * @throws SQLException @@ -697,27 +712,6 @@ public interface DBAccessor { * * @param sourceTableName the source table name * @param sourceColumn the source column name - * @param sourceIDFieldNamethe source id key filed name matched with {@code targetIDFieldName} - * @param targetTableName the target table name - * @param targetColumn the target column name - * @param targetIDFieldNamethe target id key name matched with {@code sourceIDFieldName} - * @param sourceConditionFieldName source key column name which should match {@code condition} - * @param conditionvalue which should match {@code sourceConditionFieldName} - * @param initialValue initial value for null-contained cells - * @throws SQLException - */ - void copyColumnToAnotherTable(String sourceTableName, DBColumnInfo sourceColumn, String sourceIDFieldName, -String targetTableName, DBColumnInfo targetColumn, String targetIDFieldName, -String sourceConditionFieldName, String condition, Object initialValue) throws SQLException; - - - /** - * Copy column from {@code targetTable} by matching - * table keys {@code sourceIDColumnName} and {@code targetIDColumnName} - * and condition {@code sourceConditionFieldName} = {@code condition} - * - * @param sourceTableName the source table name - * @param sourceColumn the source column name * @param sourceIDFieldName1 the source id key filed name matched with {@code targetIDFieldName1} * @param sourceIDFieldName2 the source id key filed name matched with {@code targetIDFieldName2} * @param sourceIDFieldName3 the source id key filed name matched with {@code targetIDFieldName3} http://git-wip-us.apache.org/repos/asf/ambari/blob/4cc8976c/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
ambari git commit: AMBARI-21728. Service and Patch Upgrade Catalog Changes for 2.6 - additional fixes (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/branch-2.6 6424b5f56 -> 4cc8976ce AMBARI-21728. Service and Patch Upgrade Catalog Changes for 2.6 - additional fixes (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4cc8976c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4cc8976c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4cc8976c Branch: refs/heads/branch-2.6 Commit: 4cc8976ce500fae4d6d311b813fe0d4ec0367795 Parents: 6424b5f Author: Lisnichenko DmitroAuthored: Thu Aug 17 19:37:18 2017 +0300 Committer: Lisnichenko Dmitro Committed: Thu Aug 17 19:37:18 2017 +0300 -- .../apache/ambari/server/orm/DBAccessor.java| 36 +- .../ambari/server/orm/DBAccessorImpl.java | 90 ++-- .../server/orm/helpers/dbms/DbmsHelper.java | 20 - .../orm/helpers/dbms/GenericDbmsHelper.java | 11 - .../server/orm/helpers/dbms/H2Helper.java | 13 - .../server/orm/helpers/dbms/MySqlHelper.java| 13 - .../server/orm/helpers/dbms/OracleHelper.java | 12 - .../server/orm/helpers/dbms/PostgresHelper.java | 12 - .../server/upgrade/UpgradeCatalog260.java | 169 --- .../ambari/server/orm/DBAccessorImplTest.java | 88 .../server/upgrade/UpgradeCatalog260Test.java | 468 +++ 11 files changed, 719 insertions(+), 213 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4cc8976c/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java index 01bec59..8b22d5a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java @@ -367,6 +367,21 @@ public interface DBAccessor { void executePreparedUpdate(String query, boolean ignoreFailure, Object...arguments) throws SQLException; /** + * Execute select {@code columnName} from {@code tableName} + * where {@code columnNames} values = {@code values} + * + * @param tableName + * @param columnName + * @param columnNames + * @param values + * @param ignoreFailure + * @return + * @throws SQLException + */ + List getIntColumnValues(String tableName, String columnName, String[] columnNames, + String[] values, boolean ignoreFailure) throws SQLException; + + /** * Drop table from schema * @param tableName * @throws SQLException @@ -697,27 +712,6 @@ public interface DBAccessor { * * @param sourceTableName the source table name * @param sourceColumn the source column name - * @param sourceIDFieldNamethe source id key filed name matched with {@code targetIDFieldName} - * @param targetTableName the target table name - * @param targetColumn the target column name - * @param targetIDFieldNamethe target id key name matched with {@code sourceIDFieldName} - * @param sourceConditionFieldName source key column name which should match {@code condition} - * @param conditionvalue which should match {@code sourceConditionFieldName} - * @param initialValue initial value for null-contained cells - * @throws SQLException - */ - void copyColumnToAnotherTable(String sourceTableName, DBColumnInfo sourceColumn, String sourceIDFieldName, -String targetTableName, DBColumnInfo targetColumn, String targetIDFieldName, -String sourceConditionFieldName, String condition, Object initialValue) throws SQLException; - - - /** - * Copy column from {@code targetTable} by matching - * table keys {@code sourceIDColumnName} and {@code targetIDColumnName} - * and condition {@code sourceConditionFieldName} = {@code condition} - * - * @param sourceTableName the source table name - * @param sourceColumn the source column name * @param sourceIDFieldName1 the source id key filed name matched with {@code targetIDFieldName1} * @param sourceIDFieldName2 the source id key filed name matched with {@code targetIDFieldName2} * @param sourceIDFieldName3 the source id key filed name matched with {@code targetIDFieldName3} http://git-wip-us.apache.org/repos/asf/ambari/blob/4cc8976c/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java -- diff --git