hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stak...@apache.org
Subject hive git commit: HIVE-18489: Automatically migration s3n URIs to s3a URIs (Sahil Takiar, reviewed by Aihua Xu)
Date Tue, 23 Jan 2018 16:31:47 GMT
Repository: hive
Updated Branches:
  refs/heads/master f0b824ade -> ed256f350


HIVE-18489: Automatically migration s3n URIs to s3a URIs (Sahil Takiar, reviewed by Aihua
Xu)


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

Branch: refs/heads/master
Commit: ed256f35057b36ec25f806f69db490966ead8d0d
Parents: f0b824a
Author: Sahil Takiar <takiar.sahil@gmail.com>
Authored: Tue Jan 23 08:30:41 2018 -0800
Committer: Sahil Takiar <stakiar@cloudera.com>
Committed: Tue Jan 23 08:31:38 2018 -0800

----------------------------------------------------------------------
 .../upgrade/derby/049-HIVE-18489.derby.sql      | 23 ++++++++++++++++++++
 .../derby/upgrade-2.3.0-to-3.0.0.derby.sql      |  1 +
 .../upgrade/mssql/034-HIVE-18489.mssql.sql      | 23 ++++++++++++++++++++
 .../mssql/upgrade-2.3.0-to-3.0.0.mssql.sql      |  1 +
 .../upgrade/mysql/049-HIVE-18489.mysql.sql      | 23 ++++++++++++++++++++
 .../mysql/upgrade-2.3.0-to-3.0.0.mysql.sql      |  1 +
 .../upgrade/oracle/049-HIVE-18489.oracle.sql    | 23 ++++++++++++++++++++
 .../oracle/upgrade-2.3.0-to-3.0.0.oracle.sql    |  1 +
 .../postgres/048-HIVE-18489.postgres.sql        | 23 ++++++++++++++++++++
 .../upgrade-2.3.0-to-3.0.0.postgres.sql         |  1 +
 10 files changed, 120 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/ed256f35/metastore/scripts/upgrade/derby/049-HIVE-18489.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/049-HIVE-18489.derby.sql b/metastore/scripts/upgrade/derby/049-HIVE-18489.derby.sql
new file mode 100644
index 0000000..fb4d0a2
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/049-HIVE-18489.derby.sql
@@ -0,0 +1,23 @@
+UPDATE FUNC_RU
+  SET RESOURCE_URI = 's3a' || SUBSTR(RESOURCE_URI, 4)
+WHERE
+      RESOURCE_URI LIKE 's3n://%'
+;
+
+UPDATE SKEWED_COL_VALUE_LOC_MAP
+  SET LOCATION = 's3a' || SUBSTR(LOCATION, 4)
+WHERE
+      LOCATION LIKE 's3n://%'
+;
+
+UPDATE SDS
+  SET LOCATION = 's3a' || SUBSTR(LOCATION, 4)
+WHERE
+      LOCATION LIKE 's3n://%'
+;
+
+UPDATE DBS
+  SET DB_LOCATION_URI = 's3a' || SUBSTR(DB_LOCATION_URI, 4)
+WHERE
+      DB_LOCATION_URI LIKE 's3n://%'
+;

http://git-wip-us.apache.org/repos/asf/hive/blob/ed256f35/metastore/scripts/upgrade/derby/upgrade-2.3.0-to-3.0.0.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/upgrade-2.3.0-to-3.0.0.derby.sql b/metastore/scripts/upgrade/derby/upgrade-2.3.0-to-3.0.0.derby.sql
index 574ad28..4372498 100644
--- a/metastore/scripts/upgrade/derby/upgrade-2.3.0-to-3.0.0.derby.sql
+++ b/metastore/scripts/upgrade/derby/upgrade-2.3.0-to-3.0.0.derby.sql
@@ -7,5 +7,6 @@ RUN '045-HIVE-16886.derby.sql';
 RUN '046-HIVE-17566.derby.sql';
 RUN '047-HIVE-18202.derby.sql';
 RUN '048-HIVE-14498.derby.sql';
+RUN '049-HIVE-18489.derby.sql';
 
 UPDATE "APP".VERSION SET SCHEMA_VERSION='3.0.0', VERSION_COMMENT='Hive release version 3.0.0'
where VER_ID=1;

http://git-wip-us.apache.org/repos/asf/hive/blob/ed256f35/metastore/scripts/upgrade/mssql/034-HIVE-18489.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/034-HIVE-18489.mssql.sql b/metastore/scripts/upgrade/mssql/034-HIVE-18489.mssql.sql
new file mode 100644
index 0000000..197aa8e
--- /dev/null
+++ b/metastore/scripts/upgrade/mssql/034-HIVE-18489.mssql.sql
@@ -0,0 +1,23 @@
+UPDATE FUNC_RU
+  SET RESOURCE_URI = 's3a' + SUBSTRING(RESOURCE_URI, 4, LEN(RESOURCE_URI))
+WHERE
+      RESOURCE_URI LIKE 's3n://%'
+;
+
+UPDATE SKEWED_COL_VALUE_LOC_MAP
+  SET LOCATION = 's3a' + SUBSTRING(LOCATION, 4, LEN(LOCATION))
+WHERE
+      LOCATION LIKE 's3n://%'
+;
+
+UPDATE SDS
+  SET LOCATION = 's3a' + SUBSTRING(LOCATION, 4, LEN(LOCATION))
+WHERE
+      LOCATION LIKE 's3n://%'
+;
+
+UPDATE DBS
+  SET DB_LOCATION_URI = 's3a' + SUBSTRING(DB_LOCATION_URI, 4, LEN(DB_LOCATION_URI))
+WHERE
+      DB_LOCATION_URI LIKE 's3n://%'
+;

http://git-wip-us.apache.org/repos/asf/hive/blob/ed256f35/metastore/scripts/upgrade/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql b/metastore/scripts/upgrade/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql
index ebe10ff..52727f3 100644
--- a/metastore/scripts/upgrade/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql
+++ b/metastore/scripts/upgrade/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql
@@ -8,6 +8,7 @@ SELECT 'Upgrading MetaStore schema from 2.3.0 to 3.0.0' AS MESSAGE;
 :r 031-HIVE-17566.mssql.sql
 :r 032-HIVE-18202.mssql.sql
 :r 033-HIVE-14498.mssql.sql
+:r 034-HIVE-18489.mssql.sql
 
 UPDATE VERSION SET SCHEMA_VERSION='3.0.0', VERSION_COMMENT='Hive release version 3.0.0' where
VER_ID=1;
 SELECT 'Finished upgrading MetaStore schema from 2.3.0 to 3.0.0' AS MESSAGE;

http://git-wip-us.apache.org/repos/asf/hive/blob/ed256f35/metastore/scripts/upgrade/mysql/049-HIVE-18489.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/049-HIVE-18489.mysql.sql b/metastore/scripts/upgrade/mysql/049-HIVE-18489.mysql.sql
new file mode 100644
index 0000000..1d9a07f
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/049-HIVE-18489.mysql.sql
@@ -0,0 +1,23 @@
+UPDATE FUNC_RU
+  SET RESOURCE_URI = CONCAT('s3a', SUBSTR(RESOURCE_URI, 4, LENGTH(RESOURCE_URI)))
+WHERE
+      RESOURCE_URI LIKE 's3n://%'
+;
+
+UPDATE SKEWED_COL_VALUE_LOC_MAP
+  SET LOCATION = CONCAT('s3a', SUBSTR(LOCATION, 4, LENGTH(LOCATION)))
+WHERE
+      LOCATION LIKE 's3n://%'
+;
+
+UPDATE SDS
+  SET LOCATION = CONCAT('s3a', SUBSTR(LOCATION, 4, LENGTH(LOCATION)))
+WHERE
+      LOCATION LIKE 's3n://%'
+;
+
+UPDATE DBS
+  SET DB_LOCATION_URI = CONCAT('s3a', SUBSTR(DB_LOCATION_URI, 4, LENGTH(DB_LOCATION_URI)))
+WHERE
+      DB_LOCATION_URI LIKE 's3n://%'
+;

http://git-wip-us.apache.org/repos/asf/hive/blob/ed256f35/metastore/scripts/upgrade/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql b/metastore/scripts/upgrade/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql
index c617772..fb50db3 100644
--- a/metastore/scripts/upgrade/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql
+++ b/metastore/scripts/upgrade/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql
@@ -8,6 +8,7 @@ SOURCE 045-HIVE-16886.mysql.sql;
 SOURCE 046-HIVE-17566.mysql.sql;
 SOURCE 047-HIVE-18202.mysql.sql;
 SOURCE 048-HIVE-14498.mysql.sql;
+SOURCE 049-HIVE-18489.mysql.sql;
 
 UPDATE VERSION SET SCHEMA_VERSION='3.0.0', VERSION_COMMENT='Hive release version 3.0.0' where
VER_ID=1;
 SELECT 'Finished upgrading MetaStore schema from 2.3.0 to 3.0.0' AS ' ';

http://git-wip-us.apache.org/repos/asf/hive/blob/ed256f35/metastore/scripts/upgrade/oracle/049-HIVE-18489.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/049-HIVE-18489.oracle.sql b/metastore/scripts/upgrade/oracle/049-HIVE-18489.oracle.sql
new file mode 100644
index 0000000..fb4d0a2
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/049-HIVE-18489.oracle.sql
@@ -0,0 +1,23 @@
+UPDATE FUNC_RU
+  SET RESOURCE_URI = 's3a' || SUBSTR(RESOURCE_URI, 4)
+WHERE
+      RESOURCE_URI LIKE 's3n://%'
+;
+
+UPDATE SKEWED_COL_VALUE_LOC_MAP
+  SET LOCATION = 's3a' || SUBSTR(LOCATION, 4)
+WHERE
+      LOCATION LIKE 's3n://%'
+;
+
+UPDATE SDS
+  SET LOCATION = 's3a' || SUBSTR(LOCATION, 4)
+WHERE
+      LOCATION LIKE 's3n://%'
+;
+
+UPDATE DBS
+  SET DB_LOCATION_URI = 's3a' || SUBSTR(DB_LOCATION_URI, 4)
+WHERE
+      DB_LOCATION_URI LIKE 's3n://%'
+;

http://git-wip-us.apache.org/repos/asf/hive/blob/ed256f35/metastore/scripts/upgrade/oracle/upgrade-2.3.0-to-3.0.0.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/upgrade-2.3.0-to-3.0.0.oracle.sql b/metastore/scripts/upgrade/oracle/upgrade-2.3.0-to-3.0.0.oracle.sql
index 90e02f7..0eab90c 100644
--- a/metastore/scripts/upgrade/oracle/upgrade-2.3.0-to-3.0.0.oracle.sql
+++ b/metastore/scripts/upgrade/oracle/upgrade-2.3.0-to-3.0.0.oracle.sql
@@ -8,6 +8,7 @@ SELECT 'Upgrading MetaStore schema from 2.3.0 to 3.0.0' AS Status from dual;
 @046-HIVE-17566.oracle.sql;
 @047-HIVE-18202-oracle.sql;
 @048-HIVE-14498.oracle.sql;
+@049-HIVE-18489.oracle.sql;
 
 UPDATE VERSION SET SCHEMA_VERSION='3.0.0', VERSION_COMMENT='Hive release version 3.0.0' where
VER_ID=1;
 SELECT 'Finished upgrading MetaStore schema from 2.3.0 to 3.0.0' AS Status from dual;

http://git-wip-us.apache.org/repos/asf/hive/blob/ed256f35/metastore/scripts/upgrade/postgres/048-HIVE-18489.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/048-HIVE-18489.postgres.sql b/metastore/scripts/upgrade/postgres/048-HIVE-18489.postgres.sql
new file mode 100644
index 0000000..fb4d0a2
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/048-HIVE-18489.postgres.sql
@@ -0,0 +1,23 @@
+UPDATE FUNC_RU
+  SET RESOURCE_URI = 's3a' || SUBSTR(RESOURCE_URI, 4)
+WHERE
+      RESOURCE_URI LIKE 's3n://%'
+;
+
+UPDATE SKEWED_COL_VALUE_LOC_MAP
+  SET LOCATION = 's3a' || SUBSTR(LOCATION, 4)
+WHERE
+      LOCATION LIKE 's3n://%'
+;
+
+UPDATE SDS
+  SET LOCATION = 's3a' || SUBSTR(LOCATION, 4)
+WHERE
+      LOCATION LIKE 's3n://%'
+;
+
+UPDATE DBS
+  SET DB_LOCATION_URI = 's3a' || SUBSTR(DB_LOCATION_URI, 4)
+WHERE
+      DB_LOCATION_URI LIKE 's3n://%'
+;

http://git-wip-us.apache.org/repos/asf/hive/blob/ed256f35/metastore/scripts/upgrade/postgres/upgrade-2.3.0-to-3.0.0.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/upgrade-2.3.0-to-3.0.0.postgres.sql b/metastore/scripts/upgrade/postgres/upgrade-2.3.0-to-3.0.0.postgres.sql
index 4737208..674f5a0 100644
--- a/metastore/scripts/upgrade/postgres/upgrade-2.3.0-to-3.0.0.postgres.sql
+++ b/metastore/scripts/upgrade/postgres/upgrade-2.3.0-to-3.0.0.postgres.sql
@@ -8,6 +8,7 @@ SELECT 'Upgrading MetaStore schema from 2.3.0 to 3.0.0';
 \i 045-HIVE-17566.postgres.sql;
 \i 046-HIVE-18202.postgres.sql;
 \i 047-HIVE-14498.postgres.sql;
+\i 048-HIVE-18489.postgres.sql;
 
 UPDATE "VERSION" SET "SCHEMA_VERSION"='3.0.0', "VERSION_COMMENT"='Hive release version 3.0.0'
where "VER_ID"=1;
 SELECT 'Finished upgrading MetaStore schema from 2.3.0 to 3.0.0';


Mime
View raw message