我正在尝试使用pydrill创建MySQL apache钻取存储插件。这是抛出错误:
org.apache.drill.exec.server.rest.PluginConfigWrapper),:TransportError(400,未识别的字段"type“)(未标记为可忽略的类TransportError(两个已知属性:"config",”name“)\n at Source: org.glassfish.jersey.message.internal.EntityInputStream@1843f42f; line: 1, column: 138')这里是我的代码:
drill = PyDrill(host='host',port='8047',user='xx')
configu = '{"type": "jdbc","driver": "com.mysql.jdbc.Driver","url": "jdbc:mysql://host:3306","username": "xx","password": "xx",enabled:true}'
drill.storage_update('MySQL1',configu)任何帮助都是非常感谢的!
发布于 2018-05-22 11:25:58
我找到了解决办法。我们需要将存储名作为参数传递,并将其作为json 'key':'value‘在config参数中传递。以下是修正后的代码:
configu={'config': {'driver': 'com.mysql.jdbc.Driver','enabled': True,'password': 'xyz','type': 'jdbc','url': 'jdbc:mysql://host:3306','username': 'xx'},'name':'xxx'}
drill.storage_update('xxx',config=configu)还有宾果!啊,真灵!
https://stackoverflow.com/questions/50465983
复制相似问题