[Backlogmanager] [FIWARE-JIRA] (HELP-13387) [fiware-stackoverflow] Can' t connect to Cosmos to query Hive with Python or Node.js client

Fernando Lopez (JIRA) jira-help-desk at jira.fiware.org
Tue Jan 16 14:10:00 CET 2018


     [ https://jira.fiware.org/browse/HELP-13387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fernando Lopez deleted HELP-13387:
----------------------------------


> [fiware-stackoverflow] Can't connect to Cosmos to query Hive with Python or Node.js client
> ----------------------------------------------------------------------------------------------
>
>                 Key: HELP-13387
>                 URL: https://jira.fiware.org/browse/HELP-13387
>             Project: Help-Desk
>          Issue Type: Monitor
>            Reporter: Backlog Manager
>              Labels: fiware, fiware-cosmos, hive, node.js, python
>
> Created question in FIWARE Q/A platform on 19-05-2015 at 16:05
> {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/30329064/cant-connect-to-cosmos-to-query-hive-with-python-or-node-js-client
> +Question:+
> Can't connect to Cosmos to query Hive with Python or Node.js client
> +Description:+
> I am actually trying to develop a simple Node.js client, which can be used to query my Hive table on the Cosmos table . 
> I first tried to use this implementation for Hive using Node.js :
> https://github.com/wdavidw/node-thrift-hive. My code is the following : 
> var router = express.Router();
> var request = require('request');
> var _ = require('lodash');
> var hive = require('thrift-hive');
> // Client connection
> var client = hive.createClient({
>   version: '0.7.1-cdh3u3',
>   server: '130.206.80.46',
>   port: 10000,
>   timeout: 1000
> });
> // Execute call
> router.route('/')
>   .get(function(req, res, next) {
>     client.execute('use default', function(err) {
>       // Query call
>       client.query('select * from interserre')
>       .on('row', function(database) {
>         console.log(database);
>       })
>       .on('error', function(err) {
>         console.log(err.message);
>         client.end();
>       })
>       .on('end', function() {
>         client.end();
>       });
>     });
>   })
> module.exports = router;
> I get this error:
> events.js:85
>       throw er; // Unhandled 'error' event
>             ^
> Error: connect ECONNREFUSED
>     at exports._errnoException (util.js:746:11)
>     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19)
> After that I tried to use the Python example (provided by the documentation  just to run a simple test.
> http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/BigData_Analysis_-_User_and_Programmer_Guide#Python
> I couldn't even connect to the server. 
> Could not connect to 130.206.80.46:10000
> I think the problem come from the fact that we don't provide any information that allow us to connect to the Cosmos portal.  With Thrift there is no way to put your credentials.  The server can't identify you're a real Cosmos user and reject your connection. 
> The python was just a test.  I'm actually doing a Hackaton and was planning to use Node.js to query the data that I have.  Where do you think the problem come from? The module? The Cosmos Portal?



--
This message was sent by Atlassian JIRA
(v6.4.1#64016)


More information about the Backlogmanager mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy