This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongo "mongodb+srv://sandbox-felrd.mongodb.net/test" --username m001-student | |
pwd: m001-mongodb-basics | |
load("loadMovieDetailsDataset.js") | |
use video | |
db.getCollectionInfos() | |
db.getCollectionInfos( { name: "movieDetails" } ) | |
var data = db.movieDetails.findOne(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://s3.amazonaws.com/edu-downloads.10gen.com/M001_2018_May/static/handouts/m001_comparisonOperators.js | |
wget https://s3.amazonaws.com/edu-downloads.10gen.com/M001_2018_May/static/handouts/m001_element_operators.js | |
wget https://s3.amazonaws.com/edu-downloads.10gen.com/M001_2018_May/static/handouts/m001_logical_operators.js | |
wget https://s3.amazonaws.com/edu-downloads.10gen.com/M001_2018_May/static/handouts/m001_all_operator.js | |
wget https://s3.amazonaws.com/edu-downloads.10gen.com/M001_2018_May/static/handouts/m001_size_operator.js | |
wget https://s3.amazonaws.com/edu-downloads.10gen.com/M001_2018_May/static/handouts/m001_elemMatch_operator.js | |
wget https://s3.amazonaws.com/edu-downloads.10gen.com/M001_2018_May/static/handouts/m001_regex_operator.js | |
mongo "mongodb+srv://sandbox-felrd.mongodb.net/test" --username m001-student | |
pwd: m001-mongodb-basics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Final Exam | |
/* | |
Which of the following are valid command line instructions to start a mongod? | |
You may assume that all specified files already exist. | |
*/ | |
mongod -f /etc/mongod.conf # ok |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Setting Up a Sharded Cluster | |
Lab - Configure a Sharded Cluster | |
*/ | |
create keyfile | |
# openssl rand -base64 741 > /var/mongodb/pki/m103-keyfile | |
rm -rf /var/mongodb/db/{node1,node2,node3} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Section 1: Philosophy & Features: | |
1. Which of the following does MongoDB use to provide High Availability and fault tolerance? | |
a. Write Concern # Write concern describes the level of acknowledgement requested from MongoDB for write operations to a standalone mongod or to replica sets or to sharded clusters. In sharded clusters, mongos instances will pass the write concern on to the shards. | |
* b. Replication # provê o HA | |
c. Sharding # é a distribuição do dado | |
d. Indexing # index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to unzip gz file using Python | |
https://stackoverflow.com/questions/31028815/how-to-unzip-gz-file-using-python | |
import pandas as pd | |
import os | |
fn = '../data/file_to_load.json.gz' | |
print(os.path.isfile(fn)) | |
df = pd.read_json(fn, lines=True, compression='gzip') | |
df.tail() |
Filtering * Sampling * Top-N * Simple Filter * Bloom Filter ()
- Sampling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hadoop fs -ls | |
hadoop fs -rm -r myinput | |
hadoop fs -rm -r output_max_store | |
hadoop fs -put data/purchases.txt myinput | |
hs code/mapper.py code/reducer.py myinput output | |
hadoop fs -get output/part-00000 data/mylocalfile.txt | |
cat data/mylocalfile.txt | |
hadoop fs -rm -r forum_node | |
hadoop fs -rm -r forum_users |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dashboard Kibpx05 | |
Twitter: #DevopsDayOSS | |
Docker - https://www.katacoda.com/courses/docker | |
Docker compose | |
ssh ip172-18-0-3-bfi3s2iv9dig00ccies0@direct.labs.play-with-docker.com |