Member since
07-31-2013
1924
Posts
462
Kudos Received
311
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 1975 | 07-09-2019 12:53 AM | |
| 11897 | 06-23-2019 08:37 PM | |
| 9162 | 06-18-2019 11:28 PM | |
| 10154 | 05-23-2019 08:46 PM | |
| 4588 | 05-20-2019 01:14 AM |
12-08-2015
12:28 AM
Yes that is true, and I did note as much. If you are writing an EL function in Java, you can also rely on the StandbyException when connecting to explicit hostnames, to detect the active (i.e. one that does not return the exception). This is the way the Java client discovers the active NN. The CM API method can work if you query the role instances directly: http://cloudera.github.io/cm_api/apidocs/v9/path__clusters_-clusterName-_services_-serviceName-_roles_-roleName-.html#GET. The returned apiRole object, on applicable roles such as NameNode or ResourceManager, has a flag for "haStatus" (HA status) as described at http://cloudera.github.io/cm_api/apidocs/v9/ns0_apiRole.html (and http://cloudera.github.io/cm_api/apidocs/v9/ns0_haStatus.html)
... View more
12-07-2015
10:23 PM
You can use a script such as below to grab active/standby states: # Grab the IDs from the nameservice key
NNS=$(hdfs getconf -confKey dfs.ha.namenodes.nameservice1)
# Convert to a proper bash array, delimiting on comma
NNSA=(${NNS/,/ })
# Lookup state for both
STATEA=$(sudo -u hdfs hdfs haadmin -getServiceState ${NNSA[0]})
STATEB=$(sudo -u hdfs hdfs haadmin -getServiceState ${NNSA[1]})
# Test for active state
if [ "$STATEA" == "active" ]
then
ANN=${NNSA[0]}
else
ANN=${NNSA[1]}
fi
# Print the host and port of NN that is active
ANNHOSTPORT=$(hdfs getconf -confKey dfs.namenode.rpc-address.nameservice1.$ANN) echo $ANNHOSTPORT This (haadmin commands) may however require admin privileges, i.e. the 'hdfs' user or a member of the configured supergroup, to run. Are you running some non-Java based WebHDFS REST queries that require knowledge of the active NameNode? Just looking to understand why knowing the active seems necessary for your operation.
... View more
12-06-2015
11:35 PM
I am not quite sure I follow what the problem is. Could you post the differing outputs or a screenshot thereof? This may not be the issue but note that printing the representation of the string in Python will not print out unicode characters (and instead print hexes).
... View more
12-06-2015
10:00 PM
1 Kudo
If the JVM that's buffering in the local dir were to die of a SIGKILL or such forms of immediate interruption, then the cleanup procedures aren't taken care of. When running in MR mode, try setting the buffer directory to ./tmp (relative) such that it creates the files under the task's working directories and these can be deleted automatically when the TaskTracker/NodeManager cleans up the tasks' environment after its kill. Also, have you tried to use S3A (s3a://) instead? It may function better than the older S3 FS, and does not utilise a buffer directory. S3A is included in CDH5 for a while now.
... View more
12-06-2015
09:23 PM
> So, to generalize, the mechanism level subcodes can always be taken as some failure in communicating with KDC, right? Yes, it can be always taken as something wrong in the Kerberos layer (not necessarily only KDC, could also be things such as bad enctypes in keytab, etc., but always Kerberos mechanism related) > I also see that despite this error, ZK does continue to function ... so is this error to be really treated seriously? Did a retry of the auth perhaps succeed? Its not normal for it to repeat the errors.
... View more
12-06-2015
08:47 PM
5 Kudos
The HTTPFS port is 14000 (it serves a WebHDFS protocol also) but the regular non-gateway style WebHDFS serves from the NameNode's port of 50070 (or 50075 on a DN). Could you try the below two variants? 1. curl -i "http://quickstart.cloudera:50070/webhdfs/v1/user/user.name=cloudera&op=GETFILESTATUS" 2. curl -i "http://localhost:14000/webhdfs/v1/user/user.name=cloudera&op=GETFILESTATUS" Does either of these work? If not, please re-run with curl -v and post the output here.
... View more
12-02-2015
10:41 AM
Yes, the Mechanism level: sub-codes usually pertain to operations within the context of a KDC or local Kerberos work. The connection reset being a network error is therefore alluding to the Client->KDC connection being reset. The ZKs would auth to each other in secure mode, but the specific failure here is within just the auth layer (than the higher levels of ZK connectivity and responses).
... View more
11-18-2015
03:03 AM
2 Kudos
Does this help? https://gist.github.com/QwertyManiac/a9d7b546388cea72937f
... View more
11-16-2015
09:38 AM
Your end point is incorrect - you're trying /jobs/ (which gives a list of WFs with high-level info) and not /job/WFID (gives a specific WF and all details). The latter is what you need. Do this: req = urllib2.Request('http://xx.xx.xxx.xx:11000/oozie/v1/job/0000096-151104073848042-oozie-hado-W') (Or use /jobs to iterate over the list of all WFs, calling /job/ID for each item's id field)
... View more
11-16-2015
08:27 AM
Could you share a sample request URL and output received? It seems to work OK for me, for ex. for my WF ID of "0000000-151116211358117-oozie-oozi-W": ~> curl -L 'http://localhost:11000/oozie/v2/job/0000000-151116211358117-oozie-oozi-W' > wf.json ~> python >>> import json >>> a = json.loads(open('wf.json').read()) >>> len(a['actions']) 2 >>> a['actions'][1]['name'] u'Shell' FWIW, Hue today uses the same API for its Oozie app dashboards, and it does fetch all actions properly too. How old is the targeted WF, and are you able to see the list of actions OK in the web UIs?
... View more