Hi Tim -
You can use a curl command of the form:
curl -X PUT -H "Content-Type:application/json" -u <CM_USER>:<CM_PASS> \
-d '{ "items": [
{ "name": "hue_webhdfs", "value": "<NAMENODE_NAME>" } ] }' \
'http://
<CM_SERVER_HOST>:7180/api/v6/clusters/<CLUSTER_NAME>/services/<HUE_SERVICE_NAME>/config'
Where:
<CM_USER> is the admin user name you use to login to
the CM UI
<CM_PASS> is the password for the admin user
<NAMENODE_NAME> is the role name of the Namenode you want to set
hue_webhdfs to
<CM_SERVER_HOST> is the hostname of the host where CM Server is running
<CLUSTER_NAME> is the name of the cluster
<HUE_SERVICE_NAME> is the name of the Hue service
You can use the API to find the values for <NAMENODE_NAME>, <CLUSTER_NAME>
and <HUE_SERVICE_NAME>. One way to do this is:
1. From the CM UI, click "Support" near the upper right corner.
2. Select "API Documentation" from the drop-down menu.
3. This will take you to the API documentation page. Scroll down and click
on "/clusters" under "REST Resources."
4. This takes you to a page documenting the "/clusters" endpoint. Clicking
on the link next to "Mount Point" will execute a GET of this resource on
your CM server, which will display a JSON document listing the clusters
managed by CM. The cluster names are included in this list.
5. Now that you've got the cluster name, use it to access the
/clusters/{clusterName}/services API resource. Remember to URL encode the
cluster name (e.g., encode space characters as %20). This will generate a
JSON showing the Hue service name.
6. Continue in this way to obtain the Namenode role name
(/cluster/{clusterName}/services/{serviceName}/roles).
You will end up with a curl command that looks something like:
curl -X PUT -H "Content-Type:application/json" -u
admin_user:admin_user_passwd \
-d '{ "items": [
{ "name": "hue_webhdfs", "value":
"HDFS-1-NAMENODE-8d3f52189a7ba760ade71a078c93f41c" } ] }' \
'http://cm.foo.com:7180/api/v6/clusters/Cluster%201/services/HUE-1/config'
For more information, there is a link to an API tutorial on the API
Documentation page.
Mark
On Fri, Apr 18, 2014 at 3:12 PM, Tim Washburn wrote:Just so I don't dig in the wrong spot what would be the proper command to
execute using the REST API??? Witht he understanding that I've not delved
this deep into CM before
Regards
Tim Washburn
Global IT Security
Bio-Rad Laboratories, Inc
(925)474-9091
From: Vikram Srivastava <
vikrams@cloudera.com>
To: Tim Washburn <
tim_washburn@bio-rad.com>
Cc: scm-users <
scm-users@cloudera.org>
Date: 04/18/2014 02:57 PM
Subject: Re: Lost Hue config while resetting HTTPFS/WebHDFS - How
fix???
------------------------------
The warning means that if you have HA HDFS, then you should add an HTTPFS
role to HDFS and then set that role has HDFS Web Interface Role for Hue.
This config is saved in CM database. I wouldn't recommend modifying the db
directly. You should set "hue_webhdfs" property using the API. The value
can be the name of any of the NameNodes. (You can get the name of Namenode
using API as well).
Once the config is set, the error should go away. You can then add the
HTTPFS role and set Hue's webinterface to that role.
On Fri, Apr 18, 2014 at 2:49 PM, Tim Washburn <*
tim_washburn@bio-rad.com*wrote:
I was setting up HA on the cluster so that I could have flume write to
either namenode. That seemed easy enough - a few clicks and done.
What I didn't expect is seeing a config warning message for Hue. The warn
message related to selecting HTTPFS or WebHDFS on one of the nodes. This
was displayed in the config tab in the Hue service and there was 2 choices
- namenode1 and 2. Node 1 being selected. I selected the 2nd namenode and
clicked saved. Restarted Hue and had the same warning. I repeated the
process and selected namenode 1 and saved the change. This time however it
didn't seem to take and I selected save again and got the error message
that I posted - almost as if the config was in mid save when it was it was
resaved again, thus clobbering the config.
Is there a specific config file in the cluster that controls Hue or the
config saved in the embedded db? I've looked at the hue,ini and don't see
anything that related.
Regards
Tim Washburn
Global IT Security
Bio-Rad Laboratories, Inc
*(925)474-9091* <%28925%29474-9091>
From: Vikram Srivastava <*vikrams@cloudera.com*<vikrams@cloudera.com>
To: Tim Washburn <*tim_washburn@bio-rad.com*<tim_washburn@bio-rad.com>
Cc: scm-users <*
scm-users@cloudera.org* <
scm-users@cloudera.org>>
Date: 04/18/2014 02:02 PM
Subject: Re: Lost Hue config while resetting HTTPFS/WebHDFS - How
fix???
------------------------------
You can try setting the "hue_webhdfs" property using CM's REST API and see
if that makes a difference.
BTW how did you reach into this situation? Were you relocating NameNode or
HTTPFS role in HDFS?
On Fri, Apr 18, 2014 at 1:38 PM, Tim Washburn <*
tim_washburn@bio-rad.com*wrote:
Hi Vikram -
To answer, can I get to Hus Config tab - no it errors out. Attached is the
log file for /var/log/cloudera-scm-server/cloudera-scm-server.log
Regards
TimW
On Friday, April 18, 2014 9:56:22 AM UTC-7, Tim Washburn wrote:
A server error has occurred. Send the following information to Cloudera.
*Path: **http://10.1.249.30:7180/cmf/services/landingPageStatusContent*<
http://10.1.249.30:7180/cmf/services/landingPageStatusContent>
*Version: Cloudera Express 5.0.0-beta-2 (#119 built by jenkins on
20140209-0301 git: 8acd3c5559ccf82bf374d49bbf00bce58dee286e)*
*com.google.common.util.concurrent.UncheckedExecutionException*:com.cloudera.enterprise.JsonUtil$JsonRuntimeException:
org.codehaus.jackson.map.JsonMappingException: (was
java.lang.NullPointerException) (through reference chain:
com.google.common.collect.RegularImmutableList[1]->com.cloudera.server.web.cmf.actionables.Actionable["details"])
at *LocalCache.java line 2263*
in com.google.common.cache.LocalCache$Segment get()
To unsubscribe from this group and stop receiving emails from it, send an
email to *scm-users+unsubscribe@cloudera.org*<scm-users+unsubscribe@cloudera.org>.
To unsubscribe from this group and stop receiving emails from it, send an
email to *scm-users+unsubscribe@cloudera.org*<scm-users+unsubscribe@cloudera.org>
.
To unsubscribe from this group and stop receiving emails from it, send an
email to *scm-users+unsubscribe@cloudera.org*<scm-users+unsubscribe@cloudera.org>
.
To unsubscribe from this group and stop receiving emails from it, send an
email to scm-users+unsubscribe@cloudera.org.
To unsubscribe from this group and stop receiving emails from it, send an email to scm-users+unsubscribe@cloudera.org.