records (limit 3, 5)Db.users.find (). Skip (3). Limit (5);Sort sortsWith age ascending ASCDb.users.find (). Sort ({age:1}); With age descending desc db.users.find (). Sort ({Age:-1});Cursorfor (var C = Db.t3.find (); C.hasnext ();) {Printjson (C.next ());}MongoDB also has another way to handle cursors> Db.t3.find (). ForEach (function (u) {printjson (U);});Stored ProceduresThe first thing you need to know about stored procedures is that it's written
instance to back up all the databases.
Mongodump--host yiibai.com--port 27017
Mongodump--dbpath Db_path--out backup_directory
Mongodump--dbpath/data/db/--out/data/backup/
Mongodump--collection Collection--db db_name
This command backs up the specified set of databases that are uniquely specified.
Mongodump--collection mycol--db test
Recovering dataRestore the backup data using MongoDB's Mongorerstore command. This command restor
Label: style blog HTTP Java Ar data 2014 SP LogHadoop Big Data zero-basic high-end practical training series with text mining projectIn the big data hadoop video tutorial, the basic java syntax, database, and Linux are used to go deep into all the knowledge required by hadoop big data technology and design all common components in the
10) db.char.find ({' name ': ' Weixiaobao '}). Skip (2). Limit (10)f) The query returns the number of bars Db.char.find ({' name ': ' Weixiaobao '}). Count ()g) sort (by name ascending, age descending) Db.char.find (). Sort ({' name ': 1, ' age ':-1})h) Query the specified column to db.char.distinct (' name ')i) Remove the set Db.char.drop ()j) Create index Db.char.ensureIndex ({' Name ': 1, ' Age ': 1},{unique:true})k) View index db.char.getIndexes ()L) Delete index Db.char.dropIndex (' IndexN
Testhivedrivertable1terry2alex3jimmy4mike5katerunning:select count (1) from TesthivedrivertableIn fact, the Java call is very simple, that is, you execute the statement in the hive shell with JDBC to do it again, so you transfer the past statement of the environment is the Hive server machine, which is written in the path from the hive server host root directory path to find data, So our a.txt has to be uploaded to the server, and this code will run normally.Resources
Https://cwiki.apa
, learn the North wind course "Greenplum Distributed database development Introduction to Mastery", " Comprehensive in-depth greenplum Hadoop Big Data analysis platform, "Hadoop2.0, yarn in layman", "MapReduce, HBase Advanced Ascension", "MapReduce, HBase Advanced Promotion" for the best.Course OutlineMahout Data Mining Tools (10 hours)Data mining concepts, system compositionCommon methods and algorithms for data Mining (regression analysis, classific
Copy an object The content of the copied "input" folder is as follows: The content of the "conf" file under the hadoop installation directory is the same. Now, run the wordcount program in the pseudo-distributed mode we just built: After the operation is complete, let's check the output result: Some statistical results are as follows: At this time, we will go to the hadoop Web
Statement
This article is based on CentOS 6.x + CDH 5.x
In this example, Hbase is installed in cluster mode
This article is based on maven3.5+ and Eclipse 4.3
After the tutorial, we must look at the following
We do not build hbase to use the shell to check the data, we are writing HBase-based applications, so learning how to use Java to invoke HBase is a required course. Setting up the project open Eclipse to build a Maven pr
Copy an objectThe content of the copied "input" folder is as follows:The content of the "conf" file under the hadoop installation directory is the same.Now, run the wordcount program in the pseudo-distributed mode we just built:After the operation is complete, let's check the output result:Some statistical results are as follows:At this time, we will go to the hadoop Web console and find that we have submit
Many tutorials on the web about Hadoop-2.4 package 64-bit encoding tutorial, the latest version 2.7.2 almost the same, here for everyone to retell.Share two more authoritative attached links:Ubuntu User Recommended Reference: http://www.aboutyun.com/forum.php?mod=viewthreadtid=8130extra=page%3D1page=1CentOS Series User reference: Http://www.cnblogs.com/hadoop2015/p/4259899.html1, the early tool preparation:
Tags: io os using SP file data on CTI ADLimit () methodTo limit the records in MongoDB, you need to use the limit () method. The limit () method accepts a numeric parameter, which is the number of documents to display.Grammar:The basic syntax for the limit () method is as follows>db. Collection_name. Find(). Limit(number) ExampleConsider the collection Myycol with the following data{ "_ID" : ObjectId(5983548781331adf45ec5), "Title":"
Cakephp and mongodb integration tutorial. If you do not have a mongodb testing environment, you can install a mongodb service locally. here is a graphic installation tutorial for mongodb in windows. By default, the
Hadoop tutorial (1) ---- use VMware to install CentOS
1. Overview
My Learning Environment-install four CentOS systems (used to build a Hadoop cluster) under the vmwarevm. One of them is the Master, three are the Slave, and the Master is the NameNode in the Hadoop cluster, three Slave as DataNode. At the same time, we s
Trivial-hadoop 2.2.0 pseudo-distributed and fully distributed installation (centos6.4), centos6.4 installation tutorial
The environment is centos6.4-32, hadoop2.2.0
Pseudo distributed document: http://pan.baidu.com/s/1kTrAcWB
Fully Distributed documentation: http://pan.baidu.com/s/1hqIeBGw
It is somewhat different from 1.x, 0. x, especially yarn.
There is an episode here. When configuring yarn in full
Import--connect jdbc:mysql://localhost:3306/sqoop_test--username root--password root--table employee--hive-i Mport--hive-table hive_employee--create-hive-tablewarning:/usr/lib/sqoop/. /hive-hcatalog does not exist! Hcatalog jobs would fail. Please set $HCAT _home to the root of your hcatalog installation. Warning:/usr/lib/sqoop/. /accumulo does not exist! Accumulo imports would fail. Please set $ACCUMULO _home to the root of your Accumulo installation ...... ........... 14/12/02 15:12:13 INFO H
Implementation tutorial of MongoDB set field matching query method, mongodb Field
MongoDB is a distributed file storage-based database. This article describes how to perform matching queries on the fields integrated in MongoDB records.1. Create a Test Database
use testdbdb.
Dropdatabase () methodThe MongoDB db.dropdatabase () command is used to delete an existing database.Grammar:The basic syntax for the dropdatabase () command is as follows:DB. Dropdatabase() This will delete the selected database. If you have not selected any databases, then it will delete the default ' test ' databaseExample:First, check the list database by using the command show DBS>Show dbslocal 0.78125GB0.23012GB0.23012GB> If you want t
," nmodified ": 1}) 2.3. Deleting documentsMongoDB removes the document from the collection with remove ()FormatDb. Collection_name.remove (Delletion_critteria,justone)Justone if set to TRUE or 1, only one document is deleted.ExampleDelete the document named ' User1 ' before deleting the document that exists in the collection "user" before querying all documents after deletion to determine if the deletion was successful> Db.user.find () {"_id": ObjectId ("58e1d2f0bb1bbc3245fa754b"), "name": "L
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.