Access MongoDB in Hadoop? - mongodb

I combine the MongoDB into Hadoop by using MongoDB-Hadoop plugins.
( http://www.mongodb.org/display/DOCS/Hadoop+Quick+Start )
I found that PHP could access HBase by using Thrift.
Is it possible to access ( read / write ) MongoDB by using PHP and Thrift, or any other solutions ?
Thanks

If you want to query MongoDB with PHP and an ODM, you should take a look on
Doctrine or Lithiums Data Mapper
Doctrine: Doctrine Info
Lithium: Lithium PHP Library
I am sure, that you could easily use lithium mappers to start hadoop jobs and querying hadoop.

Related

Wildfly datasource - MongoDB

Sorry for the basic question. I'm totally new to Wildfly and MongoDB (in fact, I am new to nosql also).
I need to know, is that possible to add MongoDB datasource in wildfly? If yes, then how can I do that?
I have done few tutorials using MySQL and Postgres, it seems like it works very well with those DBs. However, when I tried using MongoDB driver, it's not working as expected.
There is a JDBC driver available for MongoDB from Unity you can download it here. Using it should be able to create a Datasource on MangoDB as well as fire standard SQL queries too.
The database class name will be mongodb.jdbc.MongoDriver and the database url will be of the format jdbc:mongo://<serverName>/<databaseName>

how transfer the data from mongodb to elascticsearch with logstash 2.2.0?

the problem is that logstash 2.2.0 are not compatible with the plugin logstash-input-mongodb and don't find other way to transfer the data.
There are a tool like import-handler of solr?
We use Mongo-Connector to transfer data from mongo to elastic: https://github.com/mongodb-labs/mongo-connector

Mongo connector not synchronizing data between mongodb and elastic search

I am trying to use mongo connector to import the data from mongo db to elastic search. I have followed the instructions as given in the link:
https://github.com/10gen-labs/mongo-connector/wiki/Usage-with-ElasticSearch
mongo db
: 2.4.12
connector version:2.0.3
elastic search version: 1.5.2
We are having issue where the data is not being imported from mongodb to elastic search.
Queries:
What is the best way to integrate mongodb with elastic search and synchronize real time data between them in production
How to setup the synchronization-steps
How to create one time indexes.
You can use mongo-db-river plugin to sync the data from mongoDB to elasticsearchthe following refernce link will give you the more detail about the river plugin.
MongoDB River Plugin
Reference
if you need more help on this please ask.
I think you can use mongo connector, what your question are answered:
http://blog.mongodb.org/post/29127828146/introducing-mongo-connector
https://www.linkedin.com/pulse/5-way-sync-data-from-mongodb-es-kai-hao
just like:
[root#5b9dbaaa1 bin]# mongo-connector -m 10.18.15.99:27017 -t 10.18.15.11:9200 -d elastic2_doc_manager
Logging to mongo-connector.log.

Having problems with MongoDB collection named 'auth'

I have a MongoDB collection named 'auth', and when I run:
db.auth.drop()
It of course conflicts with the db.auth() function that MongoDB provides.
Is there any other way to drop a collection?.
This issue arises when you try to access auth collection from mongo shell as it conflict with db.auth() you mentioned in the question. But using any driver you can perform CRUD on auth collection. I tried using its java driver, it works fine. That's why you faced no issue while using ORM as it is using any mongo driver internally.

Creating Indexed MongoDB during installation

I am creating an installation for a system using .NET and MongoDB. I wrote a batch to ensure indexes on DB but it would not work unless you have collection created. Is it a bad practice to do smth like:
db.Customers.save({username:"mkyong"})
db.Customers.remove({})
db.Customers.ensureIndex({SystemId:1,CampaignId:1,LocalIdentifier:1})
Use the createCollection command:
db.createCollection("Customers")
db.Customers.ensureIndex({SystemId:1,CampaignId:1,LocalIdentifier:1})