Posts

MongoDB Replication Configuration

                    MongoDB Replication Configuration: while replication in mongodb if it show error like "not master" then run rs.slaveOk() command on secondary node side it will solve issue. ==================================================== Replication- mongoDB 1.Start by creating a data directory for each replica set member: mkdir /data/node1 mkdir /data/node2 mkdir /data/arbiter 2. mongod --replSet myapp --dbpath /data/node1 --port 40000 mongod --replSet myapp --dbpath /data/node2 --port 40001 mongod --replSet myapp --dbpath /data/arbiter --port 40002 3. run mongo hostname:40000 to rum client on primary, and then run the rs.initiate() command: > rs.initiate() { "info2" : "no configuration explicitly specified -- making one", "me" : "arete:40000", "info" : "Config now saved locally. Should come online in about a minute .", "ok" : 1 } 4.You can now add the o...

What is MongoDB

                   MongoDB - Document Oriented NoSQL DataBase: MongoDB is one of several database types to arise in the mid-2000s under the NoSQL banner. Instead of using tables and rows as in relational databases , MongoDB is built on an architecture of collections and documents. Documents comprise sets of key-value pairs and are the basic unit of data in MongoDB. Collections contain sets of documents and function as the equivalent of relational database tables. Like other NoSQL databases, MongoDB supports dynamic schema design, allowing the documents in a collection to have different fields and structures. The database uses a document storage and data interchange format called BSON, which provides a binary representation of JSON -like documents. Automatic sharding enables data in a collection to be distributed across multiple systems for horizontal scalability as data volumes ...

hadoop learning blogs | Bigdata blogs

                          100's of blogs Related to BigData: http://blogs.the451group.com/opensource/ href="http://abeautifulwww.com" href="http://timmanns.blogspot.com/" href="http://www.behind-the-enemy-lines.com/" href="http://www.acthomas.ca/" href="http://abbottanalytics.blogspot.com/" href="http://www.advancednflstats.com" href="http://patilv.github.io/" href="http://blog.smola.org/" href="http://blog.markus-breitenbach.com/" href="http://allthingsdistributed.com" href="http://aws.typepad.com/aws" href="http://www.analyticbridge.com/profiles/blog/list" href="http://www.analyticsvidhya.com/blog/" href="http://www.applieddatalabs.com" href="http://atbrox.com" href="http://www.bitquill.net/blog" href="http://radar.oreilly.com/ben/" href="http://benfry.com/writing/" href="htt...

Read XML file in hadoop hive

Process xml file on hadoop OR Load xml file data in Hive/HBase: My program code: Here I have XmlDriver class, in that i have xmlRecodReader class, map class & reduce class and it will process xml data and generate comma seprated columns in hdfs. Raw data file like: <current_observation version=\"1.0"....>   <latitude>1</latitude>   <longitude>2</longitude>   <pressure_mb>3</pressure_mb>   <wind_mph>4</wind_mph>   <wind_dir>5</wind_dir>   <windchill_c>6</windchill_c>   <temp_c>7</temp_c>   <wind_degrees>8</wind_degrees> </current_observation>  import java.io.ByteArrayInputStream; import java.io.IOException; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamReader; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputS...

Solr document update

updating csv document in solr [user@localhost exampledocs]$ curl http://localhost:8983/solr/update/csv --data- binary @books.csv -H 'Content-type:text/plain; charset=utf-8' after above command you will see like this: <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">0</int><int name="QTime">60</int></lst> </response> [user@localhost exampledocs]$ curl http://localhost:8983/solr/update/csv --data-binary @books.csv -H 'Content-type:text/plain; charset=utf-8' <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">0</int><int name="QTime">61</int></lst> </response> [user@localhost exampledocs]$ means data is updating.. i am also working on this so i'll change/upd...

Apache Solr Installation

   Solr Installation and New core Configuration: Apache Solr achieve fast search responses because, instead of searching the text directly, it searches an index. This is like retrieving pages in a book based on a word by scanning the index at the back of a book, as opposed to searching every word of every page of the book. This type of index is called an inverted index, because it inverts a page-centric data structure (page->words) to a keyword-centric data structure (word->pages). Solr stores this index in a directory called index in the data directory. Apache Solr is powered by Lucene, a powerful open-source full-text search library, under the hood. The relationship between Solr and Lucene, is like that of the relationship between a car and engine. In Solr, a Document is the unit of search and index. An index consists of one or more Documents, and a Document consists of one or more Fields. Solr Installation and New core Configuration: 1. Installation- Do...

Hadoop Interview Questions

            For Hadoop Interview Question See: Hadoop Interview Questions and Answers by rohit kapa from kapa rohit