You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gobblin.apache.org by hu...@apache.org on 2019/02/21 17:10:56 UTC

[incubator-gobblin] branch master updated: [GOBBLIN-666] Data too long for column 'property_key'

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

hutran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-gobblin.git


The following commit(s) were added to refs/heads/master by this push:
     new 3bd68b3  [GOBBLIN-666] Data too long for column 'property_key'
3bd68b3 is described below

commit 3bd68b3fb847343291ecfc05699e634c02af33b0
Author: lupin <fr...@gmail.com>
AuthorDate: Thu Feb 21 09:10:44 2019 -0800

    [GOBBLIN-666] Data too long for column 'property_key'
    
    Closes #2539 from FrancisLfg/fixMySqlGuiDb
---
 .../database/DatabaseJobHistoryStoreV103.java      | 33 ++++++++++++++++++++++
 .../db/migration/V1_0_3__Update_Key_Length.sql     | 19 +++++++++++++
 .../metastore/DatabaseJobHistoryStoreV103Test.java | 32 +++++++++++++++++++++
 3 files changed, 84 insertions(+)

diff --git a/gobblin-metastore/src/main/java/org/apache/gobblin/metastore/database/DatabaseJobHistoryStoreV103.java b/gobblin-metastore/src/main/java/org/apache/gobblin/metastore/database/DatabaseJobHistoryStoreV103.java
new file mode 100644
index 0000000..6d7eb8c
--- /dev/null
+++ b/gobblin-metastore/src/main/java/org/apache/gobblin/metastore/database/DatabaseJobHistoryStoreV103.java
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+package org.apache.gobblin.metastore.database;
+
+import org.apache.gobblin.metastore.JobHistoryStore;
+
+/**
+ * An implementation of {@link JobHistoryStore} backed by MySQL.
+ *
+ * <p>
+ *     The DDLs for the MySQL job history store can be found under metastore/src/main/resources.
+ * </p>
+ *
+ */
+@SupportedDatabaseVersion(isDefault = false, version = "1.0.3")
+public class DatabaseJobHistoryStoreV103 extends DatabaseJobHistoryStoreV101 implements VersionedDatabaseJobHistoryStore {
+
+}
diff --git a/gobblin-metastore/src/main/resources/db/migration/V1_0_3__Update_Key_Length.sql b/gobblin-metastore/src/main/resources/db/migration/V1_0_3__Update_Key_Length.sql
new file mode 100644
index 0000000..a38abf8
--- /dev/null
+++ b/gobblin-metastore/src/main/resources/db/migration/V1_0_3__Update_Key_Length.sql
@@ -0,0 +1,19 @@
+--
+--  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.
+--
+
+ALTER TABLE `gobblin_task_properties` MODIFY `property_key` VARCHAR(191);
+ALTER TABLE `gobblin_job_properties` MODIFY `property_key` VARCHAR(191);
\ No newline at end of file
diff --git a/gobblin-metastore/src/test/java/org/apache/gobblin/metastore/DatabaseJobHistoryStoreV103Test.java b/gobblin-metastore/src/test/java/org/apache/gobblin/metastore/DatabaseJobHistoryStoreV103Test.java
new file mode 100644
index 0000000..41c119d
--- /dev/null
+++ b/gobblin-metastore/src/test/java/org/apache/gobblin/metastore/DatabaseJobHistoryStoreV103Test.java
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+package org.apache.gobblin.metastore;
+
+import org.testng.annotations.Test;
+
+/**
+ * Unit tests for {@link DatabaseJobHistoryStore} V1.0.1.
+ *
+ */
+@Test(groups = {"gobblin.metastore"})
+public class DatabaseJobHistoryStoreV103Test extends DatabaseJobHistoryStoreTest {
+    @Override
+    protected String getVersion() {
+        return "1.0.3";
+    }
+}