[49/50] [abbrv] ambari git commit: AMBARI-21169. Service and Patch Upgrade Catalog Changes for 2.6.0 (dlysnichenko)

2017-08-10 Thread jonathanhurley
AMBARI-21169. Service and Patch Upgrade Catalog Changes for 2.6.0 (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2307c9d4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2307c9d4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2307c9d4

Branch: refs/heads/branch-2.6
Commit: 2307c9d49946b37015087b132911a6d0f054ef1d
Parents: 6c5faee
Author: Lisnichenko Dmitro 
Authored: Thu Aug 10 19:09:57 2017 +0300
Committer: Lisnichenko Dmitro 
Committed: Thu Aug 10 19:09:57 2017 +0300

--
 .../apache/ambari/server/orm/DBAccessor.java|  45 +++
 .../ambari/server/orm/DBAccessorImpl.java   |  77 +
 .../server/orm/helpers/dbms/DbmsHelper.java |  47 +++
 .../orm/helpers/dbms/GenericDbmsHelper.java |  25 ++
 .../server/orm/helpers/dbms/H2Helper.java   |  29 ++
 .../server/orm/helpers/dbms/MySqlHelper.java|  29 ++
 .../server/orm/helpers/dbms/OracleHelper.java   |  28 ++
 .../server/orm/helpers/dbms/PostgresHelper.java |  27 ++
 .../server/upgrade/SchemaUpgradeHelper.java |   1 +
 .../server/upgrade/UpgradeCatalog260.java   | 318 +++
 10 files changed, 626 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2307c9d4/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 0313698..8f1a192 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
@@ -681,6 +681,51 @@ public interface DBAccessor {
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 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}
+   * @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, 

ambari git commit: AMBARI-21169. Service and Patch Upgrade Catalog Changes for 2.6.0 (dlysnichenko)

2017-08-10 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-21450 6c5faee5c -> 2307c9d49


AMBARI-21169. Service and Patch Upgrade Catalog Changes for 2.6.0 (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2307c9d4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2307c9d4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2307c9d4

Branch: refs/heads/branch-feature-AMBARI-21450
Commit: 2307c9d49946b37015087b132911a6d0f054ef1d
Parents: 6c5faee
Author: Lisnichenko Dmitro 
Authored: Thu Aug 10 19:09:57 2017 +0300
Committer: Lisnichenko Dmitro 
Committed: Thu Aug 10 19:09:57 2017 +0300

--
 .../apache/ambari/server/orm/DBAccessor.java|  45 +++
 .../ambari/server/orm/DBAccessorImpl.java   |  77 +
 .../server/orm/helpers/dbms/DbmsHelper.java |  47 +++
 .../orm/helpers/dbms/GenericDbmsHelper.java |  25 ++
 .../server/orm/helpers/dbms/H2Helper.java   |  29 ++
 .../server/orm/helpers/dbms/MySqlHelper.java|  29 ++
 .../server/orm/helpers/dbms/OracleHelper.java   |  28 ++
 .../server/orm/helpers/dbms/PostgresHelper.java |  27 ++
 .../server/upgrade/SchemaUpgradeHelper.java |   1 +
 .../server/upgrade/UpgradeCatalog260.java   | 318 +++
 10 files changed, 626 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2307c9d4/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 0313698..8f1a192 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
@@ -681,6 +681,51 @@ public interface DBAccessor {
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 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}
+   * @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
+