Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
HD-Chapter:Data
-
HD-Enabler:Cosmos
Description
Created question in FIWARE Q/A platform on 19-05-2015 at 16:05
Please, ANSWER this question AT http://stackoverflow.com/questions/30329064/cant-connect-to-cosmos-to-query-hive-witch-python-or-node-js-client
Question:
Can't connect to Cosmos to query Hive witch 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 try to use this implememtation 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)
)
.on('error', function(err)
)
.on('end', function()
);
});
})
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 could'nt even connect to the server.
Could not connect to 130.206.80.46:10000
The python was just a test . I'm actually doing a Hackaton and was planning to use Node.js to query the data I have. Where do you think the problem come from? The module? The Cosmos Portal?
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.
Activity
- All
- Comments
- History
- Activity
- Transitions
Closing since this was answered in stackoverflow.com and no more feedback was received.