0

Querying COSMOS by Hive with this python script:

import pyhs2

with pyhs2.connect(host='cosmos.lab.fiware.org',
                    port=10000,
                    authMechanism="PLAIN",
                    user='glaquidara',
                    password='*****',
                    database='default') as conn:
     with conn.cursor() as cur:
         cur.execute("select * from glaquidara_mazzi")
         print cur.getSchema()

         for i in cur.fetch():
             print i

generates the following error:

Traceback (most recent call last): File "libra.py", line 10, in cur.execute("select * from glaquidara_mazzi") File "/Library/Python/2.7/site-packages/pyhs2/cursor.py", line 64, in execute raise Pyhs2Exception(res.status.errorCode, res.status.errorMessage) pyhs2.error.Pyhs2Exception: 'Error while compiling statement: FAILED: RuntimeException org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create directory /tmp/hive-root/hive_2015-10-07_13-32-30_348_3807878262746902303-3. Name node is in safe mode.\nResources are low on NN. Safe mode must be turned off manually.\n\tat org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirsInternal(FSNamesystem.java:2140)\n\tat org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:2114)\n\tat org.apache.hadoop.hdfs.server.namenode.NameNode.mkdirs(NameNode.java:892)\n\tat sun.reflect.GeneratedMethodAccessor586.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n\tat java.lang.reflect.Method.invoke(Method.java:597)\n\tat org.apache.hadoop.ipc.RPC$Server.call(RPC.java:557)\n\tat org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1439)\n\tat org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1435)\n\tat java.security.AccessController.doPrivileged(Native Method)\n\tat javax.security.auth.Subject.doAs(Subject.java:396)\n\tat org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1278)\n\tat org.apache.hadoop.ipc.Server$Handler.run(Server.java:1433)\n'

What is the problem with this?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
GioLaq
  • 2,489
  • 21
  • 26
  • The cluster automatically entered in safe mode for a while. This is currently fixed. – frb Oct 08 '15 at 08:10
  • This question should be closed, nevertheless not enough "deletion" flags in my account. – frb Oct 08 '15 at 08:17

0 Answers0