查询Fiware COSMOS会为safe mod中的节点生成RemoteException

2024-06-24 13:35:10 发布

您现在位置:Python中文网/ 问答频道 /正文

使用以下python脚本通过配置单元查询COSMOS:

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

生成以下错误:

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'

这有什么问题?你知道吗


Tags: inorghadoopserverapachehdfsjavaipc