This is an automated email from the ASF dual-hosted git repository.

anishek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new b70d840  HIVE-23696: DB Metadata and Progress column not taking the 
defined length(Aasha Medhi, reviewed by Pravin Kumar Sinha)
b70d840 is described below

commit b70d84049b2ae304c1dc211913dd1ad47baba673
Author: Anishek Agarwal <anis...@gmail.com>
AuthorDate: Wed Jun 17 14:24:33 2020 +0530

    HIVE-23696: DB Metadata and Progress column not taking the defined 
length(Aasha Medhi, reviewed by Pravin Kumar Sinha)
---
 .../ql/parse/repl/metric/TestReplicationMetricSink.java    | 14 ++++++++++----
 .../metastore-server/src/main/resources/package.jdo        |  4 ++--
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git 
a/ql/src/test/org/apache/hadoop/hive/ql/parse/repl/metric/TestReplicationMetricSink.java
 
b/ql/src/test/org/apache/hadoop/hive/ql/parse/repl/metric/TestReplicationMetricSink.java
index c75b51d..d3ad8fb 100644
--- 
a/ql/src/test/org/apache/hadoop/hive/ql/parse/repl/metric/TestReplicationMetricSink.java
+++ 
b/ql/src/test/org/apache/hadoop/hive/ql/parse/repl/metric/TestReplicationMetricSink.java
@@ -68,8 +68,10 @@ public class TestReplicationMetricSink {
 
   @Test
   public void testSuccessBootstrapDumpMetrics() throws Exception {
-    ReplicationMetricCollector bootstrapDumpMetricCollector = new 
BootstrapDumpMetricCollector("db",
-        "staging", conf);
+    ReplicationMetricCollector bootstrapDumpMetricCollector = new 
BootstrapDumpMetricCollector(
+      "testAcidTablesReplLoadBootstrapIncr_1592205875387",
+        
"hdfs://localhost:65158/tmp/org_apache_hadoop_hive_ql_parse_TestReplicationScenarios_245261428230295"
+          + 
"/hrepl0/dGVzdGFjaWR0YWJsZXNyZXBsbG9hZGJvb3RzdHJhcGluY3JfMTU5MjIwNTg3NTM4Nw==/0/hive",
 conf);
     Map<String, Long> metricMap = new HashMap<>();
     metricMap.put(ReplUtils.MetricName.TABLES.name(), (long) 10);
     metricMap.put(ReplUtils.MetricName.FUNCTIONS.name(), (long) 1);
@@ -80,7 +82,10 @@ public class TestReplicationMetricSink {
     bootstrapDumpMetricCollector.reportStageEnd("dump", Status.SUCCESS, 10);
     bootstrapDumpMetricCollector.reportEnd(Status.SUCCESS);
 
-    Metadata expectedMetadata = new Metadata("db", 
Metadata.ReplicationType.BOOTSTRAP, "staging");
+    Metadata expectedMetadata = new 
Metadata("testAcidTablesReplLoadBootstrapIncr_1592205875387",
+      Metadata.ReplicationType.BOOTSTRAP, 
"hdfs://localhost:65158/tmp/org_apache_hadoop_hive_ql_"
+      + 
"parse_TestReplicationScenarios_245261428230295/hrepl0/dGVzdGFjaWR0YWJsZXNyZXBsbG9hZGJvb3RzdHJhcGlu"
+      + "Y3JfMTU5MjIwNTg3NTM4Nw==/0/hive");
     expectedMetadata.setLastReplId(10);
     Progress expectedProgress = new Progress();
     expectedProgress.setStatus(Status.SUCCESS);
@@ -93,7 +98,8 @@ public class TestReplicationMetricSink {
     dumpStage.addMetric(expectedTableMetric);
     dumpStage.addMetric(expectedFuncMetric);
     expectedProgress.addStage(dumpStage);
-    ReplicationMetric expectedMetric = new ReplicationMetric(1, "repl", 0, 
expectedMetadata);
+    ReplicationMetric expectedMetric = new ReplicationMetric(1, "repl", 0,
+        expectedMetadata);
     expectedMetric.setProgress(expectedProgress);
     Thread.sleep(1000 * 20);
     GetReplicationMetricsRequest metricsRequest = new 
GetReplicationMetricsRequest();
diff --git 
a/standalone-metastore/metastore-server/src/main/resources/package.jdo 
b/standalone-metastore/metastore-server/src/main/resources/package.jdo
index 626807e..c88ed32 100644
--- a/standalone-metastore/metastore-server/src/main/resources/package.jdo
+++ b/standalone-metastore/metastore-server/src/main/resources/package.jdo
@@ -1534,10 +1534,10 @@
         <column name="RM_DUMP_EXECUTION_ID" jdbc-type="bigint" 
allows-null="false"/>
       </field>
       <field name="metadata">
-        <column name="RM_METADATA" jdbc-type="varchar" allows-null="true"/>
+        <column name="RM_METADATA" jdbc-type="varchar" length="4000" 
allows-null="true"/>
       </field>
       <field name="progress">
-        <column name="RM_PROGRESS" jdbc-type="varchar" allows-null="true"/>
+        <column name="RM_PROGRESS" jdbc-type="varchar" length="4000" 
allows-null="true"/>
       </field>
       <index name="PolicyIndex">
         <column name="RM_POLICY"/>

Reply via email to