You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ji...@apache.org on 2012/05/29 22:44:41 UTC

svn commit: r1343970 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/db/schema.dump hmc/php/frontend/nodesAction.php

Author: jitendra
Date: Tue May 29 20:44:41 2012
New Revision: 1343970

URL: http://svn.apache.org/viewvc?rev=1343970&view=rev
Log:
AMBARI-305. Combine Hive and HCat into a single service. Contributed by Hitesh.

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/db/schema.dump
    incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesAction.php

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1343970&r1=1343969&r2=1343970&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Tue May 29 20:44:41 2012
@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-305. Combine Hive and HCat into a single service. (hitesh via jitendra)
+
   AMBARI-278. Update MapReduce parameter configuration description. (suresh via jitendra)
 
   AMBARI-276. Update HDFS parameter configuration description. (suresh via jitendra)

Modified: incubator/ambari/branches/ambari-186/hmc/db/schema.dump
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/db/schema.dump?rev=1343970&r1=1343969&r2=1343970&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/db/schema.dump (original)
+++ incubator/ambari/branches/ambari-186/hmc/db/schema.dump Tue May 29 20:44:41 2012
@@ -45,9 +45,7 @@ INSERT OR REPLACE INTO "Services" ( serv
 INSERT OR REPLACE INTO "Services" ( service_name, display_name, attributes, description ) VALUES
   ( "OOZIE", "Oozie", '{ "runnable": true, "mustInstall": false, "editable": true, "noDisplay": false }',  "Workflow/Coordination system to manage Apache Hadoop jobs" );
 INSERT OR REPLACE INTO "Services" ( service_name, display_name, attributes, description ) VALUES
-  ( "HIVE", "Hive", '{ "runnable": true, "mustInstall": false, "editable": true, "noDisplay": false }',  "Data Warehouse system for Apache Hadoop" );
-INSERT OR REPLACE INTO "Services" ( service_name, display_name, attributes, description ) VALUES
-  ( "HCATALOG", "HCatalog", '{ "runnable": false, "mustInstall": false, "editable": true, "noDisplay": false }',  "Table and Storage Management service for data created using Apache Hadoop" );
+  ( "HIVE", "Hive and HCatalog", '{ "runnable": true, "mustInstall": false, "editable": true, "noDisplay": false }',  "Hive - Data Warehouse system for Apache Hadoop, HCatalog - Table and Storage Management service for data created using Apache Hadoop" );
 INSERT OR REPLACE INTO "Services" ( service_name, display_name, attributes, description ) VALUES
   ( "TEMPLETON", "Templeton", '{ "runnable": true, "mustInstall": false, "editable": true, "noDisplay": false }',  "Webservice APIs for Apache Hadoop" );
 INSERT OR REPLACE INTO "Services" ( service_name, display_name, attributes, description ) VALUES
@@ -117,8 +115,6 @@ INSERT OR REPLACE INTO "ServiceComponent
 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
-  ( "HCATALOG", "HCATALOG_CLIENT", "HCatalog Client", '{ "isMaster": false, "isClient": true }', "" );
-INSERT OR REPLACE INTO "ServiceComponents" ( service_name, component_name, display_name, attributes, description ) VALUES
   ( "TEMPLETON", "TEMPLETON_SERVER", "Templeton Server", '{ "isMaster": true, "isClient": false }', "" );
 INSERT OR REPLACE INTO "ServiceComponents" ( service_name, component_name, display_name, attributes, description ) VALUES
   ( "TEMPLETON", "TEMPLETON_CLIENT", "Templeton Client", '{ "isMaster": false, "isClient": true }', "" );
@@ -144,12 +140,10 @@ INSERT OR REPLACE INTO "ServiceDependenc
 INSERT OR REPLACE INTO "ServiceDependencies" ( from_service_name, to_service_name ) VALUES ( "HBASE" , "ZOOKEEPER" );
 INSERT OR REPLACE INTO "ServiceDependencies" ( from_service_name, to_service_name ) VALUES ( "HBASE" , "HDFS" );
 INSERT OR REPLACE INTO "ServiceDependencies" ( from_service_name, to_service_name ) VALUES ( "OOZIE" , "MAPREDUCE" );
-INSERT OR REPLACE INTO "ServiceDependencies" ( from_service_name, to_service_name ) VALUES ( "HCATALOG" , "HIVE" );
 INSERT OR REPLACE INTO "ServiceDependencies" ( from_service_name, to_service_name ) VALUES ( "HIVE" , "MAPREDUCE" );
 INSERT OR REPLACE INTO "ServiceDependencies" ( from_service_name, to_service_name ) VALUES ( "TEMPLETON" , "MAPREDUCE" );
 INSERT OR REPLACE INTO "ServiceDependencies" ( from_service_name, to_service_name ) VALUES ( "TEMPLETON" , "PIG" );
 INSERT OR REPLACE INTO "ServiceDependencies" ( from_service_name, to_service_name ) VALUES ( "TEMPLETON" , "HIVE" );
-INSERT OR REPLACE INTO "ServiceDependencies" ( from_service_name, to_service_name ) VALUES ( "TEMPLETON" , "HCATALOG" );
 INSERT OR REPLACE INTO "ServiceDependencies" ( from_service_name, to_service_name ) VALUES ( "TEMPLETON" , "ZOOKEEPER" );
 INSERT OR REPLACE INTO "ServiceDependencies" ( from_service_name, to_service_name ) VALUES ( "PIG" , "MAPREDUCE" );
 INSERT OR REPLACE INTO "ServiceDependencies" ( from_service_name, to_service_name ) VALUES ( "SQOOP" , "MAPREDUCE" );
@@ -241,9 +235,9 @@ INSERT OR REPLACE INTO "ConfigProperties
 INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "zk_log_dir", "/var/log/zookeeper", "ZooKeeper Log directory", "Directory for ZooKeeper log files", "ZOOKEEPER", "NODISPLAY", '{ "isPassword": false, "noDisplay": true, "reconfigurable": false, "displayType": "text" }' );
 INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "zk_pid_dir", "/var/run/zookeeper", "ZooKeeper PID directory", "Directory in which the pid files for zookeeper processes will be created", "ZOOKEEPER", "NODISPLAY", '{ "isPassword": false, "noDisplay": true, "reconfigurable": false, "displayType": "text" }' );
 INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "zk_user", "zookeeper", "ZooKeeper User", "User to run ZooKeeper as", "ZOOKEEPER", "NODISPLAY", '{ "isPassword": false, "noDisplay": true, "reconfigurable": false, "displayType": "text" }' );
-INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "hcat_logdirprefix", "/var/log/hcatalog", "HCAT Log Dir", "Directory for HCatalog logs", "HCATALOG", "NODISPLAY", '{ "isPassword": false, "noDisplay": true, "reconfigurable": false, "displayType": "text" }' );
-INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "hcat_logdirprefix", "/var/log/hcatalog", "HCAT Log Dir", "Directory in which the pid files for hcatalog processes will be created", "HCATALOG", "NODISPLAY", '{ "isPassword": false, "noDisplay": true, "reconfigurable": false, "displayType": "text" }' );
-INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "hcat_user", "hcat", "HCAT User Name", "User to run HCatalog as", "HCATALOG", "NODISPLAY", '{ "isPassword": false, "noDisplay": true, "reconfigurable": false, "displayType": "text" }' );
+INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "hcat_logdirprefix", "/var/log/hcatalog", "HCAT Log Dir", "Directory for HCatalog logs", "HIVE", "NODISPLAY", '{ "isPassword": false, "noDisplay": true, "reconfigurable": false, "displayType": "text" }' );
+INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "hcat_logdirprefix", "/var/log/hcatalog", "HCAT Log Dir", "Directory in which the pid files for hcatalog processes will be created", "HIVE", "NODISPLAY", '{ "isPassword": false, "noDisplay": true, "reconfigurable": false, "displayType": "text" }' );
+INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "hcat_user", "hcat", "HCAT User Name", "User to run HCatalog as", "HIVE", "NODISPLAY", '{ "isPassword": false, "noDisplay": true, "reconfigurable": false, "displayType": "text" }' );
 INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "templeton_user", "templeton", "Templeton User Name", "User to run Templeton as", "TEMPLETON", "NODISPLAY", '{ "isPassword": false, "noDisplay": true, "reconfigurable": false, "displayType": "text" }' );
 INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "templeton_pid_dir", "/var/run/templeton", "Templeton PID Dir", "Directory in which the pid files for templeton processes will be created", "TEMPLETON", "NODISPLAY", '{ "isPassword": false, "noDisplay": true, "reconfigurable": false, "displayType": "text" }' );
 INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "templeton_log_dir", "/var/log/templeton", "Templeton Log Dir", "Directory for templeton logs", "TEMPLETON", "NODISPLAY", '{ "isPassword": false, "noDisplay": true, "reconfigurable": false, "displayType": "text" }' );

Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesAction.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesAction.php?rev=1343970&r1=1343969&r2=1343970&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesAction.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesAction.php Tue May 29 20:44:41 2012
@@ -18,6 +18,8 @@ $deployUser = $_POST['ClusterDeployUser'
 
 $propertiesArr = $dbAccessor->getConfigPropertiesMetaInfo();
 if ($propertiesArr["result"] != 0) {
+  $logger->log_error("Could not get config meta info from DB, error="
+      . $propertiesArr["error"]);
   print json_encode(array( "result" => 1, "error" => "Error in config properties meta info"));
   return;
 }
@@ -32,6 +34,8 @@ $gplArtifactsDownloadUrl = $propertiesAr
 
 $currentConfigs = $dbAccessor->getServiceConfig($clusterName);
 if ($currentConfigs["result"] != 0) {
+  $logger->log_error("Could not get configs from DB, error="
+      . $currentConfigs["error"]);
   print json_encode(array( "result" => 1, "error" => "Could not get configs from DB"));
   return;
 }
@@ -52,23 +56,25 @@ if (isset($currentConfigs["properties"][
 }
 
 if (isset($_POST['yumRepoFilePath'])
-    && $_POST['yumRepoFilePath'] != "") {
-  $repoFilePath = $_POST['yumRepoFilePath'];
+    && trim($_POST['yumRepoFilePath']) != "") {
+  $repoFilePath = trim($_POST['yumRepoFilePath']);
 }
 
 if (isset($_POST['hdpArtifactsDownloadUrl'])
-    && $_POST['hdpArtifactsDownloadUrl'] != "") {
-  $hdpArtifactsDownloadUrl = $_POST['hdpArtifactsDownloadUrl'];
+    && trim($_POST['hdpArtifactsDownloadUrl']) != "") {
+  $hdpArtifactsDownloadUrl = trim($_POST['hdpArtifactsDownloadUrl']);
 }
 
 if (isset($_POST['gplArtifactsDownloadUrl'])
-    && $_POST['gplArtifactsDownloadUrl'] != "") {
-  $gplArtifactsDownloadUrl = $_POST['gplArtifactsDownloadUrl'];
+    && trim($_POST['gplArtifactsDownloadUrl']) != "") {
+  $gplArtifactsDownloadUrl = trim($_POST['gplArtifactsDownloadUrl']);
 }
 
 header("Content-type: application/json");
 
 if (!file_exists($repoFilePath)) {
+  $logger->log_warn("Invalid repo file provided, file does not exist"
+      . ", repoFile=" . $repoFilePath);
   print (json_encode(array(
       "result" => 1,
       "error" => "Invalid repo file path specified"
@@ -81,6 +87,10 @@ if (!file_exists($repoFilePath)) {
 /*
 if (parse_url($hdpArtifactsDownloadUrl) === FALSE
     || parse_url($gplArtifactsDownloadUrl) === FALSE) {
+  $logger->log_warn("Invalid download urls provided, could not parse"
+      . ", hdpArtifactsDownloadUrl=" . $hdpArtifactsDownloadUrl
+      . ", gplArtifactsDownloadUrl=" . $gplArtifactsDownloadUrl);
+
   print (json_encode(array(
         "result" => 1,
         "error" => "Invalid download urls specified")));