浏览代码

AMBARI-571. Hive Server text should be replaced with Hive Metastore (Contributed by Jaimin Jetly)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1352675 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 13 年之前
父节点
当前提交
3525f0c25e
共有 2 个文件被更改,包括 24 次插入1 次删除
  1. 23 0
      hmc/db/hdp_upgrade_to_1.0.1.php
  2. 1 1
      hmc/db/schema.dump

+ 23 - 0
hmc/db/hdp_upgrade_to_1.0.1.php

@@ -0,0 +1,23 @@
+<?php
+# 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.
+
+//The script takes the first argument as the path of sqlite database
+
+$db = new PDO("sqlite:".$argv[1]);
+$query = "UPDATE ServiceComponents SET display_name = 'Hive Metastore' WHERE service_name = 'HIVE' AND component_name = 'HIVE_SERVER'"; 
+$db->exec($query) or die(print_r($db->errorInfo(), true));
+?>
+

+ 1 - 1
hmc/db/schema.dump

@@ -111,7 +111,7 @@ INSERT OR REPLACE INTO "ServiceComponents" ( service_name, component_name, displ
 INSERT OR REPLACE INTO "ServiceComponents" ( service_name, component_name, display_name, attributes, description ) VALUES
   ( "HIVE", "HIVE_MYSQL", "MySql Server for Hive", '{ "isMaster": false, "isClient": false }', "" );
 INSERT OR REPLACE INTO "ServiceComponents" ( service_name, component_name, display_name, attributes, description ) VALUES
-  ( "HIVE", "HIVE_SERVER", "Hive Server", '{ "isMaster": true, "isClient": false }', "" );
+  ( "HIVE", "HIVE_SERVER", "Hive Metastore", '{ "isMaster": true, "isClient": false }', "" );
 INSERT OR REPLACE INTO "ServiceComponents" ( service_name, component_name, display_name, attributes, description ) VALUES
   ( "HIVE", "HIVE_CLIENT", "Hive Client", '{ "isMaster": false, "isClient": true }', "" );
 INSERT OR REPLACE INTO "ServiceComponents" ( service_name, component_name, display_name, attributes, description ) VALUES